sketcherview.h

来自「学习 MFC 基本用法和功能 以及MFC工作原理」· C头文件 代码 · 共 64 行

H
64
字号
// sketcherView.h : CsketcherView 类的接口
//


#pragma once

class CEle;


class CsketcherView : public CView
{
protected: // 仅从序列化创建
	CsketcherView();
	DECLARE_DYNCREATE(CsketcherView)

// 属性
public:
	CsketcherDoc* GetDocument() const;

// 操作
public:

// 重写
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);

// 实现
public:
	virtual ~CsketcherView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// 生成的消息映射函数
protected:
	DECLARE_MESSAGE_MAP()
	CEle* m_pTempEle;
public:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
protected:
	CPoint m_FirPo;
	CPoint m_SecPo;
public:
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
public:
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
protected:
	CEle* CreateEle(void);	
};

#ifndef _DEBUG  // sketcherView.cpp 中的调试版本
inline CsketcherDoc* CsketcherView::GetDocument() const
   { return reinterpret_cast<CsketcherDoc*>(m_pDocument); }
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?