dofview.h
来自「《突破Visual C++.NET编程实例五十讲+源文件,初学者学习的好东东!」· C头文件 代码 · 共 81 行
H
81 行
// DofView.h : CDofView 类的接口
//
#if !defined(AFX_DOFVIEW_H__B2F72383_759B_11D3_ACC9_0080C8EBAE24__INCLUDED_)
#define AFX_DOFVIEW_H__B2F72383_759B_11D3_ACC9_0080C8EBAE24__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CDofView : public CView
{
protected: // 仅从序列化创建
CDofView();
DECLARE_DYNCREATE(CDofView)
// 属性
public:
CDofDoc* GetDocument();
CRect m_oldRect;
float m_fRadius;
CClientDC *m_pDC;
// 操作
public:
void Init();
BOOL bSetupPixelFormat(void);
void DrawScene(void);
// 操作
public:
// 重写
//{{AFX_VIRTUAL(CDofView)
public:
virtual void OnDraw(CDC* pDC); // 重写以绘制该视图
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
//实现
public:
virtual ~CDofView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// 生成的消息映射函数
protected:
//{{AFX_MSG(CDofView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG //DofView.cpp的调试版本
inline CDofDoc* CDofView::GetDocument()
{ return (CDofDoc*)m_pDocument; }
#endif
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DOFVIEW_H__B2F72383_759B_11D3_ACC9_0080C8EBAE24__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?