第一个Windows程序
- C++Windows 应用程序,开始了我的Windows编程,其中入口名称为WinMain而·不是winMain,靠为这个错,弄了半天。
- 环境:
– VS2019
–C++winows应用程序项目(空项目)
#include<Windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd) {
MessageBox(NULL, "Welcome to Windows programming", "MAIN",
MB_OK | MB_ICONEXCLAMATION);
return 0;
}
执行结果: