⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dicectl.h

📁 我要下载源代码我要源代码我要下载代码我要下载源代码
💻 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 + -