清华大学电子工程系:《微机原理》MessageBox

Message box e Message Box 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 int MessageBox( HWND hWnd. / handle of owner window LPCTSTR Ip Text, / address of text in message box PCTSTR IpCaption, //address of title of message box UINT ulype / style of message box ); Parameters hWnd Identifies the owner window of the message box to be created. If this parameter is NULL, the message box has no owner window ItExt Points to a null-terminated string containing the message to be displayed IpCapt Points to a null-terminated string used for the dialog box title. If this parameter is NULL, the default title error is used slype Specifies the contents and behavior of the dialog box. This parameter can be a combination of the following values MB ABORTRETRYIGNORE The message box contains three push buttons: Abort, Retry MB APPLMODAL The user must respond to the message box before continuing work in the window identified by the hWnd parameter. However, the user can move to the windows of other applications and work in those windows. Depending on the hierarchy of windows in the application, the user may be able to move to other windows within the application. All child windows of the parent of the message box are automatically disabled, but popup windows are not MB APPLMODAL is the default value if neither MB SYSTEMMODAL nor
MessageBox The MessageBox 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. int MessageBox( HWND hWnd, // handle of owner window LPCTSTR lpText,// address of text in message box LPCTSTR lpCaption, // address of title of message box UINT uType // style of message box ); Parameters hWnd Identifies the owner window of the message box to be created. If this parameter is NULL, the message box has no owner window. lpText Points to a null-terminated string containing the message to be displayed. lpCaption Points to a null-terminated string used for the dialog box title. If this parameter is NULL, the default title Error is used. uType Specifies the contents and behavior of the dialog box. This parameter can be a combination of the following values: Value Meaning MB_ABORTRETRYIGNORE The message box contains three push buttons: Abort, Retry, and Ignore. MB_APPLMODAL The user must respond to the message box before continuing work in the window identified by the hWnd parameter. However, the user can move to the windows of other applications and work in those windows. Depending on the hierarchy of windows in the application, the user may be able to move to other windows within the application. All child windows of the parent of the message box are automatically disabled, but popup windows are not. MB_APPLMODAL is the default value if neither MB_SYSTEMMODAL nor

MB TASKMODAL is specified MB DEFAULT DESKTOP ONLY The desktop currently receiving input must be a default desktop; otherwise, the function fails. a default desktop is one an application runs on after the user has logged on MB DEFBUTTONI The first button is the default button Note that the first button is al ways the default unless MB defbutton2. MB defbutton3. or MB DEfbutton4 is specified MB DEFBUTtON2 The second button is a default button MB DEFBUTTON3 The third button is a default button MB DEFBUTTON The fourth button is a default button MB HELP Windows 95: Adds a Help button to the message box. Choosing the Help button or pressing FI generates a Help event MB ICONASTERISK Same as MB ICONINFORMATION MB ICONERROR Windows 95: Same as MB ICONHAND MB ICONEXCLAMATION An exclamation-point icon appears in the message box. MB ICONHAND Same as MB Iconstop MB ICONINFORMATION An icon consisting of a lowercase letter i in a circle appears in the MB ICONQUESTIon A question-mark icon appears in the message box MB ICONSTOP A stop-sign icon appears in the message box MB ICONWARNING Windows 95: Same as MB ICONEXCLAMATION MB OK The message box contains one push button: OK MB OKCANCEL The message box contains two push buttons OK and Cancel MB RETRYCANCEL The message box contains two push buttons: Retry and Cancel MB RIGHT Windows 95: The text is right-justified MB RTLREADING Windows 95: Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems MB SERVICE NOTIFICATION Windows NT: The caller is a service notifying the user of an event. The function displays a message box on the current active desktop, even if there is no user logged on to the computer. If this flag is set, the hWnd parameter must be NULL. This is so the message box can appear on a desktop other than the desktop corresponding to the hwnd. MB SETFOREGROUND The message box becomes the foreground window. Internally Windows calls the Set Foreground window function for the message box MB SYSTEMMODAL All applications are suspended until the user responds to the Unless the application specifies MB ICONHAND, the message box does not become modal until after it is created; consequently, the owner window and other windows continue to receive messages resulting from its activation. Use system-modal message boxes to notify the user of serious, potentially damaging errors that require immediate attention(for example, running out of MB TASKMODAL Same as MB APPLMODAL except that all the top-level windows belonging to the current task are disabled if the hwnd parameter is NULL. Use this flag when the calling application or library does not have a window handle available but still needs to prevent input to other windows in the current application without suspending other applications MB YESNO The message box contains two push buttons: Yes and No
MB_TASKMODAL is specified. MB_DEFAULT_DESKTOP_ONLY The desktop currently receiving input must be a default desktop; otherwise, the function fails. A default desktop is one an application runs on after the user has logged on. MB_DEFBUTTON1 The first button is the default button. Note that the first button is always the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified. MB_DEFBUTTON2 The second button is a default button. MB_DEFBUTTON3 The third button is a default button. MB_DEFBUTTON4 The fourth button is a default button. MB_HELP Windows 95: Adds a Help button to the message box. Choosing the Help button or pressing F1 generates a Help event. MB_ICONASTERISK Same as MB_ICONINFORMATION. MB_ICONERROR Windows 95: Same as MB_ICONHAND. MB_ICONEXCLAMATION An exclamation-point icon appears in the message box. MB_ICONHAND Same as MB_ICONSTOP. MB_ICONINFORMATION An icon consisting of a lowercase letter i in a circle appears in the message box. MB_ICONQUESTION A question-mark icon appears in the message box. MB_ICONSTOP A stop-sign icon appears in the message box. MB_ICONWARNING Windows 95: Same as MB_ICONEXCLAMATION. MB_OK The message box contains one push button: OK. MB_OKCANCEL The message box contains two push buttons: OK and Cancel. MB_RETRYCANCEL The message box contains two push buttons: Retry and Cancel. MB_RIGHT Windows 95: The text is right-justified. MB_RTLREADING Windows 95: Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems. MB_SERVICE_NOTIFICATION Windows NT: The caller is a service notifying the user of an event. The function displays a message box on the current active desktop, even if there is no user logged on to the computer.If this flag is set, the hWnd parameter must be NULL. This is so the message box can appear on a desktop other than the desktop corresponding to the hWnd. MB_SETFOREGROUND The message box becomes the foreground window. Internally, Windows calls the SetForegroundWindow function for the message box. MB_SYSTEMMODAL All applications are suspended until the user responds to the message box. Unless the application specifies MB_ICONHAND, the message box does not become modal until after it is created; consequently, the owner window and other windows continue to receive messages resulting from its activation. Use system-modal message boxes to notify the user of serious, potentially damaging errors that require immediate attention (for example, running out of memory). MB_TASKMODAL Same as MB_APPLMODAL except that all the top-level windows belonging to the current task are disabled if the hWnd parameter is NULL. Use this flag when the calling application or library does not have a window handle available but still needs to prevent input to other windows in the current application without suspending other applications. MB_YESNO The message box contains two push buttons: Yes and No

MB YESNOCANCEL The message box contains three push buttons: Yes, No, and Cancel The return value is zero if there is not enough memory to create the message box If the function succeeds, the return value is one of the following menu-item values returned by the dialog box. Value Meaning IDabORt Abort button was selected IDCANCeL Cancel button was selected IDIGNOREIgnore button was selected. idok oK button was selected IDRETRY Retry button was selected IDYES Yes button was selected If a message box has a Cancel button, the function returns the IdCANCel value if either the eSC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect Remarks When you use a system-modal message box to indicate that the system is low on memory, the strings pointed to by the lp Text and lp Caption parameters should not be taken from a resource file because an attempt to load the resource may fail When an application calls Message Box and specifies the MB ICONHAND and MB SYSTEMMODAL flags for the u lype parameter, Windows displays the resulting message box regardless of available memory. When these flags are specified, Windows limits the length of the message box text to three lines. Windows does not automatically break the lines to fit in the message box, however, so the message string must contain carriage returns to break the lines at the appropriate places If you create a message box while a dialog box is present, use the handle of the dialog box as the hWnd parameter. The hWnd parameter should not identify a child window, such as a control in a dialog box Windows 95 only: The system can support a maximum of 16, 364 window handles
MB_YESNOCANCEL The message box contains three push buttons: Yes, No, and Cancel. Return Value The return value is zero if there is not enough memory to create the message box. If the function succeeds, the return value is one of the following menu-item values returned by the dialog box: Value Meaning IDABORT Abort button was selected. IDCANCEL Cancel button was selected. IDIGNORE Ignore button was selected. IDNO No button was selected. IDOK OK button was selected. IDRETRY Retry button was selected. IDYES Yes button was selected. If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect. Remarks When you use a system-modal message box to indicate that the system is low on memory, the strings pointed to by the lpText and lpCaption parameters should not be taken from a resource file, because an attempt to load the resource may fail. When an application calls MessageBox and specifies the MB_ICONHAND and MB_SYSTEMMODAL flags for the uType parameter, Windows displays the resulting message box regardless of available memory. When these flags are specified, Windows limits the length of the message box text to three lines. Windows does not automatically break the lines to fit in the message box, however, so the message string must contain carriage returns to break the lines at the appropriate places. If you create a message box while a dialog box is present, use the handle of the dialog box as the hWnd parameter. The hWnd parameter should not identify a child window, such as a control in a dialog box. Windows 95 only: The system can support a maximum of 16,364 window handles
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 清华大学电子工程系:《微机原理》ISA-based data acquisition and control board.doc
- 《网络安全设计》 附录 D CHAP、 MS-CHAP和 MS-CHAP V2中的 身份验证.ppt
- 《网络安全设计》 附录C安全管理的运营框架设计.ppt
- 《网络安全设计》 附录B网络管理策略的设计.ppt
- 《网络安全设计》 附录A可接受使用策略的设计.ppt
- 《网络安全设计》 第十二章 设计安全事件应对措施.ppt
- 《网络安全设计》 第十一章 创建网络周边安全设计.ppt
- 《网络安全设计》 第十章 创建数据传输安全设计.ppt
- 《网络安全设计》 第九章 数据安全设计.ppt
- 《网络安全设计》 第八章 身份验证的安全设计.ppt
- 《网络安全设计》 第七章 创建账户安全设计.ppt
- 《网络安全设计》 第六章 创建计算机安全设计.ppt
- 《网络安全设计》 第五章 创建物理资源安全设计.ppt
- 《网络安全设计》 第四章 分析安全风险.ppt
- 《网络安全设计》 第三章 确定网络安全威胁.ppt
- 《网络安全设计》 第二章 创建网络安全计划.ppt
- 《网络安全设计》 第一章 安全设计简介.ppt
- 人民邮电出版社:高职高专现代信息技术系列教材《单片机原理与接口技术》课程电子教案(PPT课件讲稿)第四章 MCS-51单片机存储器的扩展.ppt
- 人民邮电出版社:高职高专现代信息技术系列教材《单片机原理与接口技术》课程电子教案(PPT课件讲稿)第十章 单片机应用系统设计与开发.ppt
- 人民邮电出版社:高职高专现代信息技术系列教材《单片机原理与接口技术》课程电子教案(PPT课件讲稿)第六章 定时器/计数器及应用.ppt
- 清华大学电子工程系:《微机原理》考试大纲.doc
- 清华大学电子工程系:《微机原理》实验一设计数码管电子表.doc
- 清华大学电子工程系:《微机原理》实验三 汇编语言程序设计(3).doc
- 清华大学电子工程系:《微机原理》实验三ADDA.doc
- 清华大学电子工程系:《微机原理》实验二小键盘按键识别.doc
- 清华大学电子工程系:《微机原理》实验四 接口实验.doc
- 清华大学电子工程系:《微机原理》实验四DMA.doc
- 清华大学电子工程系:《微机原理》第一章 微型计算机系统概论.ppt
- 清华大学电子工程系:《微机原理》第二章 Pentium微处理器的体系结构 2.1 计算机体系结构的含义 2.2 Pentium微处理器的内部结构 2.3 实模式软件体系结构.ppt
- 清华大学电子工程系:《微机原理》第三章 Pentium微处理器的指令系统 3.1 概述 3.2 Pentium微处理器的寻址方式 3.3 数据传送指令 3.4 算术运算指令.ppt
- 清华大学电子工程系:《微机原理》第三章 Pentium微处理器的指令系统(3.5-3.10)第四章 汇编语言程序设计(4.1-4.4).ppt
- 清华大学电子工程系:《微机原理》第四章 汇编语言程序设计 4.5 保护模式下的汇编语言程序设计 4.6 Win32汇编语言程序设计 4.7 与高级语言的接口.ppt
- 清华大学电子工程系:《微机原理》第四章 Pentium微处理器的体系结构 2.4 保护模式软件体系结构 2.5 浮点部件软件体系结构.ppt
- 清华大学电子工程系:《微机原理》浮点运算指令及汇编语言程序设计.ppt
- 清华大学电子工程系:《微机原理》第五章 Pentium微处理器的硬件接口.ppt
- 清华大学电子工程系:《微机原理》第六章 存储器系统.ppt
- 清华大学电子工程系:《微机原理》第七章 输入输出接口 7.1概述 7.2CPU与外设数据传送的方式 7.3可编程计数器/定时器8253.ppt
- 清华大学电子工程系:《微机原理》第八章 中断与中断控制 8.1 中断的基本概念 8.2 可编程中断控制器8259 8.3 中断服务程序的编程 8.4 保护模式的中断处理.ppt
- 清华大学电子工程系:《微机原理》第七章 输入/输出接口 7.4串行通讯和串行接口 7.5 并行接口.ppt
- 清华大学电子工程系:《微机原理》第七章 输入/输出接口 7.6 DMA控制器8237 7.7 D/A和A/D转换技术.ppt