windows编程,一个简单的代码求解释
#include <windows.h>
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0);
return 0 ;
}
用的是vs2008很正常的建了个工程, 运行不了有问题....
新手刚学.
[解决办法]
你需要建立的是Win32工程
[解决办法]
你的选错工程了吧,这样吧:
#include <windows.h>
#pragma comment(linker, "/subsystem:windows")
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0);
return 0;
}