drawingbox.h

来自「The application wizard has created this 」· C头文件 代码 · 共 52 行

H
52
字号
#pragma once
#include "afxwin.h"


// CDrawingBox dialog
class CDisplayer;
class CDrawingBox : public CDialog
{
	DECLARE_DYNAMIC(CDrawingBox)

public:
	CDrawingBox(CWnd* pParent,CDisplayer* pDisplayer);   // standard constructor
	virtual ~CDrawingBox();
	enum DrawType { DRAWNONE,DRAWPOINT,DRAWLINE,DRAWRECTANGLE,DRAWCIRCLE,DRAWSELECT } ;
// Dialog Data
	enum { IDD = IDD_DRAWINGDIALOG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
private:
	CDisplayer* _pDisplayer;
public:
	virtual BOOL OnInitDialog();
private:
	CButton _CircleButton;
	CButton _PointButton;
	CButton _LineButton;
	CButton _RectangleButton;
	CButton _ArrowHandButton;
	CButton _SelectButton;
	CBitmap _CircleBitmap;
	CBitmap _PointBitmap;
	CBitmap _LineBitmap;
	CBitmap _RectangleBitmap;
	CBitmap _ArrowHandBitmap;
	CBitmap _SelectBitmap;
	DrawType _DrawType;
public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnBnClickedArrowhand();
	afx_msg void OnBnClickedCircle();
	afx_msg void OnBnClickedLine();
	afx_msg void OnBnClickedPoint();
	afx_msg void OnBnClickedRectangle();
	afx_msg void OnBnClickedSelect();
	DrawType getDrawType() const { return _DrawType; }
protected:
	virtual void OnCancel();
};

⌨️ 快捷键说明

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