CCMDTARGET

xiaoxiao2021-03-06  42

// This is a part of the Microsoft Foundation Classes C library.// Copyright (C) 1992-1998 Microsoft Corporation // All rights reserved.//// This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference And Related // Electronic Documentation Provided with The Library.// See Sources for Detailed Information Regarding The // Microsoft Foundation Classes ProducT.

#include "stdafx.h" #include "occimpl.h"

#ifdef AFX_CORE1_SEG # prgma code_seg (AFX_CORE1_SEG) #ENDIF

#ifdef _debug # undef this_filestatic char this_file [] = __file __; # Endif

#define new debug_new

/// ccmdtarget construction / destruction

CCMDTARGET :: ccmdtarget () {// capture module state where object Was constructed # ifdef _afxdll m_pmodulestate = AFXGETModuLestate (); assert (m_pmodulestate! = Null); # ENDIF

// initialize state # ifndef _AFX_NO_OLE_SUPPORT m_dwRef = 1; m_pOuterUnknown = NULL; m_xInnerUnknown = 0; m_xDispatch.m_vtbl = 0; m_bResultExpected = TRUE; m_xConnPtContainer.m_vtbl = 0; #endif}

CCmdTarget :: ~ CCmdTarget () {# ifndef _AFX_NO_OLE_SUPPORT if (m_xDispatch.m_vtbl = 0!) ((COleDispatchImpl *) & m_xDispatch) -> Disconnect (); ASSERT (m_dwRef <= 1); # endif # ifdef _AFXDLL m_pModuleState = NULL; #ndif}

/// ccmdtarget Windows Message Dispatching

AFX_STATIC BOOL AFXAPI _AfxDispatchCmdMsg (CCmdTarget * pTarget, UINT nID, int nCode, AFX_PMSG pfn, void * pExtra, UINT nSig, AFX_CMDHANDLERINFO * pHandlerInfo) // return TRUE to stop routing {ASSERT_VALID (pTarget); UNUSED (nCode); // unused In Release Builds

Union MessageMapFunctions MMF; MMF.PFN = PFN; Bool Bresult = true; // default is OK

IF (PHANDLERINFO! = NULL) {// Just Fill in The Information, Don't do it phandlerinfo-> ptarget = ptarget; phandlerinfo-> pmf = mmf.pfn; return true;} switch (nsig) {CASE AFXSIG_VV: / / NORMAL Command or Control Notification Assert (cn_command == 0); // CN_COMMAND SAME AS BN_CLICKED Assert (pextra == null); (PTARGET -> * mmf.pfn_command) (); Break;

Case AFXSIG_BV: // Normal Command OR Control Notification Assert (CN_COMMAND == 0); // CN_COMMAND SAME AS BN_CLICKED Assert (pextra == NULL); BRESULT = (PTARGET -> * mmf.pfn_bcommand) (); Break;

case AfxSig_vw: // normal command or control notification in a range ASSERT (CN_COMMAND == 0); // CN_COMMAND same as BN_CLICKED ASSERT (pExtra == NULL); (pTarget -> * mmf.pfn_COMMAND_RANGE) (nID); break;

Case AFXSIG_BW: // Extended Command (PASSED ID, RETURns BCONTINUE) ASSERT (pextra == null); BRESULT = (PTARGET -> * MMF.PFN_COMMAND_EX) (NID); Break;

case AfxSig_vNMHDRpl: {AFX_NOTIFY * pNotify = (AFX_NOTIFY *) pExtra; ASSERT (! pNotify = NULL); ASSERT (! pNotify-> pResult = NULL); ASSERT (pNotify-> pNMHDR = NULL!); (pTarget -> * mmf .pfn_NOTIFY) (pNotify-> pNMHDR, pNotify-> pResult);} break; case AfxSig_bNMHDRpl:! {AFX_NOTIFY * pNotify = (AFX_NOTIFY *) pExtra; ASSERT (pNotify = NULL); ASSERT (pNotify-> pResult = NULL)! ; ASSERT (pNotify-> pNMHDR = NULL!); bResult = (pTarget -> * mmf.pfn_bNOTIFY) (pNotify-> pNMHDR, pNotify-> pResult);} break; case AfxSig_vwNMHDRpl: {AFX_NOTIFY * pNotify = (AFX_NOTIFY *) Pextra; assert (pNOTIFY! = null); assert (pNOTIFY-> PRESULT! = null); assert (pNOTIFY-> PNMHDR! = null); (ptarget -> * mmf.pfn_notify_range) (NID, PNOTIFY-> PNMHDR, PNOTIFY !!! -> pResult);} break; case AfxSig_bwNMHDRpl: {AFX_NOTIFY * pNotify = (AFX_NOTIFY *) pExtra; ASSERT (pNotify = NULL); ASSERT (pNotify-> pResult = NULL); ASSERT (pNotify-> pNMHDR = NULL ); BRESULT = (PTARGET -> * mmf.pfn_notify_ex) (NID, PNOTIFY-> PNMHDR, PNOTIF y-> pResult);} break; case AfxSig_cmdui: {// ON_UPDATE_COMMAND_UI or ON_UPDATE_COMMAND_UI_REFLECT case ASSERT (CN_UPDATE_COMMAND_UI == (UINT) -1); ASSERT (nCode == CN_UPDATE_COMMAND_UI || nCode == 0xFFFF); ASSERT (pExtra =! NULL); CCmdUI * pCmdUI = (CCmdUI *) pExtra; ASSERT (pCmdUI-> m_bContinueRouting); // idle - not set (pTarget -> * mmf.pfn_UPDATE_COMMAND_UI) (pCmdUI);!! bResult = pCmdUI-> m_bContinueRouting; pCmdUI -> m_bcontinuerouting = false; // go back to idle} Break;

case AfxSig_cmduiw: {// ON_UPDATE_COMMAND_UI case ASSERT (nCode == CN_UPDATE_COMMAND_UI); ASSERT (pExtra = NULL!); CCmdUI * pCmdUI = (CCmdUI *) pExtra; ASSERT (pCmdUI-> m_nID == nID); // sanity assert ASSERT (! pCmdUI-> m_bContinueRouting); // idle - not set (pTarget -> * mmf.pfn_UPDATE_COMMAND_UI_RANGE) (pCmdUI, nID);! bResult = pCmdUI-> m_bContinueRouting; pCmdUI-> m_bContinueRouting = FALSE; // go back to idle } Break; // General Extensibility Hooks Case AfXSIG_VPV: (PTARGET -> * MMF.PFN_OTHER) (PEXTRA); Break; Case AFXSIG_BPV: BRESULT = (PTARGET -> * MMF.PFN_OTHER_EX) (PEXTRA); Break;

Default: // illegal assert (false);} return bresult;}

// Compare Two Pointers to Guids - True IF Both Pointers Are Null // OR Both Pointers Point To Same Guid; False Otherwise

#define ISEqualnullguid (Pguid1, Pguid2) / ((pguid1) == Null && (Pguid2) == NULL) || / ((pguid1)! = null && (pguid2)! = null&& / ISEqualguid (* (pguid1) , * (pguid2))))))))))))))))))))

BOOL CCmdTarget :: OnCmdMsg (UINT nID, int nCode, void * pExtra, AFX_CMDHANDLERINFO * pHandlerInfo) {# ifndef _AFX_NO_OCC_SUPPORT // OLE control events are a special case if (nCode == CN_EVENT) {ASSERT (afxOccManager = NULL!); Return Afxoccmanager-> Onevent (this, NID, (AFX_EVENT *): PHANDLERINFO);} #ENDIF / /! _AFX_NO_OCC_SUPPORT

// DETERMINE THE Message Number and code (Packed INTO NCODE) Const AFX_MSGMAP * PMESSAGEMAP; const AFX_MSGMAP_ENTRY * LPENTRY; UINT NMSG = 0;

#ifndef _afx_no_docobject_supportiff {bool BRESULT = FALSE

Const AFX_OLECMDMAP * POLECOMMANDMAP; const AFX_OLECMDMAP_ENTRY * PENTRY

COleCmdUI * pUI = (COleCmdUI *) pExtra; const GUID * pguidCmdGroup = pUI-> m_pguidCmdGroup; #ifdef _AFXDLL for (pOleCommandMap = GetCommandMap ();! POleCommandMap = NULL && bResult;! POleCommandMap = pOleCommandMap-> pfnGetBaseMap ()) # else for (pOleCommandMap = GetCommandMap ();! pOleCommandMap = NULL && bResult;! pOleCommandMap = pOleCommandMap-> pBaseMap) #endif {for (pEntry = pOleCommandMap-> lpEntries;! pEntry-> cmdID = 0 && pEntry-> nID = 0! &&! BRESULT; PENTRY ) {IF (NID == PENTRY-> CMDID && ISEqualnullguid (pguidcmdgroup, puntry-> pguid)) {pui-> m_nid = pentry-> nid; BRESULT = true;}}}

Return BRESULT;} #ENDIF

IF (ncode! = cn_update_command_ui) {nmsg = HiWord (ncode); ncode = loword (ncode);

// for backward compatibility half == 0 IS WM_COMMAND IF (NMSG == 0) NMSG = WM_COMMAND;

// look through message map to see if it applies to us # ifdef _AFXDLL for (pMessageMap = GetMessageMap ();! PMessageMap = NULL; pMessageMap = (* pMessageMap-> pfnGetBaseMap) ()) # else for (pMessageMap = GetMessageMap () !; pMessageMap = NULL; pMessageMap = pMessageMap-> pBaseMap) #endif {// Note: (!! CMyClass, CMyClass) # ifdef _AFXDLL ASSERT (pMessageMap = (* pMessageMap-> pfnGetBaseMap) catches BEGIN_MESSAGE_MAP ()); # else ASSERT (pMessageMap! = pimentagemap-> pbasemap); # Endif

lpEntry = AfxFindMessageEntry (pMessageMap-> lpEntries, nMsg, nCode, nID); if (! lpEntry = NULL) {// found it # ifdef _DEBUG if (afxTraceFlags & traceCmdRouting) {if (nCode == CN_COMMAND) {TRACE2 ( "SENDING command id 0x% 04X to% hs target./n ", nID, GetRuntimeClass () -> m_lpszClassName);} else if (nCode> CN_COMMAND) {if (afxTraceFlags & traceWinMsg) {TRACE3 (" SENDING control notification% d from control ID 0X% 04X to% HS WINDOW./N ", Ncode, NID, getRuntimeclass () -> m_lpszclassname);}}} #ENDIF / / / _ Debug Return_AFXDispatchCMDMDMSG (this, NID, NCODE, LPENTRY-> PFN, Pextra, LPENTRY -> nsig, phandlerinfo;}} Return false; // not handled} /// hook to disable automation handlers

#ifndef _AFX_NO_OLE_SUPPORT

Bool ccmdtarget :: isinvokeAllowed (Dispid) {Return True; // Normally, Invoke is always allowed}

#ndif //! _afx_no_ole_support

/// stubs for ole type library functions

#ifndef _AFX_NO_OLE_SUPPORT

Bool ccmdtarget :: getDispatchiid (iid *) {// Subclass Must Implement (Typical Via Colecontrol Implement) Return False;

Uint ccmdtarget :: gettypeInfocount () {// Subclass Must Implement (Typical Via Implement_oletypelib macro) Return 0;}

CTYPELIBCACHE * CCMDTARGET :: GetTypeLibcache () {// Subclass Must Implement (Typically Via Implement_oletypelib macro) Return NULL;}

HRESULT CCMDTARGET :: GETTYPELIB (LCID, LPTYPELIB *) {// Subclass Must Implement (Typical Via Implement_oletypement (type) Return Type_e_cantloadLibrary;}

#ndif //! _afx_no_ole_support

/// ccmdtarget routines That Delegate to the WinApp

void CCmdTarget :: BeginWaitCursor () {AfxGetApp () -> DoWaitCursor (1);} void CCmdTarget :: EndWaitCursor () {AfxGetApp () -> DoWaitCursor (-1);} void CCmdTarget :: RestoreWaitCursor () {AfxGetApp () -> DOWAITCURSOR (0);} // Root of Message Maps

CONST AFX_DATADEF AFX_MSGMAP CCMDTARGET :: MessageMap = {# IFDEF _AFXDLL & CCMDTARGET :: _ getBaseMessageMap, # else null, # endif & ccmdtarget :: _ MessageEntries [0]};

#ifdef _AFXDLLCONST AFX_MSGMAP * CCMDTTARGET :: _ getBaseMessageMap () {return null;} # ENDIF

Const AFX_MSGMAP * CCMDTARGET :: GetMessageMap () const {return & ccmdtarget :: messageMap;

Const AFX_MSGMAP_ENTRY CCMDTARGET :: _ MessageEntries [] = {{0, 0, AFXSIG_END, 0} // Nothing Here};

/// Root of Dispatch Maps

#ifndef _AFX_NO_OLE_SUPPORT

Uint ccmdtarget :: _ dispatchenTrycount = (uint) -1; dWord ccmdtarget :: _ dwstockpropmask = (dword) -1;

const AFX_DISPMAP CCmdTarget :: dispatchMap = {# ifdef _AFXDLL & CCmdTarget :: _ GetBaseDispatchMap, # else NULL, # endif & CCmdTarget :: _ dispatchEntries [0], & CCmdTarget :: _ dispatchEntryCount, & CCmdTarget :: _ dwStockPropMask};

#ifdef _AFXDLLCONST AFX_DISPMAP * CCMDTARGET :: _ getBaseDispatchMap () {Return Null;} # ENDIF

Const AFX_DISPMAP * CCMDTARGET :: getDispatchmap () const {return & ccmdtarget :: dispatchmap;

Const AFX_DISPMAP_ENTRY CCMDTARGET: :: _ dispatchentries [] = {null, -1, null, 0, (AFX_PMSG) NULL, (AFX_PMSG) NULL, (SIZE_T) -1, AfxDispcustom} // Nothing Here};

#ndif //! _AFX_NO_OLE_SUPPORT

/// Root of Event Sink Maps

#ifndef _AFX_NO_OCC_SUPPORT

Uint ccmdtarget :: _ eventsinkentrycount = (uint) -1;

const AFX_EVENTSINKMAP CCmdTarget :: eventsinkMap = {# ifdef _AFXDLL & CCmdTarget :: _ GetBaseEventSinkMap, # else NULL, # endif & CCmdTarget :: _ eventsinkEntries [0], & CCmdTarget :: _ eventsinkEntryCount}; # ifdef _AFXDLLconst AFX_EVENTSINKMAP * CCmdTarget :: _ GetBaseEventSinkMap () {return NULL } # ENDIF

Const AFX_EventsinkMap * ccmdtarget :: getEventsinkMap () const {return & ccmdtarget :: eventsinkmap;

Const AFX_EventsinkMap_ENTRY CCMDTARGET::: {NULL, -1, NULL, 0, (AFX_PMSG) NULL, (AFX_PMSG) NULL, (SIZE_T) -1, AFXDISPCUSTOM, (UINT) -1, (uint) -1} // Nothing here};

#ENDIF / /! _ AFX_NO_OCC_SUPPORT

/// Root of Interface Maps

#ifndef _AFX_NO_OLE_SUPPORT

#ifdef _afxdllconst AFX_INTERFACEMAP * CCMDTTARGET :: _ getBaseInterfaceMap () {Return Null;} # ENDIF

Const AFX_INTERFACEMAP * CCMDTARGET :: GetInterfaceMap () const {return & ccmdtarget :: interfacemap;}

Const AFX_INTERFACEMAP CCMDTARGET :: Interfacemap = {# neydef _afxdll & ccmdtarget :: _ getBaseInterfaceMap, # Else Null, # endif & ccmdtarget :: _ interfaceEntries [0]};

const AFX_INTERFACEMAP_ENTRY CCmdTarget :: _ interfaceEntries [] = {# ifndef _AFX_NO_OLE_SUPPORT INTERFACE_PART (CCmdTarget, IID_IDispatch, Dispatch) #endif {NULL, (size_t) -1} // end of entries};

Void ccmdtarget :: onfinalrelease () {# iFNDef _afx_no_ole_support AfxLockGlobals (crit_typelibcache);

// Release the Typelib Cache, IF any ctypelibcache * ptypelibcache = gettypelibcache (); if (ptypelibcache! = null) ptypelibcache-> unlock ();

AFXUNLOCKGLOBALS (crit_typelibcache); # ipif

DELETE this;

Bool ccmdtarget :: oncreateaggregates () {return true;}

LPunknown CCMDTARGET :: GetInterfaceHook (const void *) {return null;}

#ndif //! _AFX_NO_OLE_SUPPORT

/// Root of Connection Maps

#ifndef _afx_no_ole_support # ifdef _AFXDLLCONST AFX_CONNECTIONMAP * CCMDTARGET :: _ getBaseConnectionMap () {Return null;} # ENDIF

Const AFX_CONNECTIONMAP * CCMDTARGET :: GetConnectionMap () const {return & ccmdtarget :: connectionMap;

Const AFX_CONNECTIONMAP CCMDTARGET :: ConnectionMap = {# IFDEF _AFXDLL & CCMDTTARGET :: _ getBaseConnectionMap, # else null, # endif & ccmdtarget :: _ connectionsNTries [0]};

Const AFX_CONNECTIONMAP_ENTRY CCMDTARGET :: _ ConnectionNtries [] = {{NULL, (SIZE_T) -1} // end of entries};

LPCONNECTIONPOINT CCMDTARGET :: getConnectionHook (const Iid&) {return null;}

Bool ccmdtarget :: getExtraconnectionPoints (cptrarray *) {returnaf

#ndif //! _AFX_NO_OLE_SUPPORT

/// Root of Command Target Maps

#ifndef _afx_no_docObject_support

#ifdef _afxdllconst AFX_OLECMDMAP * CCMDTARGET :: _ getBaseCommandMap () {Return null;} # ENDIF

CONST AFX_OLECMDMAP CCMDTARGET :: CommandMap = {# ifdef _afxdll & ccmdtarget :: _ getBaseCommandmap, # else null, # endif & ccmdtarget :: _ Commandentries [0]};

Const AFX_OLECMDMAP_ENTRY CCMDTARGET :: _ Commandentries [] = {NULL, 0, 0} // end of entries};

Const AFX_OLECMDMAP * CCMDTARGET :: getcommandmap () const {return & ccmdtarget :: commmandmap;

#ENDIF /! _ AFX_NO_DOCOBJECT_SUPPORT

/// Special Access to View Routing Info

CView * ccmdtarget :: getRoutingView () {return getRoutingView_ ();

CframeWnd * ccmdtatarget :: getRoutingFrame () {return getRoutingFrame_ ();

/// ccmdui - user interface for a commnd

// ccmdui is a protocol class for all command handler variants // ccmdui is an enMplementation class for menus and general dialog // controls (Usually Buttons)

CCmdUI :: CCmdUI () {// zero out everything m_nID = m_nIndex = m_nIndexMax = 0; m_pMenu = m_pSubMenu = m_pParentMenu = NULL; m_pOther = NULL; m_bEnableChanged = m_bContinueRouting = FALSE;} // default CCmdUI implementation only works for Menu Itemsvoid CCmdUI :: Enable (BOOL BON) {IF (m_pmenu! = Null) {if (m_psubmenu! = Null) Return; // Don't change Popup Menus Indirectly

ASSERT (m_nIndex EnableMenuItem (m_nIndex, MF_BYPOSITION | (bOn MF_ENABLED:? (MF_DISABLED | MF_GRAYED)));!} Else {// enable / disable a control (ie child window) ASSERT (m_pOther = NULL );

// if Control Has The Focus, Move The Focus Before Disablingiff () == m_pother-> m_hwnd) M_Pother-> getParent () -> getnextdlgtabItem (m_pother) -> setfocus (); m_pother-> enableWindow (BON);} m_benablechanged = true;

Void ccmdui :: setCheck (int ncheck) {if (m_pmenu! = null) {if (m_psubmenu! = null) return; // don't change Popup Menus Indirectly

// place checkmark next to menu item ASSERT (m_nIndex CheckMenuItem (m_nIndex, MF_BYPOSITION | (nCheck MF_CHECKED:? MF_UNCHECKED));} else {// we can only check buttons or controls acting like buttons ASSERT ( m_pother! = null; if (m_pother-> sendMessage (wm_getdlgcode) & dlgc_button) m_pother-> sendMessage (BM_SETCHECK, NCHECK); // Otherwise ignore it}}

AFX_STATIC VOID AFXAPI _AFXLOADDOTBITMAP (); // for swap tuning

Void ccmdui :: setCheck (BOOL BON) {setcheck (bon? 1: 0); // this default works for MOST THINGS AS Well if (m_pmenu! = null) {if (m_psubmenu! = null) return; // DON ' T Change Popup Menus Indirectly

// for Menu Item - Use Dot Instead of Checkmark Assert (m_nIndex

IF (afxdata.hbmmenudot == null) _AFXLoadDotbitmap (); // in init segment

IF (AFXData.hbmmenudot! = null) setmenuitembitmaps (m_pMenu-> m_hmenu, m_nIndex, mf_byposition, null, afxdata.hbmmenudot);}}

Void ccmdui :: setText (lpctstr lpsztext) {assert (lpsztext! = null); Assert (AFXSVALIDSTRING (LPSZTEXT));

IF (m_pmenu! = null) {if (m_psubmenu! = null) return; // don't change popup menus indirectly

// Get Current Menu State So It Doesn't change uint nState = m_pmenu-> getmenusTate (m_nIndex, mf_byposition); nState & = ~ (MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR);

// set menu text ASSERT (m_nIndex ModifyMenu (m_nIndex, MF_BYPOSITION | MF_STRING | nState, m_nID, lpszText));} else {ASSERT (! M_pOther = NULL); AfxSetWindowText (m_pOther-> m_hWnd , lpsztext);}}

Bool ccmdui :: doupdate (ccmdtarget * ptarget, bool bdisableifnohndler) {ask_VALID (PTARGET);

IF (m_nid == 0 || loword (m_nid) == 0xfff) return true; // ignore invalid IDS

m_benablechanged = false; bool bresult = ptarget-> oncmdmsg (m_nid, cn_update_command_ui, this, null); if (! bresult) Assert (! m_benablechanged); // not routed

IF (bdisableifnohndler &&! m_benablechanged) {afx_cmdhandlerinfo info; info.ptarget = null; bool bhandler = ptarget-> oncmdmsg (m_nid, cn_command, this, & info);

#ifdef _debug f ((AfxTraceflags & Tracecmdrouting) &&! bhandler) Trace1 ("No Handler for Command ID 0x% 04X, Disabling It./N", M_NID); # endif // enable or disable based on WHether the a handler There enable (bhandler);} Return BRESULT;} /// Special Init

#ifdef AFX_INIT_SEG # prgma code_seg (AFX_INIT_SEG) #ENDIF

AFX_STATIC_DATA const byte _afxdot [] = {0x6, 0xF, 0xF, 0xF, 0x6}; // Simple Byte Bitmap, 1 => Bit on # define dot_width 4 # define dot_height 5

AFX_STATIC void AFXAPI _AfxLoadDotBitmap () {ASSERT (afxData.hbmMenuDot == NULL); // attempt to load special bitmap, else default to arrow CSize size = :: GetMenuCheckMarkDimensions (); ASSERT (size.cx> 4 && size.cy> 5); // not TOO SMALL PLEASE IF (size.cx> 32) size.cx = 32; int ost = (size.cx 15) >> 4; // # of Words Per raster line int nshift = (size) .cx - dot_width/2; // # of bits to shift over nshift = ((iWrow * 16) - size.cx); // Padding for word alignment if (nshift> 16 - dot_width) nshift = 16 - Dot_WIDTH ; // Maximum Shift for 1 Word

IF (size.cy> 32) size.cy = 32;

// bitmap 2/4/4/4/2 Pixels Wide - Centered (0 => black) Byte Rgbbitmap [32 * 2 * SizeOf (Word)]; MEMSET (RGbbitmap, 0xFF, SIZEOF (RGBitmap);

BYTE * PBOUT = & rgbbitmap [iWrow * SizeOf (Word) * ((size.cy - (Dot_Height 1)) >> 1)]; const Byte * pbin = _afxdot; for (int y = 0; y

AFXDATA.HBMMENUDOT = :: CreateBitmap (size.cx, size.cy, 1, 1, (lpvoid) & rgbitmap; if (afxdata.hbmmenudot == null) {trace0 ("Warning: using system arrow bitmap instead of dot./ n "); #define obm_mnarrow 32739 afxdata.hbmmenudot = :: loadbitmap (null, makeintresource (obm_mnarrow));}} /// ccmdtarget Diagnostics

#ifdef _debugvoid ccmdtarget :: DUMP (CDumpContext & DC) Const {COBject :: Dump (DC);

#ifndef _AFX_NO_OLE_SUPPORT if (m_xDispatch.m_vtbl = 0!) {dc << "with IDispatch (OLE Automation) capability / n"; dc << "m_bResultExpected =" << m_bResultExpected << "/ n";} if (m_xConnPtContainer. M_VTBL! = 0) {DC << "with ole connection point capacity / n";} if (getInterfacemap ()! = & ccmdtarget :: interfacemap) {DC << "with ole capability"; DC << "/ nm_dwref =" << m_dwref; DC << "/ nm_pouterunknown =" << m_pouterunknown; if (m_xinnerunknown! = 0) DC << "/ nwith aggregation capability"; DC << "/ n";} #ENDIF / /! _ AFX_NO_OLE_SUPPORT}

Void ccmdtarget :: assertvalid () const {cobject :: assertvalid ();} # ENDIF

#ifdef AFX_INIT_SEG # prgma code_seg (AFX_INIT_SEG) #ENDIF

Implement_dynamic (ccmdtarget, cobject)

/

转载请注明原文地址:https://www.9cbs.com/read-78396.html

New Post(0)