NO2::MessageBox

来源:互联网 发布:如何在淘宝上开店网址 编辑:程序博客网 时间:2024/04/29 21:48
int MessageBox(  HWND hWnd,          // handle to owner window  LPCTSTR lpText,     // text in message box  LPCTSTR lpCaption,  // message box title  UINT uType          // message box style);
HWND 窗口句柄,如果它不属于窗口,则输入NULL
LPCTSTR  在消息框主体中显示的字符
LPCTSTR  在消息框标题栏上显示的字符
UINT   以MB_开头的一组常数的组合,用来指出希望在对话框上出现的按钮、对话框的外观等
hello windows代码:
MessageBox(NULL,TEXT("hello,windows!"),TEXT("oppo"),MB_ICONSTOP)
函数返回值(IDOK、IDNO等)如下:
#define IDOK                1
#define IDCANCEL            2
#define IDABORT             3
#define IDRETRY             4
#define IDIGNORE            5
#define IDYES               6
#define IDNO                7
原创粉丝点击