📄 multiboardctl.h
字号:
#if !defined(AFX_MULTIBOARDCTL_H__BDA0E328_C822_4F37_96FA_96D018262697__INCLUDED_)
#define AFX_MULTIBOARDCTL_H__BDA0E328_C822_4F37_96FA_96D018262697__INCLUDED_
#include "SingleBoard.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MultiBoardCtl.h : Declaration of the CMultiBoardCtrl ActiveX Control class.
/////////////////////////////////////////////////////////////////////////////
// CMultiBoardCtrl : See MultiBoardCtl.cpp for implementation.
class CMultiBoardCtrl : public COleControl
{
DECLARE_DYNCREATE(CMultiBoardCtrl)
// Constructor
public:
CMultiBoardCtrl();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMultiBoardCtrl)
public:
virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
virtual void DoPropExchange(CPropExchange* pPX);
virtual void OnResetState();
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
//}}AFX_VIRTUAL
// Implementation
protected:
~CMultiBoardCtrl();
DECLARE_OLECREATE_EX(CMultiBoardCtrl) // Class factory and guid
DECLARE_OLETYPELIB(CMultiBoardCtrl) // GetTypeInfo
DECLARE_PROPPAGEIDS(CMultiBoardCtrl) // Property page IDs
DECLARE_OLECTLTYPE(CMultiBoardCtrl) // Type name and misc status
// Message maps
//{{AFX_MSG(CMultiBoardCtrl)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnDestroy();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Dispatch maps
//{{AFX_DISPATCH(CMultiBoardCtrl)
OLE_COLOR m_colorBackground;
afx_msg void OnColorBackgroundChanged();
short m_marginLeft;
afx_msg void OnMarginLeftChanged();
short m_marginTop;
afx_msg void OnMarginTopChanged();
short m_marginBottom;
afx_msg void OnMarginBottomChanged();
OLE_HANDLE m_reshInst;
afx_msg void OnReshInstChanged();
afx_msg void SetBoardNum(short nBoardNum);
afx_msg short GetBoardNum();
afx_msg void SetBoardWidth(short nBoardWidth);
afx_msg short GetBoardWidth();
afx_msg void SetSpace(short nSpace);
afx_msg short GetSpace();
afx_msg void SetBoardText(short nBoardID, LPCTSTR strText);
afx_msg void SetBoardIcon(short nBoardID, short hIconID);
afx_msg void SetBoardIconWidth(short nWidth);
afx_msg short GetBaordIconWidth();
afx_msg short GetBoardIconHeight();
afx_msg void SetBoardIconHeight(short nHeight);
afx_msg void SetBoardCircle(short nBoardID, OLE_COLOR crColor);
afx_msg OLE_COLOR GetBoardCircle(short nBoardID);
afx_msg short GetBoardState(short nBoardID);
afx_msg void SetBoardState(short nBoardID, short nState);
afx_msg short GetBoardIconID(short nBoardID);
afx_msg BSTR GetBoardText(short nBoardID);
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
afx_msg void AboutBox();
// Event maps
//{{AFX_EVENT(CMultiBoardCtrl)
void FireBoardLClick(long nFlags, short nBoardID, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
{FireEvent(eventidBoardLClick,EVENT_PARAM(VTS_I4 VTS_I2 VTS_XPOS_PIXELS VTS_YPOS_PIXELS), nFlags, nBoardID, x, y);}
void FireBoardMouseMove(long nFlags, short nBoardID, OLE_XPOS_PIXELS x, OLE_YPOS_PIXELS y)
{FireEvent(eventidBoardMouseMove,EVENT_PARAM(VTS_I4 VTS_I2 VTS_XPOS_PIXELS VTS_YPOS_PIXELS), nFlags, nBoardID, x, y);}
//}}AFX_EVENT
DECLARE_EVENT_MAP()
// Dispatch and event IDs
public:
void Display(CDC *pDC);
enum {
//{{AFX_DISP_ID(CMultiBoardCtrl)
dispidColorBackground = 1L,
dispidMarginLeft = 2L,
dispidMarginTop = 3L,
dispidMarginBottom = 4L,
dispidReshInst = 5L,
dispidSetBoardNum = 6L,
dispidGetBoardNum = 7L,
dispidSetBoardWidth = 8L,
dispidGetBoardWidth = 9L,
dispidSetSpace = 10L,
dispidGetSpace = 11L,
dispidSetBoardText = 12L,
dispidSetBoardIcon = 13L,
dispidSetBoardIconWidth = 14L,
dispidGetBaordIconWidth = 15L,
dispidGetBoardIconHeight = 16L,
dispidSetBoardIconHeight = 17L,
dispidSetBoardCircle = 18L,
dispidGetBoardCircle = 19L,
dispidGetBoardState = 20L,
dispidSetBoardState = 21L,
dispidGetBoardIconID = 22L,
dispidGetBoardText = 23L,
eventidBoardLClick = 1L,
eventidBoardMouseMove = 2L,
//}}AFX_DISP_ID
};
private:
BOOL m_bSelBoard;
void DrawBoardIcon(CDC *pDC,short nBoardID);
void DrawBoardText(CDC *pDC,short nBoardID);
void DrawBoardCircle(CDC *pDC,short nBoardID);
short m_iBoardIconHeight;
short m_iBoardIconWidth;
int m_iSelBoardID;
int HitTestEx(const CPoint & point, int &index);
CSingleBoard *m_pSingleBoard;
int m_iSpace;//每个板之间的距离
int m_iBoardWidth;//每个板的宽度
int m_iBoardNum;//板的数目
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MULTIBOARDCTL_H__BDA0E328_C822_4F37_96FA_96D018262697__INCLUDED)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -