StringCbPrintf 函数 (strsafe.h):格式化字符串
STRSAFEAPI StringCbPrintf([out] STRSAFE_LPSTR  pszDest,//目的缓冲区  LPSTR指针或者数组[in]  size_t         cbDest,//目的缓冲区大小[in]  STRSAFE_LPCSTR pszFormat,//格式 例如: TEXT("%d")[in]  变量              ,// 数字1...            
);
例如:
int const arraysize = 30;
TCHAR pszDest[arraysize]; 
size_t cbDest = arraysize * sizeof(TCHAR);LPCTSTR pszFormat = TEXT("%s %d + %d = %d.");
TCHAR* pszTxt = TEXT("The answer is");HRESULT hr = StringCbPrintf(pszDest, cbDest, pszFormat, pszTxt, 1, 2, 3);// The resultant string at pszDest is "The answer is 1 + 2 = 3."