TRACE()函数是干什么的?
比如说:
TRACE("\n%d\n",bmih.biSizeImage);
什么意思?
欢迎各位大虾前来蹂腻本题!!!!!!!!!!

解决方案 »

  1.   

    相当于printf,不过是调试时才有用,release版本不编译。打印在debug窗口里。
      

  2.   

    这是输出调试信息的当在你debug下调试的时候,当程序运行到这个地方的时候,会把这些信息从
    output窗口显示出来比如
    TRACE("\n a = %d \n",123);那么运行到那个地方,输出窗口显示a = 123这个信息可以用来跟踪变量的值啊什么的,
      

  3.   

    只是用来跟踪变量?应该不尽然吧,跟踪这个功能我也知道就是从TRACE的意思也看的出,
    还有没有别的意思?
      

  4.   

    TRACE是宏,和C printf差不多,printf在屏幕显示,它在Debug显示,TRACE只能显示512个字符,包括'\0',不包括格式化字符串。
    Provides 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
      

  5.   

    在调试的时候起作用,相当于afxmessagebox的功能,
    在release的时候不会起作用