📄 xgridctrlctl.h
字号:
#if !defined(AFX_XGRIDCTRLCTL_H__80E6D134_E0E4_48E3_872D_07604B4D75F7__INCLUDED_)
#define AFX_XGRIDCTRLCTL_H__80E6D134_E0E4_48E3_872D_07604B4D75F7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// XGridCtrlCtl.h : Declaration of the CXGridCtrlCtrl ActiveX Control class.
/////////////////////////////////////////////////////////////////////////////
// CXGridCtrlCtrl : See XGridCtrlCtl.cpp for implementation.
class CXGridCtrlCtrl : public COleControl
{
DECLARE_DYNCREATE(CXGridCtrlCtrl)
// Constructor
public:
CXGridCtrlCtrl();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CXGridCtrlCtrl)
public:
virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
virtual void DoPropExchange(CPropExchange* pPX);
virtual void OnResetState();
//}}AFX_VIRTUAL
// Implementation
protected:
int onlinewidth; //一个小格的宽度
long pix_width; //支持的数据宽度
CString s_ghtext; //标题文字
COLORREF c_bkcolor; //背景颜色
COLORREF c_ghtextcolor; //标题头字体颜色
COLORREF c_numcolor; //数字的颜色
COLORREF c_glinecolor; //网格颜色
COLORREF c_gcurvecolor; //曲线颜色
long *gridData; //数据数组
long datalenth; //数组长度
long m_maxalarm; //报警上限
long m_minalarm; //报警下限
COLORREF c_alarmlinecolor; //报警网格颜色
protected:
~CXGridCtrlCtrl();
DECLARE_OLECREATE_EX(CXGridCtrlCtrl) // Class factory and guid
DECLARE_OLETYPELIB(CXGridCtrlCtrl) // GetTypeInfo
DECLARE_PROPPAGEIDS(CXGridCtrlCtrl) // Property page IDs
DECLARE_OLECTLTYPE(CXGridCtrlCtrl) // Type name and misc status
// Message maps
//{{AFX_MSG(CXGridCtrlCtrl)
// NOTE - ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Dispatch maps
//{{AFX_DISPATCH(CXGridCtrlCtrl)
afx_msg BOOL SetBackColor(long color);
afx_msg BOOL SetGHText(LPCTSTR text);
afx_msg BOOL SetGHTextColor(long color);
afx_msg BOOL SetNumColor(long color);
afx_msg BOOL SetGLineColor(long color);
afx_msg BOOL SetGCurveColor(long color);
afx_msg BOOL SetCurveDataA(long FAR* data, long length);
afx_msg long GetDataWidth();
afx_msg BOOL SetCurveDataOne(long data);
afx_msg void SetAlarmH(long hight);
afx_msg void SetAlarmL(long bottom);
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
afx_msg void AboutBox();
// Event maps
//{{AFX_EVENT(CXGridCtrlCtrl)
//}}AFX_EVENT
DECLARE_EVENT_MAP()
// Dispatch and event IDs
public:
enum {
//{{AFX_DISP_ID(CXGridCtrlCtrl)
dispidSetBackColor = 1L,
dispidSetGHText = 2L,
dispidSetGHTextColor = 3L,
dispidSetNumColor = 4L,
dispidSetGLineColor = 5L,
dispidSetGCurveColor = 6L,
dispidSetCurveDataA = 7L,
dispidGetDataWidth = 8L,
dispidSetCurveDataOne = 9L,
dispidSetAlarmH = 10L,
dispidSetAlarmL = 11L,
//}}AFX_DISP_ID
};
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_XGRIDCTRLCTL_H__80E6D134_E0E4_48E3_872D_07604B4D75F7__INCLUDED)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -