AfxMessageBox()函数消息框按钮和图标

消息框中显示的按钮
CString str1;
	str1.Format(_T("MB_ABORTRETRYIGNORE"), height, width);
	//消息框包含三个按钮:Abort,Retry和Ignore
	AfxMessageBox(str1, MB_ABORTRETRYIGNORE | MB_ICONINFORMATION, 0);

在这里插入图片描述

CString str2;
	str2.Format(_T("MB_CANCELTRYCONTINUE"), height, width);
	//消息框包含三个按钮:取消,再试一次,继续
	AfxMessageBox(str2, MB_CANCELTRYCONTINUE | MB_ICONWARNING, 0);

在这里插入图片描述

CString str3;
	str3.Format(_T("MB_HELP"), height, width);
	//消息框包含两个按钮:确定和帮助
	AfxMessageBox(str3, MB_HELP | MB_ICONWARNING, 0);

在这里插入图片描述

CString str4;
	str4.Format(_T("MB_OK "), height, width);
	//消息框包含一个按钮:确定
	AfxMessageBox(str4, MB_OK | MB_ICONWARNING, 0);

在这里插入图片描述

CString str5;
	str5.Format(_T("MB_OKCANCEL"), height, width);
	//消息框包含两个按钮:确定和取消
	AfxMessageBox(str5, MB_OKCANCEL | MB_ICONWARNING, 0);

在这里插入图片描述

CString str6;
	str6.Format(_T("MB_RETRYCANCEL"), height, width);
	//消息框包含两个按钮:重试和取消
	AfxMessageBox(str6, MB_RETRYCANCEL | MB_ICONWARNING, 0);

在这里插入图片描述

CString str7;
	str7.Format(_T("MB_YESNO"), height, width);
	//消息框包含两个按钮:是和否
	AfxMessageBox(str7, MB_YESNO | MB_ICONWARNING, 0);

在这里插入图片描述

CString str8;
	str8.Format(_T("MB_YESNOCANCEL"), height, width);
	//消息框包含三个按钮:是,否和取消
	AfxMessageBox(str8, MB_YESNOCANCEL | MB_ICONWARNING, 0);

在这里插入图片描述

消息框中显示图标
CString str9;
	str9.Format(_T("MB_ICONEXCLAMATION"), height, width);
	//消息框中会出现一个惊叹号图标
	AfxMessageBox(str9, MB_OK | MB_ICONEXCLAMATION, 0);

在这里插入图片描述

CString str10;
	str10.Format(_T("MB_ICONWARNING"), height, width);
	//消息框中会出现一个惊叹号图标
	AfxMessageBox(str10, MB_OK | MB_ICONWARNING, 0);

在这里插入图片描述

CString str11;
	str11.Format(_T("MB_ICONINFORMATION"), height, width);
	//消息框中将出现一个由圆圈 中的小写字母i组成的图标
	AfxMessageBox(str11, MB_OK | MB_ICONINFORMATION, 0);

在这里插入图片描述

CString str12;
	str12.Format(_T("MB_ICONASTERISK"), height, width);
	//消息框中将出现一个由圆圈 中的小写字母i组成的图标
	AfxMessageBox(str12, MB_HELP | MB_ICONASTERISK, 0);

在这里插入图片描述

CString str13;
	str13.Format(_T("MB_ICONQUESTION"), height, width);
	//消息框中会出现一个问号图标
	AfxMessageBox(str13, MB_HELP | MB_ICONQUESTION, 0);

在这里插入图片描述

CString str14;
	str14.Format(_T("MB_ICONSTOP"), height, width);
	//消息框中会出现一个停止标志图标
	AfxMessageBox(str14, MB_HELP | MB_ICONSTOP, 0);

在这里插入图片描述

CString str15;
	str15.Format(_T("MB_ICONERROR"), height, width);
	//消息框中会出现一个停止标志图标
	AfxMessageBox(str15, MB_HELP | MB_ICONERROR, 0);

在这里插入图片描述

CString str16;
	str16.Format(_T("MB_ICONHAND"), height, width);
	//消息框中会出现一个停止标志图标
	AfxMessageBox(str16, MB_HELP | MB_ICONHAND, 0);

在这里插入图片描述

  • 1
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值