一个最简单的Windows程序

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/active2489595970/article/details/84678214

#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//消息框的类型
);*/
 

猜你喜欢

转载自blog.csdn.net/active2489595970/article/details/84678214
今日推荐