// TimerCtl.h : Declaration of the CTimerCtrl OLE control class.

/////////////////////////////////////////////////////////////////////////////
// CTimerCtrl : See TimerCtl.cpp for implementation.

class CTimerCtrl : public COleControl
{
	DECLARE_DYNCREATE(CTimerCtrl)

// Constructor
public:
	UINT m_Expiration;
	CTimerCtrl();
	UINT	m_TimerID ;

// Overrides

	// Drawing function
	virtual void OnDraw(
				CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);

	// Persistence
	virtual void DoPropExchange(CPropExchange* pPX);

	// Reset control state
	virtual void OnResetState();

// Implementation
protected:
	~CTimerCtrl();

	DECLARE_OLECREATE_EX(CTimerCtrl)    // Class factory and guid
	DECLARE_OLETYPELIB(CTimerCtrl)      // GetTypeInfo
	DECLARE_PROPPAGEIDS(CTimerCtrl)     // Property page IDs
	DECLARE_OLECTLTYPE(CTimerCtrl)		// Type name and misc status

// Message maps
	//{{AFX_MSG(CTimerCtrl)
	afx_msg void OnDestroy();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

// Dispatch maps
	//{{AFX_DISPATCH(CTimerCtrl)
	BOOL m_showSeconds;
	afx_msg void OnShowSecondsChanged();
	afx_msg void SetAlarm(long Delay);
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()

	afx_msg void AboutBox();

// Event maps
	//{{AFX_EVENT(CTimerCtrl)
	void FireAlarmExpired(long TicksNow)
		{FireEvent(eventidAlarmExpired,EVENT_PARAM(VTS_I4), TicksNow);}
	//}}AFX_EVENT
	DECLARE_EVENT_MAP()

// Dispatch and event IDs
public:
	enum {
	//{{AFX_DISP_ID(CTimerCtrl)
	dispidShowSeconds = 1L,
	dispidSetAlarm = 2L,
	eventidAlarmExpired = 1L,
	//}}AFX_DISP_ID
	};
};
