ActiveX


MyCtrlCtl.cpp - 2


// Event map

 

BEGIN_EVENT_MAP(CMyCtrlCtrl, COleControl)

//{{AFX_EVENT_MAP(CMyCtrlCtrl)

EVENT_CUSTOM("Select", FireSelect, VTS_BOOL)

EVENT_CUSTOM("Tick", FireTick, VTS_I4)

//}}AFX_EVENT_MAP

END_EVENT_MAP()

 

 

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

// Property pages

 

// TODO: Add more property pages as needed. Remember to increase the count!

BEGIN_PROPPAGEIDS(CMyCtrlCtrl, 3)

PROPPAGEID(CMyCtrlPropPage::guid)

PROPPAGEID(CLSID_CColorPropPage)

PROPPAGEID(CLSID_CFontPropPage)

END_PROPPAGEIDS(CMyCtrlCtrl)

 

 

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

// Initialize class factory and guid

 

IMPLEMENT_OLECREATE_EX(CMyCtrlCtrl, "MYCTRL.MyCtrlCtrl.1",

0x49e2f37f, 0xb48d, 0x11d3, 0xa2, 0xb0, 0, 0xa0, 0xc9, 0x55, 0xfa, 0x9e)

 

 

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

// Type library ID and version

 

IMPLEMENT_OLETYPELIB(CMyCtrlCtrl, _tlid, _wVerMajor, _wVerMinor)

 

 

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

// Interface IDs

 

const IID BASED_CODE IID_DMyCtrl =

{ 0x49e2f37d, 0xb48d, 0x11d3, { 0xa2, 0xb0, 0, 0xa0, 0xc9, 0x55, 0xfa, 0x9e } };

const IID BASED_CODE IID_DMyCtrlEvents =

{ 0x49e2f37e, 0xb48d, 0x11d3, { 0xa2, 0xb0, 0, 0xa0, 0xc9, 0x55, 0xfa, 0x9e } };

 

 

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

// Control type information

 

static const DWORD BASED_CODE _dwMyCtrlOleMisc =

OLEMISC_ACTIVATEWHENVISIBLE |

OLEMISC_SETCLIENTSITEFIRST |

OLEMISC_INSIDEOUT |

OLEMISC_CANTLINKINSIDE |

OLEMISC_RECOMPOSEONRESIZE;

 

IMPLEMENT_OLECTLTYPE(CMyCtrlCtrl, IDS_MYCTRL, _dwMyCtrlOleMisc)




- -  - -  - -