VC++(AfxMessageBox实例)

 

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.

posted on 2009-06-07 10:39 wrh 阅读(3318) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


导航

<2009年6月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

统计

常用链接

留言簿(19)

随笔档案

文章档案

收藏夹

搜索

最新评论

阅读排行榜

评论排行榜