Windows编程MessageBox函数
来源:互联网 发布:人工智能 视频分析 编辑:程序博客网 时间:2024/06/10 00:17
API:
int MessageBox(HWND hWnd, LPCTSTRlpText, LPCTSTRlpCaption, UINTuType);
MSDN描述:
这个API方法用来创建、显示、操作一个消息框。它包含可设置的消息内容、标题,还可以添加预定义的图标、放置按钮。This function creates, displays, and operates a message box. The message box contains an application-defined message and title, plus any combination of predefined icons and push buttons.
参数说明:
MSDN描述:
hWnd
- [in] Handle to the owner window of the message box to be created. If this parameter is NULL, the message box has no owner window.
输入参数:指定消息框的父窗口(消息框显示时,父窗口被禁用)。如果这个参数为空,说明消息框没有父窗口,即、没有窗口会因为消息框的出现而被禁用。
参数类型:HWND类型是结构体指针,结构体成员只有一个int。参考MSND的窗口描述符。
lpText
[in] Long pointer to a null-terminated string that contains the message to be displayed.
参数类型: LPCTSTR 字符串指针。
输入参数:指定消息框的消息内容。
lpCaption
[in] Long pointer to a null-terminated string used for the dialog box title. If this parameter is NULL, the default title Error is used.
- uType
输入参数:指定消息框的标题。默认值是 Error 或 错误 。
参数类型:LPCTSTR字符串指针。
[in] Specifies a set of bit flags that determine the contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags.
- 参数类型:无符号整形。一般传入的是一组用 || 连接的宏。
输入参数:指定消息和消息框的显示风格。可按位组合指定多种风格。具体风格参见MSDN。
返回值
返回0,说明创建、显示消息框失败。
返回非0,说明消息框操作成功。具体返回值含义如下:
(用户点击了取消按钮、或者标题栏关闭按钮、或按下ESC键)IDIGNOREIgnore button was selected.(用户点击了忽略按钮)IDNONo button was selected.(用户点击了否按钮)IDOKOK button was selected.(用户点击了是按钮)IDRETRYRetry button was selected.(用户点击了重试按钮)IDYESYes button was selected.(用户点击了确定按钮)
- Windows编程MessageBox函数
- Windows编程之MessageBox
- windows函数 MessageBox
- 经典windows编程-----simple messagebox
- windows程序设计之MessageBox函数
- windows编程(一)——MessageBox函数引出来的话题
- VC编程Windows消息处理机制、阻塞试验、SetTimer、MessageBox、小心消息响应处理函数
- VC编程Windows消息处理机制、阻塞试验、SetTimer、MessageBox、消息响应处理函数
- 【C语言】(windows.h)MessageBox函数
- messagebox函数
- MessageBox函数
- MessageBox函数
- MessageBox() 函数
- messagebox函数
- MessageBox函数
- Messagebox函数
- MessageBox()函数
- MessageBox函数
- xml学习笔记 2. dtd
- SpringMVC与SiteMesh2.4无缝整合并借助JSR303规范实现表单验证
- mysql 左连接 自连接 例子
- OpenGL绘制心形函数
- 在A-star寻路中使用二叉堆
- Windows编程MessageBox函数
- devenv.exe - assert failure
- WebStorm注册码
- java 基础之集合框架-----05
- Java实践(十一)——五子棋
- java 神奇的import之静态导入
- 语言常识及dos基本命令
- struts2 中的ActionContext与ServletActionContext
- Java与C通讯 网络流解析