第一章 Windows程序开发入门

  • Post author:
  • Post category:其他


  1. 弹出消息对话框
/* 预处理 */
/* 头文件 */
#include <windows.h>
//连接时使用User32.lib
#pragma comment (lib, "User32.lib")

/* ************************************
* WinMain
* 功能	Windows应用程序示例
**************************************/
int WinMain(
			HINSTANCE hInstance,
			HINSTANCE hPrevInstance,
			LPSTR lpCmdLine,
			int nCmdShow
			)
{
	// 调用API函数 MessageBox
	MessageBox(NULL,
		TEXT("开始学习Windows编程"),
		TEXT("消息对话框"),
		MB_OK);
	return 0;
}



版权声明:本文为weixin_35338800原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。