April 30, 2024, 07:02:47 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Messagebox flags

Started by Rock Ridge Farm (Larry), May 22, 2006, 08:01:20 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Rock Ridge Farm (Larry)

What are the flag values that can be passed to MessageBox?
Where are they found?

Bruce Peaslee

This is what I have:


CONST MB_ABORTRETRYIGNORE = 0x2 /* The message box contains three push buttons: Abort, Retry, and Ignore. */
CONST MB_APPLMODAL = 0x0 /* 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 threads and work in those windows. */
CONST MB_CANCELTRYCONTINUE = 0x6 /* MicrosoftÂÃ,® WindowsÂÃ,® 2000/XP: The message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead of MB_ABORTRETRYIGNORE. */
CONST MB_COMPOSITE = 0x2 /* Always use composite charactersthat is, characters in which a base character and a nonspacing character have different character values. Cannot be used with MB_PRECOMPOSED. */
CONST MB_DEFAULT_DESKTOP_ONLY = 0x20000 /* Windows NT/2000/XP: Same as MB_SERVICE_NOTIFICATION except that the system will display the message box only on the default desktop of the interactive window station. For more information, see Window Stations. */
CONST MB_DEFBUTTON1 = 0x0 /* The first button is the default button.ÂÃ,  MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified. */
CONST MB_DEFBUTTON2 = 0x100 /* The second button is the default button. */
CONST MB_DEFBUTTON3 = 0x200 /* The third button is the default button. */
CONST MB_DEFBUTTON4 = 0x300 /* The fourth button is the default button. */
CONST MB_DEFMASK = 0xF00
CONST MB_ERR_INVALID_CHARS = 0x8 /* If the function encounters an invalid input character, it fails and GetLastError returns ERROR_NO_UNICODE_TRANSLATION.ÂÃ,  */
CONST MB_FUNC = 0x4000
CONST MB_FUNC_STR = 0 /* "mb" */
CONST MB_HELP = 0x4000 /* Windows 95/98/Me, Windows NTÂÃ,® 4.0 and later: Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a WM_HELP message to the owner. */
CONST MB_ICONASTERISK = 0x40 /* An icon consisting of a lowercase letter i in a circle appears in the message box. */
CONST MB_ICONERROR = 0x10 /* A stop-sign icon appears in the message box. */
CONST MB_ICONEXCLAMATION = 0x30 /* An exclamation-point icon appears in the message box. */
CONST MB_ICONHAND = 0x10 /* A stop-sign icon appears in the message box. */
CONST MB_ICONINFORMATION = (MB_ICONASTERISK) /* An icon consisting of a lowercase letter i in a circle appears in the message box. */
CONST MB_ICONMASK = 0xF0
CONST MB_ICONQUESTION = 0x20 /* A question-mark icon appears in the message box. */
CONST MB_ICONSTOP = (MB_ICONHAND) /* A stop-sign icon appears in the message box. */
CONST MB_ICONWARNING = (MB_ICONEXCLAMATION) /* An exclamation-point icon appears in the message box. */
CONST MB_MISCMASK = 0xC000
CONST MB_MODEMASK = 0x3000
CONST MB_NOFOCUS = 0x8000
CONST MB_OK = 0x0 /* The message box contains one push button: OK. This is the default. */
CONST MB_OKCANCEL = 0x1 /* The message box contains two push buttons: OK and Cancel. */
CONST MB_PRECOMPOSED = 0x1 /* Always use precomposed charactersthat is, characters in which a base character and a nonspacing character have a single character value. This is the default translation option. Cannot be used with MB_COMPOSITE. */
CONST MB_RETRYCANCEL = 0x5 /* The message box contains two push buttons: Retry and Cancel. */
CONST MB_RIGHT = 0x80000 /* The text is right-justified. */
CONST MB_RTLREADING = 0x100000 /* Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems. */
CONST MB_SERVICE_NOTIFICATION = 0x40000 /* Windows NT/2000/XP: 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. */
CONST MB_SERVICE_NOTIFICATION_NT3X = 0x40000 /* Windows NT/2000/XP: This value corresponds to the value defined for MB_SERVICE_NOTIFICATION for Windows NT version 3.51. */
CONST MB_SETFOREGROUND = 0x10000 /* The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box. */
CONST MB_SYSTEMMODAL = 0x1000 /* Same as MB_APPLMODAL except that the message box has the WS_EX_TOPMOST style. Use system-modal message boxes to notify the user of serious, potentially damaging errors that require immediate attention (for example, running out of memory). */
CONST MB_TASKMODAL = 0x2000 /* Same as MB_APPLMODAL except that all the top-level windows belonging to the current thread are disabled if the hWnd parameter is NULL.ÂÃ,  */
CONST MB_TOPMOST = 0x40000 /* The message box is created with the WS_EX_TOPMOST window style. */
CONST MB_TYPEMASK = 0xF
CONST MB_USEGLYPHCHARS = 0x4 /* Use glyph characters instead of control characters. */
CONST MB_USERICON = 0x80
CONST MB_YESNO = 0x4 /* The message box contains two push buttons: Yes and No. */
CONST MB_YESNOCANCEL = 0x3 /* The message box contains three push buttons: Yes, No, and Cancel. */


I have a file of constants I got somewhere.
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Parker

All those flags are in the windows include files. The find in files features is nice, just point it at your C include directory and type in a constant.