VC++(AfxMessageBox实例)
int AfxMessageBox( LPCTSTR lpszText, UINT nType = MB_OK, UINT nIDHelp = 0 );
MB_ABORTRETRYIGNORE 消息框中显示Abort、Retry、Ignore按钮
MB_OK 显示OK按钮 //AfxMessageBox的用法
MB_OKCANCEL 显示OK、Cancel按钮
MB_RETRYCANCEL 显示Retry、Cancel按钮
MB_YESNO 显示Yes、No按钮
MB_YESNOCANCEL 显示Yes、No、Cancel按钮
图标风格
MB_ICONINFORMATION 显示一个i图标,表示提示
MB_ICONEXCLAMATION 显示一个惊叹号,表示警告
MB_ICONSTOP 显示手形图标,表示警告或严重错误
MB_ICONQUESTION 显示问号图标,表示疑问
Example: AfxMessageBox(nStringID, MB_YESNO|MB_ICONSTOP);
if(AfxMessageBox(strTemp,MB_YESNO|MB_ICONQUESTION)==IDNO) {... };
Return Value: Zero if there is not enough memory to display the message box;
otherwise, one of the following values is returned:
*IDABORT The Abort button was selected.
*IDCANCEL The Cancel button was selected.
*IDIGNORE The Ignore button was selected.
*IDNO The No button was selected.
*IDOK The OK button was selected.
*IDRETRY The Retry button was selected.
*IDYES The Yes button was selected.