请单击以进行评分并提供反馈
MSDN
MSDN Library
Visual Studio
Visual C++
MFC
 TRACE0

  开启低带宽视图
此页面仅适用于
Microsoft Visual Studio 2008/.NET Framework 3.5

同时提供下列产品的其他版本:
MFC Library Reference
TRACE0

The TRACE macros are obsolete, use ATLTRACE2.

TRACE0 is similar to TRACE and is one variant of a group of trace macros that you can use for debug output.

TRACE0(
      exp 
)
exp

A format string as used in the run-time function printf.

The group includes:

  • TRACE0   Takes a format string (Only) and can be used for simple text messages, which are dumped to afxDump.

  • TRACE1   Takes a format string plus one argument (one variable that is dumped to afxDump).

  • TRACE2   Takes a format string plus two arguments (two variables that are dumped to afxDump).

  • TRACE3   Takes a format string plus three arguments (three variables that are dumped to afxDump).

TRACE0 does nothing if you have compiled a release version of your application. As with TRACE, it only dumps data to afxDump if you have compiled a debug version of your application.

NoteNote:

This macro is available only in the debug version of MFC.

// Example for TRACE0
TRACE0( "Start Dump of MyClass members:" );

// Another example for TRACE0
// This works, but it is easier to use TRACE() or TRACE1()
DWORD dwLastError = ::GetLastError();
CString str;
str.Format("The last error code for this thread is %d\n", dwLastError);
TRACE0( (LPCTSTR) str);

// These are all normal uses of TRACE0()
TRACE0("This message will be output. ");
TRACE0("This text is on the same line.\n");
TRACE0("This text is on the next line.\n");

Header: afx.h

社区内容   什么是社区内容?
添加新内容 RSS  批注
Processing
© 2009 Microsoft Corporation 版权所有。 保留所有权利  |  商标  |  隐私权声明
Page view tracker