ActiveX


MyCtrlCtrl.h


#if !defined(AFX_MYCTRLCTL_H__49E2F38D_B48D_11D3_A2B0_00A0C955FA9E__INCLUDED_)

#define AFX_MYCTRLCTL_H__49E2F38D_B48D_11D3_A2B0_00A0C955FA9E__INCLUDED_

#if _MSC_VER > 1000

#pragma once

#endif // _MSC_VER > 1000

// MyCtrlCtl.h : Declaration of the CMyCtrlCtrl ActiveX Control class.

/////////////////////////////////////////////////////////////////////////////

// CMyCtrlCtrl : See MyCtrlCtl.cpp for implementation.

class CMyCtrlCtrl : public COleControl

{

DECLARE_DYNCREATE(CMyCtrlCtrl)

// Constructor

public:

CMyCtrlCtrl();

// Overrides

// ClassWizard generated virtual function overrides

//{{AFX_VIRTUAL(CMyCtrlCtrl)

public:

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

virtual void DoPropExchange(CPropExchange* pPX);

virtual void OnResetState();

//}}AFX_VIRTUAL

BOOL m_bSelected;

short m_nShape;

OLE_COLOR m_selectColor;

OLE_COLOR m_textColor;

long m_timeSleep;

UINT idTimer;

BOOL timerOn;

ULONG m_tick;

protected:

~CMyCtrlCtrl();

DECLARE_OLECREATE_EX(CMyCtrlCtrl) // Class factory and guid

DECLARE_OLETYPELIB(CMyCtrlCtrl) // GetTypeInfo

DECLARE_PROPPAGEIDS(CMyCtrlCtrl) // Property page IDs

DECLARE_OLECTLTYPE(CMyCtrlCtrl) // Type name and misc status

// Message maps

//{{AFX_MSG(CMyCtrlCtrl)

afx_msg void OnLButtonDown(UINT nFlags, CPoint point);

afx_msg void OnTimer(UINT nIDEvent);

afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);

afx_msg void OnClose();

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

// Dispatch maps

//{{AFX_DISPATCH(CMyCtrlCtrl)

afx_msg short GetShape();

afx_msg void SetShape(short nNewValue);




- -  - -  - -