Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

TRACE3

The TRACE macros are obsolete, use ATLTRACE2.

See TRACE0 for a description of the TRACE3 macro.

TRACE3( 
   exp, 
   param1, 
   param2, 
   param3  
)
exp

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

param1

The name of the variable whose value should be dumped.

param2

The name of the variable whose value should be dumped.

param3

The name of the variable whose value should be dumped.

// Example for TRACE3
// get the display context
HDC hdc = ::GetDC(NULL);

// Get information about the display
int nVertRes = ::GetDeviceCaps(hdc, VERTRES);
int nHorzRes = ::GetDeviceCaps(hdc, HORZRES);
int nDepth = ::GetDeviceCaps(hdc, BITSPIXEL);

// Done with the DC, give it back
::ReleaseDC(hdc);

// Tell the user
TRACE3("Your screen is at %d by %d resolution, with %d bits per pixel\n",
   nHorzRes, nVertRes, nDepth);

Header: afx.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.