TRACE
TRACE( exp )ParametersexpSpecifies a variable number of arguments that are used in exactly the same way that a variable number of arguments are used in the run-time function printf.ResProvides similar functionality to the printf function by sending a formatted string to a dump device such as a file or debug monitor. Like printf for C programs under MS-DOS, the TRACE macro is a convenient way to track the value of variables as your program executes. In the Debug environment, the TRACE macro output goes to afxDump. In the Release environment, it does nothing.TRACE is limited to sending a total of 512 characters at a time. If you call TRACE with formatting commands, the total string length after the formatting commands have been expanded cannot be more than 512 characters, including the terminating NULL. Exceeding this limit causes an ASSERT.Note This macro is available only in the debug version of MFC.
TRACE( exp )ParametersexpSpecifies a variable number of arguments that are used in exactly the same way that a variable number of arguments are used in the run-time function printf.ResProvides similar functionality to the printf function by sending a formatted string to a dump device such as a file or debug monitor. Like printf for C programs under MS-DOS, the TRACE macro is a convenient way to track the value of variables as your program executes. In the Debug environment, the TRACE macro output goes to afxDump. In the Release environment, it does nothing.TRACE is limited to sending a total of 512 characters at a time. If you call TRACE with formatting commands, the total string length after the formatting commands have been expanded cannot be more than 512 characters, including the terminating NULL. Exceeding this limit causes an ASSERT.Note This macro is available only in the debug version of MFC.
解决方案 »
- Boost 的 Asio 中 asio::async_read 无法获取网络中断
- 急救:httpsendrequest 发送HTT包时如遇到重写向的即HTTP300,如何获取成功页面?
- vc6.0停留在“Compiling...”
- 用Visual Studio 2005 编的MFC程序运行时需要带哪几个.dll 文件?
- 请帮忙来看看,一道数学题目要用C语言写出来
- 一个问题,请路过的高手帮个忙!!谢谢!!!
- 问题很多,近来看看
- 双目视觉测距遇难题 已知目标点三维信息如何求其深度值
- 关于面板按键和触摸屏按键操作能执行相同的功能软件的开发
- 关于构造函数
- 怎么能判断对话框中哪个控件获得了焦点。
- 一个奇怪的问题,资深专家入内!
2.TRACE(str);
str 为CString 或 char[],char*
我只用过这两种方法
if(...)MessageBox("hello")比如说在Create中,Trace0("fail to Create...");程序会在创建失败时弹出MessageBox();