Hide and show dialogs
-
Hi All, I have two dialogs(IDD_DIALOG,IDD_DIALOG1).How to hide and show these dialog.
-
Hi All, I have two dialogs(IDD_DIALOG,IDD_DIALOG1).How to hide and show these dialog.
I assume you have modeless dialogs, in which case simply use ShowWindow[^]. If this doesn't answer your question, please give us more info about your problem.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
-
Hi All, I have two dialogs(IDD_DIALOG,IDD_DIALOG1).How to hide and show these dialog.
ShowWindow
«_Superman_»
-
I assume you have modeless dialogs, in which case simply use ShowWindow[^]. If this doesn't answer your question, please give us more info about your problem.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
I did like this.
this->ShowWindow(SW_HIDE);
CMyDlg *NU = new CMyDlg();
NU->ShowWindow(SW_SHOWNORMAL);But it showing debug Assertion error.
-
I did like this.
this->ShowWindow(SW_HIDE);
CMyDlg *NU = new CMyDlg();
NU->ShowWindow(SW_SHOWNORMAL);But it showing debug Assertion error.
I think you either need something like this:
CMyDlg Dlg;
Dlg.DoModal();or something like this:
CMyDlg *Dlg = new CMyDlg();
Dlg->Create(IDD_DIALOG, NULL);
Dlg->ShowWindow(SW_SHOW);Of course you need to pay atention at deleting your dialog once you are done with it if you created it with new...
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
-
I think you either need something like this:
CMyDlg Dlg;
Dlg.DoModal();or something like this:
CMyDlg *Dlg = new CMyDlg();
Dlg->Create(IDD_DIALOG, NULL);
Dlg->ShowWindow(SW_SHOW);Of course you need to pay atention at deleting your dialog once you are done with it if you created it with new...
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
I dont need to create the dialog again. I need to show the hidden dialog. Pls help me....
-
I dont need to create the dialog again. I need to show the hidden dialog. Pls help me....
Ok, to clear out misunderstandings, show me how you created your dialogs. If you created both dialogs then you need to call ShowWindow(SW_SHOW) or ShowWindow(SW_HIDE) on the instances of the classe you already created, not on a new instance.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
-
I did like this.
this->ShowWindow(SW_HIDE);
CMyDlg *NU = new CMyDlg();
NU->ShowWindow(SW_SHOWNORMAL);But it showing debug Assertion error.
AnithaSubramani wrote:
But it showing debug Assertion error.
Don't keep us in suspense. What line of what file asserted?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch