Share via


TRACE3

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The TRACE macros are obsolete, use ATLTRACE2.

See TRACE0 for a description of the TRACE3 macro.

TRACE3(
   exp,
   param1,
   param2,
   param3 
)

Parameters

  • 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

// 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);

Requirements

Header: afx.h

See Also

Concepts

MFC Macros and Globals