?? dicectl.h
字號:
#if !defined(AFX_DICECTL_H__DEB79AEA_FB84_4DA5_972B_D39C41CB76B0__INCLUDED_)
#define AFX_DICECTL_H__DEB79AEA_FB84_4DA5_972B_D39C41CB76B0__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DiceCtl.h : Declaration of the CDiceCtrl ActiveX Control class.
/////////////////////////////////////////////////////////////////////////////
// CDiceCtrl : See DiceCtl.cpp for implementation.
class CDiceCtrl : public COleControl
{
DECLARE_DYNCREATE(CDiceCtrl)
// Constructor
public:
CDiceCtrl();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDiceCtrl)
public:
virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void DoPropExchange(CPropExchange* pPX);
virtual void OnResetState();
//}}AFX_VIRTUAL
// Implementation
protected:
~CDiceCtrl();
DECLARE_OLECREATE_EX(CDiceCtrl) // Class factory and guid
DECLARE_OLETYPELIB(CDiceCtrl) // GetTypeInfo
DECLARE_PROPPAGEIDS(CDiceCtrl) // Property page IDs
DECLARE_OLECTLTYPE(CDiceCtrl) // Type name and misc status
// Subclassed control support
BOOL IsSubclassedControl();
LRESULT OnOcmCommand(WPARAM wParam, LPARAM lParam);
// Message maps
//{{AFX_MSG(CDiceCtrl)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Dispatch maps
//{{AFX_DISPATCH(CDiceCtrl)
long m_rollingInterval;
afx_msg void OnRollingIntervalChanged();
OLE_COLOR m_ballColor;
afx_msg void OnBallColorChanged();
OLE_COLOR m_panelColor;
afx_msg void OnPanelColorChanged();
afx_msg void StartRolling(short max);
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
afx_msg void AboutBox();
// Event maps
//{{AFX_EVENT(CDiceCtrl)
void FireFinishRolling(short state)
{FireEvent(eventidFinishRolling,EVENT_PARAM(VTS_I2), state);}
//}}AFX_EVENT
DECLARE_EVENT_MAP()
// Dispatch and event IDs
public:
enum {
//{{AFX_DISP_ID(CDiceCtrl)
dispidRollingInterval = 1L,
dispidBallColor = 2L,
dispidPanelColor = 3L,
dispidStartRolling = 4L,
eventidFinishRolling = 1L,
//}}AFX_DISP_ID
};
long m_rollingSpan; //控件運動的時間間隔
time_t timeStart; //按下控件的開始時間
BOOL rolling; //控件是否在運動
BOOL index[3][3]; //控件上九個點的狀態
int state; //控件的當前點數
void UpdatePicture(void); //重新繪制控件
void UpdateState(); //更新控件的狀態(點數)
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DICECTL_H__DEB79AEA_FB84_4DA5_972B_D39C41CB76B0__INCLUDED)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -