一個最簡單的Windows程式
阿新 • • 發佈:2018-12-02
#include<windows.h>
int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrevInstance,LPSTR lpszCmdParam,int nCmdShow)
{
MessageBox(
NULL,
"Hello World.",
"Your first programme",
MB_OK|MB_ICONINFORMATION
);
return 0;
}
/*WinMain()函式的原型宣告
int WINAPI WinMain(
HINSTANCE hInstance,//當前執行例項控制代碼
HINSTANCE hPrevInstance,//前一個例項控制代碼
LPSTR lpCmdLine,//指定命令引數行字串
int nCmdShow;//指定視窗的顯示狀態
)
MessageBox函式宣告
int MessageBox(
HWND hWnd,//所屬視窗的控制代碼
LPCTSTR lpText,//訊息字串
LPCTSTR lpCaption,//訊息框標題字串
UNIT uType//訊息框的型別
);*/