格式化的消息框_MessageBoxPrintf使用报错

 //#include <stdio.h>
#include <windows.h>

int CDECL MessageBoxPrintf(TCHAR *szCaption,TCHAR *szFormat)
{
    TCHAR szBUffer[1024];
    va_list pArgList;
    va_start(pArgList,szFormat);
    _vsntprintf(szBUffer,sizeof(szBUffer)/sizeof(TCHAR),szFormat,pArgList);
    va_end(pArgList);
    return MessageBox(NULL,szBUffer,szCaption,0);
}

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
{
    int cxScreen,syScreen;
    cxScreen=GetSystemMetrics(SM_CXSCREEN);
    syScreen=GetSystemMetrics(SM_CYSCREEN);
    MessageBoxPrintf(TEXT("Scrnsize"),TEXT("the screen is %i pixels wide by %i pixels hight"),cxScreen,syScreen);
    return 0;
}

图片说明