|
uLib
User mode C/C++ extended API library for Win32 programmers.
|
Additional message box APIs...
Macros | |
| #define | MB_INFO MB_OK| MB_ICONINFORMATION |
| #define | MB_QUERY MB_YESNO| MB_ICONQUESTION |
| #define | MB_QUERYCANCEL MB_YESNOCANCEL| MB_ICONQUESTION |
| #define | MB_WARNING MB_OK| MB_ICONEXCLAMATION |
| #define | MB_ERROR MB_OK| MB_ICONSTOP |
| #define | CloseAsyncMsgBox(hBox) SendMessage( hBox, WM_SYSCOMMAND, SC_CLOSE, 0 ) |
Functions | |
| int __cdecl | MsgBox (HWND Owner, UINT Type, CSTR Cap, CSTR Fmt,...) |
| HANDLE __cdecl | AsyncMsgBox (UINT Type, PINT_PTR pResult, CSTR Title, CSTR Fmt,...) |
| HANDLE __cdecl | AsyncMsgBoxEx (HWND Owner, UINT Flags, CSTR Title, HINSTANCE hInst, CSTR IconId, DWORD LangId, DWORD_PTR HelpId, MSGBOXCALLBACK Callback, PINT_PTR pResult, CSTR TextFmt,...) |
| #define MB_INFO MB_OK| MB_ICONINFORMATION |
Ok button + Info icon.
Definition at line 1224 of file UtilFunc.h.
| #define MB_QUERY MB_YESNO| MB_ICONQUESTION |
Yes and No buttons + Query icon.
Definition at line 1225 of file UtilFunc.h.
| #define MB_QUERYCANCEL MB_YESNOCANCEL| MB_ICONQUESTION |
Yes, No, and Cancel buttons + Query icon.
Definition at line 1226 of file UtilFunc.h.
| #define MB_WARNING MB_OK| MB_ICONEXCLAMATION |
Ok button + Warning icon.
Definition at line 1227 of file UtilFunc.h.
| #define MB_ERROR MB_OK| MB_ICONSTOP |
Ok button + Stop icon.
Definition at line 1228 of file UtilFunc.h.
| #define CloseAsyncMsgBox | ( | hBox | ) | SendMessage( hBox, WM_SYSCOMMAND, SC_CLOSE, 0 ) |
Close an asynchronous message box programmatically.
Definition at line 1300 of file UtilFunc.h.
MsgBox is a message box with printf() flavor.
| Owner | Message box owner. |
| Type | MB_nn message box flags. |
| Cap | Message box caption. If Cap is NULL and Owner is non-NULL, the owner's caption is used as title for the message box. If both are NULL, no title is shown. |
| Fmt | Message text with optional printf() inserts. The resulting string with inserts is limited to 512 chars, incl _NUL. |
| ... | Insert parameters... |
Definition at line 271 of file UserUtil.cpp.
AsyncMsgBox displays a non-blocking, self-threaded, message box.
This function allows you to use a message box as a kind of modeless dialog.
| Type | MB_nn MessageBox option flags. |
| pResult | [out,opt] When the function returns, pResult, if provided, returns the MessageBox window handle, and when the box is closed it recieves the MessageBox result. |
| Title | Message box caption. |
| Fmt | Message text with optional printf inserts. The resulting string with inserts is limited to 512 chars, incl _NUL. |
| ... | Insert parameters... |
See also AsyncMsgBoxEx().
Definition at line 430 of file UserUtil.cpp.
| HANDLE __cdecl AsyncMsgBoxEx | ( | HWND | Owner, |
| UINT | Flags, | ||
| CSTR | Title, | ||
| HINSTANCE | hInst, | ||
| CSTR | IconId, | ||
| DWORD | LangId, | ||
| DWORD_PTR | HelpId, | ||
| MSGBOXCALLBACK | Callback, | ||
| PINT_PTR | pResult, | ||
| CSTR | TextFmt, | ||
| ... | |||
| ) |
AsyncMsgBoxEx displays a custom, non-blocking, self-threaded, message box.
This function allows you to use a message box as a kind of modeless dialog.
| Owner | [optional] Message box owner. Note: If, for some obscure reason, you want the box to block, set Owner to non-NULL, and include MB_TASKMODAL or MB_SYSTEMMODAL in Flags. MB_APPLMODAL blocking on Owner has been sacrificed in order to allow non-blocking message boxes (which is the point of this function). |
| Flags | MB_nn MessageBox option flags. Note: A message box that specifies MB_YESNO does not respond to CloseAsyncMsgBox() because the system disables it's cancel button. If you need a yes/no box use MB_YESNOCANCEL. |
| Title | [optional] Message box caption. If Owner is non-NULL and Title is NULL, the owner's caption is used as title for the message box. If both are NULL, no title is shown. |
| hInst | [optional] Instance that contains the IconId custom icon. |
| IconId | [optional] Custom icon id (in hInst). If used, it MUST be an integer id. If hInst+IconId are not used, a standard icon based on the MB_nn flags is used. |
| LangId | [optional] MAKELANGID. |
| HelpId | [optional] HELPINFO::dwContextId. |
| Callback | [optional] Process help events for the message box. |
| pResult | [out,opt] When the function returns, pResult, if provided, returns the MessageBox window handle, and when the box is closed it recieves the MessageBox result. |
| TextFmt | Message text with optional printf inserts. The resulting string with inserts is limited to 512 chars, incl _NUL. |
| ... | Insert parameters... |
Definition at line 455 of file UserUtil.cpp.