📄 myview.h
字号:
// MyView.h : interface of the CMy1603View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MYVIEW_H__CF26CD51_8772_4045_A9D4_FC4E71C623E5__INCLUDED_)
#define AFX_MYVIEW_H__CF26CD51_8772_4045_A9D4_FC4E71C623E5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMy1603View : public CScrollView
{
protected: // create from serialization only
CMy1603View();
DECLARE_DYNCREATE(CMy1603View)
// Attributes
public:
CMy1603Doc* GetDocument();
COLORREF m_colorCurr; // 当前颜色
int m_nCurrWidth; // 当前线宽
BOOL m_bCaptured; // 是否按下鼠标左键
CPoint m_pointFrom; // 当前线始端
CPoint m_pointTo; // 当前线终端
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMy1603View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMy1603View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMy1603View)
afx_msg void OnWidth1();
afx_msg void OnUpdateWidth1(CCmdUI* pCmdUI);
afx_msg void OnWidth3();
afx_msg void OnUpdateWidth3(CCmdUI* pCmdUI);
afx_msg void OnWidth5();
afx_msg void OnUpdateWidth5(CCmdUI* pCmdUI);
afx_msg void OnWidth7();
afx_msg void OnUpdateWidth7(CCmdUI* pCmdUI);
afx_msg void OnColor();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in MyView.cpp
inline CMy1603Doc* CMy1603View::GetDocument()
{ return (CMy1603Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYVIEW_H__CF26CD51_8772_4045_A9D4_FC4E71C623E5__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -