本文整理汇总了C++中String_256::CCvsprintf方法的典型用法代码示例。如果您正苦于以下问题:C++ String_256::CCvsprintf方法的具体用法?C++ String_256::CCvsprintf怎么用?C++ String_256::CCvsprintf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类String_256
的用法示例。
在下文中一共展示了String_256::CCvsprintf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: XSetError
void CDECL Error::XSetError( UINT32 errID, ...)
{
if ( (errID==FALSE) || (errID==TRUE) )
{
// someone probably used the wrong macro parameters e.g. TRUE and FALSE instead of ID
// This call will set an _R(IDE_INTERNAL_ERROR) for us
ERROR2RAW( "ERROR1 macro used with invalid parameters" );
return;
}
TCHAR buf[256];
va_list marker;
va_start( marker, errID );
String_256 result;
// load the format string as a resoure (note no module ID yet)
if (!SmartLoadString(0, errID, buf, sizeof(buf)))
{
camSnprintf( buf, 256, wxT("Error<%u>"), errID ); // keep inline
}
// now do _MakeMsg type formatting
result.CCvsprintf(buf, marker);
#if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
// Set the help context.
SetNextMsgHelpContext(errID);
#endif
// ralph needs this so that he can map the ID to a HRESULT before passing it
// back to a harness
TRACEUSER( "Chris", wxT("oOoOo Ralph Set Error %d \n"), RalphErrorID );
RalphErrorID =errID;
// and copy result into ErrorString
SetErrorSerious( result );
// trace output because SetErrorSerious doesn't bother
TRACE( wxT("Setting error: ID = %d: \"%s\"\n"), errID, ErrorString);
// then tidy up
va_end( marker );
ResetWhere();
}