// Mfcactivex. IDL: Type Library source of the ActiveX control project. // This file will be processed by the midl compiler tool to // generate the Type Library (mfcactivex. TLB), this type of library will become // mfcactivex. OCX. # include <olectl. h> # include <idispids. h> [UUID (D3AAF2EE-E0B4-4526-910E-A246AF6E467E), version (1.0), helpfile ("mfcactivex. HLP "), helpstring (" mfcactivex ActiveX Control Module "), control] library mfcactivexlib {importlib (stdole_tlb); // cmfcactivexctrl master scheduling interface [UUID (UID ), helpstring ("scheduling interface of mfcactivex control")] dispinterface _ dmfcactivex {properties: Methods: [ID (dispid_aboutbox)] void aboutbox ();}; // cmfcactivexctrl's event scheduling interface [UUID (UID), helpstring ("mfcactivex control event interface")] dispinterface _ dmfcactivexevents {properties: Methods :}; // cmfcactivexctrl class information [UUID (E1437657-EDB0-4B8C-9BE5-B44C5F05C6C7), helpstring ("mfcactivex control"), control] coclass mfcactivex {[Default] dispinterface _ dmfcactivex; [default, source] dispinterface _ dmfcactivexevents;}; // The class generated by the class wizard above // The visible Enumeration type typedef [helpstring ("mfcactivex _ weekday Enum") that is manually added below "), v1_enum] Enum _ weekday {Sunday = 0, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday }_weekday ;};
// The Code header file generated by the Class Wizard when using the control in vs2008
# Pragma once // The computer generates the idispatch package class created by Microsoft Visual C ++ // Note: do not modify the content of this file. If this class is regenerated by // Microsoft Visual C ++, your modifications will be overwritten. //////////////////////////////////////// /// // Cmfcactivexctrl packaging class cmfcactivexctrl: public cwnd {protected: declare_dyncreate (region) Public: CLSID const & getclsid () {static CLSID const CLSID = {region, 0xedb0, 0x4b8c, {0x9b, 0xe5, 0xb4, 0x4c, 0x5f, 0x5, 0xc6, 0xc7 }}; return CLSID;} virtual bool create (lpctstr lpszclassname, lpctstr lpszwindowname, DWORD dwstyle, const rect & rect, cwnd * pparentwnd, uint NID, ccreatecontext * pcontext = NULL) {return createcontrol (getclsid (), lpszwindowname, dwstyle, rect, pparentwnd, NID);} bool create (lpctstr lpszwindowname, DWORD dwstyle, const rect & rect, cwnd * pparentwnd, uint NID, cfile * ppersist = NULL, bool bstorage = false, BSTR bstrlickey = NULL) {return createcontrol (getclsid (), lpszwindowname, dwstyle, rect, pparentwnd, NID, ppersist, bstorage, bstrlickey);} // attribute public: Enum {Sunday = 0, Monday = 1, Tuesday = 2, Wednesday = 3, thursday = 4, Friday = 5, Saturday = 6} _ weekday; // action public: // _ dmfcactivex // functions // void aboutbox () {invokehelper (dispid_aboutbox, dispatch_method, vt_empty, null, null);} // properties //};