▲▲ dialog的简单问题,请进 ▲▲ 我想在第一个dialog的onbutton里先隐藏第一个dialog,然后domodal第二个dialog,但怎么隐藏第一个?或者还有别的方法? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用 showwindow() 将第一个窗口隐藏。然后 domodal 第二个窗口第二个返回后,在用 showwindow() 把第一个显示出来 有很多方法,现提供一种,可以试试OnButton1(...){ CMyDialog2 dlg; this->ShowWindow(SM_HIDE); dlg.DoModal(); this->ShowWindow(SM_SHOW);} 用這樣的:DLG1的OnButton里{ CYourDialog dlg(this); this->ShowWindow(SW_HIDE); dlg.DoModal();}然後在dlg里做如下動作:BOOL CYourDialog::DestroyWindow() { // TODO: Add your specialized code here and/or call the base class this->lpParent->ShowWindow(SW_SHOW); return CDialog::DestroyWindow(); } this->EndDialog(0); 用0和1有什么区别? 是不是每个dialog都需要对应一个类? 怎样用CAsyncSocket实现udp监听? hook dll弹出对话框 多路串口并行操作问题 如何把COM组件的DLL加载到IE浏览器??? 怎么做出漂亮的工具栏图标 运行 GetSystemTime 时出错 EXE文件格式 请问在CSocket当中,OnAccept和OnRetrieve有什么区别 bat文件求助,能正确执行马上给分! 利用opencv提取Hu矩函数提取Hu矩,这样写不对吗?总有错,存在异常。。。大家帮帮忙。。。 CRecordset help! 求救!资源释放问题
然后 domodal 第二个窗口
第二个返回后,在用 showwindow() 把第一个显示出来
OnButton1(...)
{
CMyDialog2 dlg;
this->ShowWindow(SM_HIDE);
dlg.DoModal();
this->ShowWindow(SM_SHOW);
}
DLG1的OnButton里
{
CYourDialog dlg(this);
this->ShowWindow(SW_HIDE);
dlg.DoModal();
}
然後在dlg里做如下動作:
BOOL CYourDialog::DestroyWindow()
{
// TODO: Add your specialized code here and/or call the base class
this->lpParent->ShowWindow(SW_SHOW);
return CDialog::DestroyWindow();
}