怎么会不行,看过帮助后再说吧<br><br>The MessageBox function creates, displays, and operates a message box. The message box contains an application-defined message and title, plus any combination of predefined icons and push buttons. <br><br>int MessageBox(<br><br> HWND hWnd, // handle of owner window<br> LPCTSTR lpText, // address of text in message box<br> LPCTSTR lpCaption, // address of title of message box <br> UINT uType // style of message box<br>  
; <br> <br><br>Parameters<br><br>hWnd<br><br>Identifies the owner window of the message box to be created. If this parameter is NULL, the message box has no owner window. <br><br>lpText<br><br>Points to a null-terminated string containing the message to be displayed. <br><br>lpCaption<br><br>Points to a null-terminated string used for the dialog box title. If this parameter is NULL, the default title Error is used. <br><br>uType<br><br>Specifies a set of bit flags that determine the contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags. <br>Specify one of the following flags to indicate the buttons contained in the message box:<br><br>Flag Meaning<br>MB_ABORTRETRYIGNORE The message box contains three push buttons: Abort, Retry, and Ignore.<br>MB_OK The message box contains one push button: OK. This is the default.<br>MB_OKCANCEL The message box contains two push buttons: OK and Cancel.<br>MB_RETRYCANCEL The message box contains two push buttons: Retry and Cancel.<br>MB_YESNO The message box contains two push buttons: Yes and No.<br>MB_YESNOCANCEL The message box contains three push buttons: Yes, No, and Cancel.<br> <br><br>Specify one of the following flags to display an icon in the message box:<br><br>Flag Meaning<br>MB_ICONEXCLAMATION, <br>MB_ICONWARNING<br> An exclamation-point icon appears in the message box.<br>MB_ICONINFORMATION, MB_ICONASTERISK<br> An icon consisting of a lowercase letter i in a circle appears in the message box.<br>MB_ICONQUESTION A question-mark icon appears in the message box.<br>MB_ICONSTOP, <br>MB_ICONERROR, <br>MB_ICONHAND<br> A stop-sign icon appears in the message box.<br> <br><br>Specify one of the following flags to indicate the default button:<br><br>Flag Meaning<br>MB_DEFBUTTON1 The first button is the default button. MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified.<br>MB_DEFBUTTON2 The second button is the default button.<br>MB_DEFBUTTON3 The third button is the default button.<br>MB_DEFBUTTON4 The fourth button is the default button.<br> <br><br>Specify one of the following flags to indicate the modality of the dialog box:<br><br>Flag Meaning<br>MB_APPLMODAL 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 applications and work in those windows. Depending on the hierarchy of windows in the application, the user may be able to move to other windows within the application. All child windows of the parent of the message box are automatically disabled, but popup windows are not.MB_APPLMODAL is the default if neither MB_SYSTEMMODAL nor MB_TASKMODAL is specified.<br>MB_SYSTEMMODAL 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). This flag has no effect on the user's ability to interact with windows other than those associated with hWnd.<br>MB_TASKMODAL Same as MB_APPLMODAL except that all the top-level windows belonging to the current task are disabled if the hWnd parameter is NULL. Use this flag when the calling application or library does not have a window handle available but still needs to prevent input to other windows in the current application without suspending other applications.