MFC 非模态对话框.docVIP

  • 7
  • 0
  • 约4.47千字
  • 约 3页
  • 2018-03-07 发布于河南
  • 举报
MFC 非模态对话框

MFC 非模态对话框 MFC非模态对话框的创建: 用MFC创建非模态的对话框,和模态对话框创建方式不同,模态对话框用 dlg.DoModel()调用,而非模态对话框要用create函数创建调用。 /*假设IDD_TEST_DLG为已经定义的对话框资源的ID号*/ CTestDlg *dlg=new CTestDlg; dlg-Create(IDD_TEST_DLG,NULL); dlg-ShowWindows(SW_SHOW);//SW_SHOW是对话框的显示方式 MFC非模态对话框的销毁: 非模态对话框相对于模态对话框,他的创建和销毁过程和模态对话框有一定的区别,先看一下MSDN的原文:When you implement a modeless dialog box, always override the OnCancel member function and call DestroyWindow from within it. Don’t call the base class CDialog::OnCancel, because it calls EndDialog, which will make the dialog

文档评论(0)

1亿VIP精品文档

相关文档