|
Message Boxes
A message box is a special dialog box that an application can use to display
messages and prompt for simple input. A message box typically contains a text
message and one or more buttons. An application creates the message box by using
the MessageBox or MessageBoxEx function, specifying the text and the number and types of buttons to display.
The MessageBoxEx function also allows you to specify the language to use for the text of any
predefined push buttons in the message box.
Although the message box is a dialog box, Windows takes complete control of
the creation and management of the message box. This means the application does
not provide a dialog box template and dialog box procedure. Windows creates its
own template based on the text and buttons specified for the message box and
supplies its own dialog box procedure.
A message box is a modal dialog box and Windows creates it by using the same
internal functions that DialogBox uses. If the application specifies an owner window when calling MessageBox or MessageBoxEx, Windows disables the owner. An application can also direct Windows to
disable all top-level windows belonging to the current task by specifying the
MB_TASKMODAL value when creating the dialog box.
Windows can send messages to the owner, such as WM_CANCELMODE and WM_ENABLE, just as it does when creating a modal dialog box. The owner window should
carry out any actions requested by these messages.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|