大网数据广告活动
安装更新与部署

Error Dialog

· 52CE 我爱测

An Error dialog box is a modal dialog box box that displays an error message. More than one Error dialog box can exist in each installation.

An Error dialog box is a modal dialog box box that displays an error message. More than one Error dialog box can exist in each installation.

An ErrorDialog property needs to be set that specifies which dialog box is to be used. If this property is not set or does not point to a valid Error dialog box, then the error messages will not be displayed. In this case, the error is only logged with a warning about the missing dialog box.

An Error dialog box must have the Error Dialog style bit set. The dialog box must have a Text control named ErrorText. The record for the Error dialog box in the Dialog table must have the ErrorText control entered into the Control_First field.

The dialog box must contain seven PushButtons. All of these buttons specify the EndDialog ControlEvent in the ControlEvent table. Each button specifies one of the following attributes: ErrorAbort, ErrorCancel, ErrorIgnore, ErrorNo, ErrorOk, ErrorRetry, ErrorYes.

Note:
The focus of these controls should not be linked through the use of the Control_Next column in the Control table.

These buttons should be placed in approximately the same position in the dialog box because when it is created, only a subset of these seven buttons is created, depending on the message. The X coordinate of the buttons is modified so the buttons that are displayed are evenly spaced. The Y coordinate, height, and width of the buttons are unchanged. Because the buttons are arranged horizontally, no other control can be placed in the same horizontal region of the dialog box.

For an Error dialog box, the Control_Default and Control_Cancel fields in the Dialog table are ignored. The Control_First field for an Error dialog box must specify the ErrorText control.

If an Icon control named ErrorIcon is included on this dialog, the following standard Windows icons are displayed:

  • IDI_ERROR in response to imtFatalExit messages.
  • IDI_WARNING in response to imtError and imtWarning messages.
  • IDI_INFORMATION in response to imtOutOfDiskSpace messages.

The ErrorIcon control should be created with the FixedSize control attribute set to avoid improper sizing of the standard Windows icons.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。