CString::FormatMessage

void FormatMessage( LPCTSTR lpszFormat, ... );

void FormatMessage( UINT nFormatID, ... );

Parameters

lpszFormat

Points to the format-control string. It will be scanned for inserts and formatted accordingly. The format string is similar to run-time function printf-style format strings, except it allows for the parameters to be inserted in an arbitrary order.

nFormatID

The string resource identifier that contains the unformatted message text.

Remarks

Call this member function to format a message string. The function requires a message definition as input. The message definition is determined by lpszFormat or from the string resource identified by nFormatID. The function copies the formatted message text to the CString, processing any embedded insert sequences if requested.

Each insert must have a corresponding parameter following the lpszFormat or nFormatID parameter. Within the message text, several escape sequences are supported for dynamically formatting the message. For a description of these escape sequences and their meanings, see the Windows ::FormatMessage function in the Win32 SDK Programmer’s Reference.

CString OverviewClass MembersHierarchy Chart

See Also   ::FormatMessage, CString::LoadString, CString::Format