📄 fontcurvectl.h
字号:
#if !defined(AFX_FONTCURVECTL_H__07DD5C1D_3D6C_4899_8A1B_102C259251B5__INCLUDED_)
#define AFX_FONTCURVECTL_H__07DD5C1D_3D6C_4899_8A1B_102C259251B5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "..\include\CurvePara.h"
/////////////////////////////////////////////////////////////////////////////
// CFontCurveCtrl : See FontCurveCtl.cpp for implementation.
class CFontCurveCtrl : public COleControl
{
DECLARE_DYNCREATE(CFontCurveCtrl)
// Constructor
public:
CFontCurveCtrl();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFontCurveCtrl)
public:
virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
virtual void DoPropExchange(CPropExchange* pPX);
virtual void OnResetState();
//}}AFX_VIRTUAL
// Implementation
protected:
~CFontCurveCtrl();
BEGIN_OLEFACTORY(CFontCurveCtrl) // Class factory and guid
virtual BOOL VerifyUserLicense();
virtual BOOL GetLicenseKey(DWORD, BSTR FAR*);
END_OLEFACTORY(CFontCurveCtrl)
DECLARE_OLETYPELIB(CFontCurveCtrl) // GetTypeInfo
DECLARE_PROPPAGEIDS(CFontCurveCtrl) // Property page IDs
DECLARE_OLECTLTYPE(CFontCurveCtrl) // Type name and misc status
// Message maps
//{{AFX_MSG(CFontCurveCtrl)
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Dispatch maps
//{{AFX_DISPATCH(CFontCurveCtrl)
afx_msg void SetBackColor(OLE_COLOR backColor);
afx_msg void SetGridLineColor(OLE_COLOR gridlineColor);
afx_msg void SetGridColor(OLE_COLOR gridColor);
afx_msg void SetGridHoriNum(short horiNum);
afx_msg void SetGridVerNum(short verNum);
afx_msg void SetGridShowType(short showType);
afx_msg void SetGridDrawType(short drawType);
afx_msg BOOL ShowGridData(BSTR FAR* pInData, short nWidth, short nHeight, short nShowType = GRID_SHOW_POS_HORI);
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
// Event maps
//{{AFX_EVENT(CFontCurveCtrl)
//}}AFX_EVENT
DECLARE_EVENT_MAP()
// Dispatch and event IDs
public:
enum {
//{{AFX_DISP_ID(CFontCurveCtrl)
dispidSetBackColor = 1L,
dispidSetGridLineColor = 2L,
dispidSetGridColor = 3L,
dispidSetGridHoriNum = 4L,
dispidSetGridVerNum = 5L,
dispidSetGridShowType = 6L,
dispidSetGridDrawType = 7L,
dispidShowGridData = 8L,
//}}AFX_DISP_ID
};
private:
//作为控件属性进行外部设置
COLORREF m_colorBackGround;
COLORREF m_colorGridLine;
COLORREF m_colorGrid;
int m_nGridHeightNum; //底板垂直方格数
int m_nGridWidthNum; //底板水平方格数
int m_nGridLineWidth; //方格线宽
int m_nGridShowType; //水平显示还是垂直显示
int m_nGridDrawType; //是画矩形区域还是画圆形区域
//作为优化使用的属性
CGridList m_gridList; //方格队列
BYTE m_byShowBuf[GRID_SHOW_BUF_LEN]; //存放方格的数据队列
int m_nGridShowWidth; //要显示的水平方格数
int m_nGridShowHeight; //要显示的纵向方格数
private:
bool DrawGrid(CDC * pDC, CRect &rc);
bool FillGrid(CDC * pDC, CRect &rc, COLORREF color, int nDrawType = GRID_DRAW_RECT);
bool FreeAllResource();
bool JudgeGridNum();
public:
bool ShowData(BYTE * pInData, int nWidth, int nHeight, int nShowType = GRID_SHOW_POS_HORI);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FONTCURVECTL_H__07DD5C1D_3D6C_4899_8A1B_102C259251B5__INCLUDED)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -