因为头文件的多样性,会出现各种各样建立窗口工程的方式,像你的可以这么做:
#include<Windows.h>#include<tchar.h>
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, TCHAR* szCmdLine, int iCmdShow)
{
MessageBox(NULL, TEXT("HELLO"), TEXT("HELLO"), MB_OKCANCEL)
return 0
}
一般是这么写的,总之还有很多奇奇怪怪的写法
int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
return 0
} int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
MessageBox(NULL, TEXT("HELLO"), TEXT("HELLO"), MB_OKCANCEL)
return 0
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)