ex07_2view.h
来自「内容包括从VC++的基本范例到项目开发的许多典型的例子。是VC++初学者不可多得」· C头文件 代码 · 共 76 行
H
76 行
// Ex07_2View.h : interface of the CEx07_2View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_EX07_2VIEW_H__318B0CAD_A730_4178_BC64_F505682667DE__INCLUDED_)
#define AFX_EX07_2VIEW_H__318B0CAD_A730_4178_BC64_F505682667DE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CEx07_2View : public CScrollView
{
protected: // create from serialization only
CEx07_2View();
DECLARE_DYNCREATE(CEx07_2View)
// Attributes
public:
CEx07_2Doc* GetDocument();
// Operations
public:
enum{Line,Rectangle,Ellipse,Any}m_DrawType;
CPoint m_StartPt,m_OldPt;
BOOL m_bMouseDown;
HCURSOR m_hCursor;
CString m_strShow;
int m_nLine;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CEx07_2View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CEx07_2View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CEx07_2View)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in Ex07_2View.cpp
inline CEx07_2Doc* CEx07_2View::GetDocument()
{ return (CEx07_2Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EX07_2VIEW_H__318B0CAD_A730_4178_BC64_F505682667DE__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?