📄 optionzone.h
字号:
// OptionZone.h: interface for the COptionZone class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_OPTIONZONE_H__FE0C5A82_8BD5_459C_8E3F_1BB6C265EA5F__INCLUDED_)
#define AFX_OPTIONZONE_H__FE0C5A82_8BD5_459C_8E3F_1BB6C265EA5F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
enum SELTYPE { SEL_NONE=0, SEL_PENWIDTH, SEL_RECTTYPE, SEL_PENTYPE, };
enum RECTTYPE { RECT_HOLLOW=0, RECT_SOLID, RECT_REGULAR, };
class COptionZone
{
public:
COptionZone();
COptionZone(const RECT& zone) { SetZone(zone); }
virtual ~COptionZone();
public:
void SetZone(const RECT& zone) { m_rcZone = zone; }
virtual void Draw(CDC* pDC);
void SetOptionType(SELTYPE type);
BOOL PointToOption(CPoint point); // FALSE means nothing be pointed.
SELTYPE GetOptionType() const { return m_emOptionType; }
int GetPenWidthSel() const { return m_nPenWidthCurSel; }
int GetRectTypeSel() const { return m_nRectTypeCurSel; }
protected:
void DrawPenWidthSel(CDC* pDC);
void DrawRectTypeSel(CDC* pDC);
void PointToPenWidthSel(CPoint point);
void PointToRectTypeSel(CPoint point);
void InitPenWidth();
void InitRectType();
protected:
CRect m_rcZone;
SELTYPE m_emOptionType;
// parameters about PenWidth SelBox
CRect* m_prcSelPenWidth;
int m_nPenRowSpace, m_nPenWidthSelNum, m_nPenWidthCurSel;
int m_nRectTypeCurSel, m_nRectTypeSelNum, m_nRectHeight;
CRect* m_prcSelRectType;
};
#endif // !defined(AFX_OPTIONZONE_H__FE0C5A82_8BD5_459C_8E3F_1BB6C265EA5F__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -