您的位置:首页 >> 编程开发 >> Visual C++ >> COM技术 >> 正文
RSS
 

深入探索COM开发框架之MFC和ATL[四]

http://www.rdxx.com 02年05月06日 11:33 互联网 我要投稿

关键词: 框架 , ATL , MFC , 开发 , COM

static const AFX_DISPMAP* PASCAL _GetBaseDispatchMap(); \

       virtual const AFX_DISPMAP* GetDispatchMap() const; \

 

#else

#define DECLARE_DISPATCH_MAP() \

private: \

       static const AFX_DISPMAP_ENTRY _dispatchEntries[]; \

       static UINT _dispatchEntryCount; \

       static DWORD _dwStockPropMask; \

protected: \

       static AFX_DATA const AFX_DISPMAP dispatchMap; \

       virtual const AFX_DISPMAP* GetDispatchMap() const; \

#endif

------------------------------------------------------

#ifdef _AFXDLL

#define BEGIN_DISPATCH_MAP(theClass, baseClass) \

       const AFX_DISPMAP* PASCAL theClass::_GetBaseDispatchMap() \

                { return &baseClass::dispatchMap; } \

       const AFX_DISPMAP* theClass::GetDispatchMap() const \

                { return &theClass::dispatchMap; } \

       AFX_COMDAT const AFX_DISPMAP theClass::dispatchMap = \

                { &theClass::_GetBaseDispatchMap, &theClass::_dispatchEntries[0], \

                         &theClass::_dispatchEntryCount, &theClass::_dwStockPropMask }; \

       AFX_COMDAT UINT theClass::_dispatchEntryCount = (UINT)-1; \

       AFX_COMDAT DWORD theClass::_dwStockPropMask = (DWORD)-1; \

       AFX_COMDAT const AFX_DISPMAP_ENTRY theClass::_dispatchEntries[] = \

       { \

#else

#define BEGIN_DISPATCH_MAP(theClass, baseClass) \

       const AFX_DISPMAP* theClass::GetDispatchMap() const \

                { return &theClass::dispatchMap; } \

       AFX_COMDAT const AFX_DISPMAP theClass::dispatchMap = \

                { &baseClass::dispatchMap, &theClass::_dispatchEntries[0], \

                         &theClass::_dispatchEntryCount, &theClass::_dwStockPropMask }; \

       AFX_COMDAT UINT theClass::_dispatchEntryCount = (UINT)-1; \

       AFX_COMDAT DWORD theClass::_dwStockPropMask = (DWORD)-1; \

      

共5页  第1页 第2页 第3页 第4页 第5页

 
 
标签: 框架 , ATL , MFC , 开发 , COM 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站