posts - 13,  comments - 0,  trackbacks - 0
      int MessageBox( LPCTSTR lpszText, LPCTSTR lpszCaption = NULL,
 UINT nType = MB_OK );
参数:
lpszText: 消息正文
lpszCaption:消息框标题(默认没有)
nType:消息框的风格

nType取值:
1.消息框的风格
 ? MB_ICONQUESTION
 ! MB_ICONWARNING
 X MB_ICONHAND or MB_ICONSTOP
 i MB_ICONINFORMATION
2.Button Array:
 按钮 消息框类型

 [YES] [NO] MB_YESNO
 [YES][NO][CANCEL] MB_YESNOCANCEL
 [RETRY][CANCEL] MB_RETRYCANCEL
 [OK] MB_OK
 [OK][CANCEL] MB_OKCANCEL
 [ABORT][RETRY][IGNORE] MB_ABORTRETRYIGNORE
 (想在弹出的对话框中显示的按钮,默认为MB_OK)

Return Values of MessageBox:
 Value Meaning

IDABORT Abort button was selected.
IDCANCEL Cancel button was selected.
IDIGNORE Ignore button was selected
IDNO No button was selected.
IDOK OK button was selected
IDRETRY Retry button was selected.
IDYES Yes button was selected

nType中可以组合使用, for examble:
...
int iRes = MessageBox("你看见消息框了吗?","测试",MB_YESNO | MB_ICONWARNING);
 if( iRes == IDYES )
 MessageBox("看见了就好!");
posted on 2010-12-26 22:21 xiwrong 阅读(272) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
【推荐】超50万行VC++源码: 大型组态工控、电力仿真CAD与GIS源码库
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2010年12月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

常用链接

留言簿

随笔档案

搜索

  •  

最新随笔

最新评论

评论排行榜