第一个对话框
来源:互联网 发布:js解析url获取参数 编辑:程序博客网 时间:2024/06/06 18:01
// DEMO2_2.CPP - a simple message box
#define WIN32_LEAN_AND_MEAN //这句的目的是指示编译器不要包含与MFC相关的操作。
#include <windows.h> // the main windows headers
#include <windowsx.h> // a lot of cool macros
// main entry point for all windows programs
int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
// call message box api with NULL for parent window handle
MessageBox(NULL, "对话框内容",
"标题",
MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION);
// exit program
return(0);
} // end WinMain
MessageBox(窗体句柄,内容,标题,按钮样式|图标)
其中对话框弹出的内容有
-
MB_ABORTRETRYIGNORE The message box contains three pushbuttons: Abort, Retry, and Ignore.(终止重试忽略)
-
MB_OK The message box contains one pushbutton: OK.
-
MB_OKCANCEL The message box contains two pushbuttons: OK and Cancel.
-
MB_RETRYCANCEL The message box contains two pushbuttons: Retry and Cancel.
-
MB_YESNO The message box contains two pushbuttons: Yes and No.
-
MB_YESNOCANCEL The message box contains three pushbuttons: Yes, No, and Cancel.
对话框图标:
-
MB_ICONEXCLAMATION An exclamation-point icon appears in the message box.(!)
-
MB_ICONINFORMATION An icon consisting of an "I" in a circle appears in the message box.(infomation信息)
-
MB_ICONQUESTION A question-mark icon appears in the message box.(?)
-
MB_ICONSTOP A stop-sign icon appears in the message box.(X)
- 第一个对话框程序
- 第一个对话框
- 第一个QT对话框程序
- 第一个成功的MFC对话框程序
- 第一个QT实验品 --- 替换对话框
- 红皮书第一个实例:系统登录对话框
- 第一个实例:系统登录对话框
- 菜鸟学QT之四-------------第一个对话框
- ANDROID第一个UI界面学---登录到对话框
- qt 第一个窗口全屏,第二个窗口是个对话框,要始终显示在第一个全屏窗口上面
- 初学VC之路:第一个任务,编写对话框(3)——实现具有位图背景的对话框
- 初学VC之路:第一个任务,编写对话框(1)
- 初学VC之路:第一个任务,编写对话框——调用其他应用程序的方法
- ARX里第一个程序的疑问(宏、EXTERN、对话框、typdef、&、const)
- 菜鸟遇到的第一个servlet问题(404,弹出对话框)
- 第一个
- 第一个
- 第一个
- 利用Oracle构建BI信息板
- 我与VC和Cximage的相识
- 实战 JDOM
- ASP.NET AJAX入门系列(2):使用ScriptManager控件
- VPN中出现“连接管理器未能调用 CMMON32.EXE”错误的解决
- 第一个对话框
- JAVA组件--商业规则--QuickRules
- 都说男人好色
- web应用数据库连接池的必要性
- 计算代码执行的CPU时钟
- 网页中常用标签的编码HTML
- 開通Google網上論壇
- oracle游标(显示和隐示)之使用
- FLASH控件--商业图表--Rich Chart Builder