共用方式為


afxDump (MFC 中的 CDumpContext)

提供在應用程式的基礎物件傾印功能。

CDumpContext afxDump;

備註

afxDump 是允許您傳送 CDumpContext 資訊到偵錯工具輸出視窗或到偵錯 Terminal Ready 的預先定義 CDumpContext 物件。 通常,您會提供 afxDump 當做參數傳遞給 CObject::Dump

在 Windows NT 和 Windows 下所有版本,當您偵錯應用程式時,為 afxDump ,輸出傳送至輸出視窗偵錯 Visual C++。

這個變數在 MFC 偵錯版本只能定義。 如需更多 afxDump 的詳細資訊,請參閱 MFC 應用程式偵錯

範例

// example for afxDump
CPerson* pMyPerson = new CPerson;
// set some fields of the CPerson object... 
//.. 
// now dump the contents
#ifdef _DEBUG
afxDump << _T("Dumping myPerson:\n");
pMyPerson->Dump(afxDump);
afxDump << _T("\n");
#endif

需求

Header: afx.h

請參閱

參考

CObject::Dump

AfxDump (MFC)

概念

MFC 巨集和全域