📄 myview.h
字号:
// MyView.h : header file
#if !defined(_MYVIEW_H)
#define _MYVIEW_H
class AFX_EXT_CLASS CMyView : public CView
{
public:
CMyView(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CMyView)
// Attributes
public:
BOOL m_bHaveMouseRight;
UINT m_LookMode;//mouse mode
BOOL m_LDown;//左键是否按下
CPoint m_BeginPos;
CRect m_OldFocus;
CPoint m_OldPos;
BOOL m_bOrientImg;//是否只允许放缩一次
CRect m_updateRect;
BOOL m_zoomEnable;
HCURSOR m_hCursor;
BOOL m_bNeedUpdate;
//屏幕保护
CBitmap* m_pScreenBitmap;
float m_screenScale;
CRect m_screenRect;
CSize m_screenSize;
BOOL m_bLockUpdate;
CSize m_scrollSize;
float m_Scale;//logical width / device width
double m_precision;
// Operations
public:
friend class CMyDoc;
friend class CWndForDLL;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual void OnMyDraw(CDC* pDC);
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
LRESULT OnLostMouse(WPARAM wParam, LPARAM lParam);
void MyInvalidate();
void MyInvalidateRect(CRect& rect);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
public:
//{{AFX_MSG(CMyView)
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnPaint();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
public:
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
protected:
afx_msg void OnDrawDzoomin();
afx_msg void OnDrawRefresh();
afx_msg void OnDrawZoomin();
afx_msg void OnDrawZoomnon();
afx_msg void OnDrawZoomout();
afx_msg void OnDrawZoompan();
afx_msg void OnZoomFullextent();
afx_msg void OnZoomNormal();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -