|


|
Trajecto's Win32 API Programming
Tutorial for Pocket PC All
about MessageBox The
MessageBox function is prototyped as int
MessageBox (HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType); Study
the tables below to fully customize your own message boxes MessageBox
Parameters
| Parameter | Purpose | | HWND
hWnd | Handle
to the top-level parent window | | LPCTSTR
lpText | Text
that appears in the window | | LPCTSTR
lpCaption | Title
bar text | | UINT
uType | Flag
that specifies the MessageBox appearance (see table below) |
Default
MessageBox Flags
| Flags | Button
or Icon | | For
Buttons:
| | | MB_OK | OK | | MB_OKCANCEL | OK
and Cancel | | MB_RETRYCANCEL | Retry
and Cancel | | MB_YESNO | Yes
and No | | MB_YESNOCANCEL | Yes,
No and Cancel | | MB_ABORTRETRYIGNORE | Abort,
Retry and Ignore | | For
Icons: | | MB_ICONEXCLAMATION,
MB_ICONWARNING
| Exclamation
point | | MB_ICONINFORMATION,
MB_ICONASTERISK | Lower
case i within a circle | | MB_ICONQUESTION | Question
mark | | MB_YESNO | Yes
and No | | MB_ICONSTOP,
MB_ICONERROR, MB_ICON_HAND | Stop
sign | | MB_DEFBUTTON1 | First
button | | MB_DEFBUTTON2 | Second
button | | MB_DEFBUTTON3 | Third
button | | For
Windows Styles: | | | MB_SETFOREGROUND | Bring
the message box to the foreground | | MB_TOPMOST | Make
the message box the top-most window | | The
return value from MessageBox indicates the button pressed by the user. | | IDOK | OK
button pressed | | IDYES | Yes
button pressed | | IDNO | No
button pressed | | IDCANCEL | Cancel
button pressed or escape key pressed | | IDABORT | Abort
button pressed | | IDRETRY | Retry
button pressed | | IDIGNORE | Ignore
button pressed |
SAMPLES
 MB_OK |  MB_ICONEXCLAMATION | MB_ICONINFORMATION | MB_YESNO | MB_ICONSTOP | MB_YESNOCANCEL |

See our new game site
©Copyright
TrajectoryLabs.com. All Rights Reserved.
|