16,548
社区成员




int nYear = 2011 ,nMonth = 3 ,nDay = 17;
TCHAR szYear[5] , szMonth[3] ,szDay[3];
wsprintf(szYear,TEXT("%d"),nYear);
wsprintf(szMonth,TEXT("%d"),nMonth);
wsprintf(szDay,TEXT("%d"),nDay);
LPWSTR lpSource = TEXT("今天是:%1年%2月%3日");
DWORD_PTR pArgs[] = { (DWORD_PTR)szYear, (DWORD_PTR)szMonth, (DWORD_PTR)szDay};
const DWORD size = 100+1;
WCHAR buffer[size];
if (FormatMessage(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY,
lpSource,
0,
0,
buffer,
size,
(va_list*)pArgs))
{
MessageBox(hWnd,buffer,TEXT("Date"),MB_ICONINFORMATION);
}