diff --git a/Tinhtong2so/SimpleDlg/SimpleDlgView.h b/Tinhtong2so/SimpleDlg/SimpleDlgView.h index fa70bd4..73b92b5 100644 --- a/Tinhtong2so/SimpleDlg/SimpleDlgView.h +++ b/Tinhtong2so/SimpleDlg/SimpleDlgView.h @@ -1,4 +1,3 @@ - // SimpleDlgView.h : interface of the CSimpleDlgView class // @@ -13,24 +12,24 @@ class CSimpleDlgView : public CView CSimpleDlgView() noexcept; DECLARE_DYNCREATE(CSimpleDlgView) -// Attributes + // Attributes public: CSimpleDlgDoc* GetDocument() const; -// Operations + // Operations public: -// Overrides + // Overrides public: - void DrawGraph(CDC * pDC); - void DrawUnit(CDC * pDC, int m_head, int m_distance); + void DrawGraph(CDC* pDC); + void DrawUnit(CDC* pDC, int m_head, int m_distance); virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); int ConvertX(int x, int m_head, int m_distance); int ConvertY(int y, int m_head, int m_distance); protected: -// Implementation + // Implementation public: virtual ~CSimpleDlgView(); #ifdef _DEBUG @@ -40,26 +39,27 @@ class CSimpleDlgView : public CView protected: -// Generated message map functions + // Generated message map functions protected: afx_msg void OnFilePrintPreview(); afx_msg void OnRButtonUp(UINT nFlags, CPoint point); afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); - afx_msg void OnButton10Clicked(); + afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); + void OnButton10Clicked(); DECLARE_MESSAGE_MAP() public: afx_msg void OnToolsOptions(); private: - CString m_text{_T("Place name here")}; + CString m_text{ _T("Place name here") }; int m_bgColor{ 0 }; //int m_x{950}; //int m_y{500}; //int m_r{100}; - int m_head{ 0 }; + float m_head{ 0 }; float m_distance{ 50 }; CButton m_button; CEdit m_editBox; - CString tmp_editBox{_T("900.000")}; + CString tmp_editBox{ _T("900.000") }; public: afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); @@ -67,6 +67,7 @@ class CSimpleDlgView : public CView #ifndef _DEBUG // debug version in SimpleDlgView.cpp inline CSimpleDlgDoc* CSimpleDlgView::GetDocument() const - { return reinterpret_cast(m_pDocument); } +{ + return reinterpret_cast(m_pDocument); +} #endif -