C++语言 在对话框关闭时弹出确认窗口

来源:互联网 发布:品牌十大评选网络投票 编辑:程序博客网 时间:2024/05/05 13:29

学习笔记转摘于: 蟒蛇软件站 http://www.pythonschool.com/python/list_168_1.html

void CWelcomeDlg::OnClose() {    // TODO: Add your message handler code here and/or call default    if(MessageBox("Are you sure close this windows?", "closing", MB_OKCANCEL|MB_ICONQUESTION) == IDOK)    {        CDialog::OnClose();        }    //创建一个基于对话框的应用程序.    //通过类向导选择WM_CLOSE消息事件    //在对话框的消息事件中实现代码}

原创粉丝点击