1. 函数原型
int MessageBox( HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType);
2.参数说明
hWnd
Specify one of the following flags to indicate the buttons contained in the message box:
该参数确定MessageBox窗口的类型。该参数的取值有:
| Value | Description |
|---|---|
| MB_ABORTRETRYIGNORE | The message box contains three push buttons: Abort, Retry, and Ignore. |
| MB_OK | The message box contains one push button: OK. This is the default. |
| MB_OKCANCEL | The message box contains two push buttons: OK and Cancel. |
| MB_RETRYCANCEL | The message box contains two push buttons: Retry and Cancel. |
| MB_YESNO | The message box contains two push buttons: Yes and No. |
| MB_YESNOCANCEL | The message box contains three push buttons: Yes, No, and Cancel. |
本文详细介绍了Windows API中的MessageBox函数,包括其函数原型、各参数的作用及使用方法。通过对hWnd、lpText、lpCaption和uType等参数的解析,帮助读者更好地理解和应用此函数。
396

被折叠的 条评论
为什么被折叠?



