Message box operations
[Window creating/destroying]

Functions


Function Documentation

void GUIAPI MessageBeep ( DWORD  dwBeep  ) 

Makes a sound of beep.

This function makes a sound of beep. We ignore dwBeep argument so far.

Parameters:
dwBeep The beep type, ignored so far.
See also:
Beep, Ping, Tone
int GUIAPI MessageBox ( HWND  hParentWnd,
const char *  pszText,
const char *  pszCaption,
DWORD  dwStyle 
)

Displays a message box within one, two, or three push buttons.

This function displays a message box within one, two, or three buttons, and returns the identifier of the button clicked by the user. You can pass dwStyle argument with different values to control the number of buttons, the button titles, and so on.

Parameters:
hParentWnd The handle to the hosting main window.
pszText The message text will be displayed in the message box.
pszCaption The caption of the message box.
dwStyle Specifies the contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags.

To indicate the buttons displayed in the message box, specify one of the following values.

  • MB_OK
    Create a message box within only one button whose title is "OK".
  • MB_OKCANCEL
    Create a message box within two buttons whose title are "OK" and "Cancel" respectively.
  • MB_YESNO
    Create a message box within two buttons whose title are "Yes" and "No" respectively.
  • MB_RETRYCANCEL
    Create a message box within two buttons whose title are "Retry" and "Cancel" respectively.
  • MB_ABORTRETRYIGNORE
    Create a message box within three buttons whose title are "Abort", "Retry" and "Ignore" respectively.
  • MB_YESNOCANCEL
    Create a message box within three buttons whose title are "Yes", "No" and "Cancel" respectively.
  • MB_CANCELASBACK
    Title "Cancel" replaced with title "Previous".

To display an icon in the message box, specify one of the following values.

  • MB_ICONHAND
    Display a hand/stop icon in the message box.
  • MB_ICONQUESTION
    Display a question mark icon in the message box.
  • MB_ICONEXCLAMATION
    Display a exclamation mark icon in the message box.
  • MB_ICONASTERISK
    Display an information icon in the message box.
  • MB_ICONINFORMATION
    Display an information icon in the message box.
  • MB_ICONSTOP
    Display a hand/stop icon in the message box.

To indicate the default button, specify one of the following values.

  • MB_DEFBUTTON1
    The first button is the default button.
  • MB_DEFBUTTON2
    The second button is the default button.
  • MB_DEFBUTTON3
    The third button is the default button.

To indicate the default text alignment, specify one of the following values.

  • MB_ALIGNCENTER
    The message box is center aligned.
  • MB_ALIGNTOPLEFT
    The message box is upper-left aligned.
  • MB_ALIGNBTMLEFT
    The message box is lower-left aligned.
  • MB_ALIGNTOPRIGHT
    The message box is upper-right aligned.
  • MB_ALIGNBTMRIGHT
    The message box is lower-right aligned.

To indicate the default align based on hosting window, specify the following value.

  • MB_BASEDONPARENT
    A flag indicates that the alignments above are based on the hosting window, not the desktop.
Returns:
The identifier of the button clicked by user, can be one of the following values:
  • IDOK
    The "OK" button clicked.
  • IDCANCEL
    The "Cancel" or "Previous" button clicked.
  • IDABORT
    The "Abort" button clicked.
  • IDRETRY
    The "Retry" button clicked.
  • IDIGNORE
    The "Ignore" button clicked.
  • IDYES
    The "Yes" button clicked.
  • IDNO
    The "No" button clicked.
Note:
This function will call GetSysText to translate the button titles to localized text.
See also:
GetSysText, DialogBoxIndirectParam
int GUIAPI SetBitmapKeyColor ( HDC  hdc,
PBITMAP  bmp,
Uint8  r,
Uint8  g,
Uint8  b 
)

Set the bitmap color key.

This function set the bitmap member bmColorKey with the param r,g,b and set the BMP_TYPE_COLORKEY flag.

Parameters:
hdc The device context.
bmp Point of the bitmap which to set color key.
r The red componets of RGB color.
g The green componets of RGB color.
b The blue componets of RGB color.
Returns:
ERR_BMP_OK for success, ERR_BMP_UNKNOWN_TYPE for error.

/sa SetMemDCColorKey

Generated on Thu Apr 7 16:01:51 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3