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按鈕
圖標(biāo)風(fēng)格
MB_ICONINFORMATION 顯示一個i圖標(biāo),表示提示
MB_ICONEXCLAMATION 顯示一個驚嘆號,表示警告
MB_ICONSTOP 顯示手形圖標(biāo),表示警告或嚴(yán)重錯誤
MB_ICONQUESTION 顯示問號圖標(biāo),表示疑問
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.