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);


            afx_msg BOOL GetSelected();

            afx_msg OLE_COLOR GetSelectColor();

            afx_msg void SetSelectColor(OLE_COLOR nNewValue);

            afx_msg OLE_COLOR GetTextColor();

            afx_msg void SetTextColor(OLE_COLOR nNewValue);

            afx_msg long GetSleep();

            afx_msg void SetSleep(long nNewValue);

            afx_msg BOOL DoChangeTimer();

            //}}AFX_DISPATCH

            DECLARE_DISPATCH_MAP()

            afx_msg void AboutBox();

// Event maps

            //{{AFX_EVENT(CMyCtrlCtrl)

            void FireSelect(BOOL IsSelected)

                        {FireEvent(eventidSelect,EVENT_PARAM(VTS_BOOL), IsSelected);}

            void FireTick(long ltick)

                        {FireEvent(eventidTick,EVENT_PARAM(VTS_I4), ltick);}

            //}}AFX_EVENT

            DECLARE_EVENT_MAP()

// Dispatch and event IDs

public:

            enum {

            //{{AFX_DISP_ID(CMyCtrlCtrl)

            dispidShape = 1L,

            dispidSelected = 2L,

            dispidSelectColor = 3L,

            dispidTextColor = 4L,

            dispidSleep = 5L,

            dispidDoChangeTimer = 6L,

            eventidSelect = 1L,

            eventidTick = 2L,

            //}}AFX_DISP_ID

            };

};

//{{AFX_INSERT_LOCATION}}

// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MYCTRLCTL_H__49E2F38D_B48D_11D3_A2B0_00A0C955FA9E__INCLUDED)


Ñîäåðæàíèå ðàçäåëà