📄 drawingbox.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -