demo2_2.cpp

来自「《Windows游戏编程大师技巧(第二版)》源代码」· C++ 代码 · 共 22 行

CPP
22
字号
// DEMO2_2.CPP - a simple message box
#define WIN32_LEAN_AND_MEAN 

#include <windows.h>        // the main windows headers 
#include <windowsx.h>       // a lot of cool macros

// main entry point for all windows programs
int WINAPI WinMain(HINSTANCE hinstance,
			       HINSTANCE hprevinstance,
			       LPSTR lpcmdline,
			       int ncmdshow)
{
// call message box api with NULL for parent window handle
MessageBox(NULL, "THERE CAN BE ONLY ONE!!!",
                 "MY FIRST WINDOWS PROGRAM",
                  MB_OK | MB_ICONEXCLAMATION);

// exit program
return(0);

} // end WinMain

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?