How do we hide Modal Dialog Boxes?
-
CWnd
class provides aShowWindow()
function which you could passSW_HIDE
/SW_SHOW
parameters...
TOXCCT >>> GEII power
[toxcct][VisualCalc 2.20][VCalc 3.0 soon...]toxcct wrote:
CWnd class provides a ShowWindow() function which you could pass SW_HIDE/SW_SHOW parameters...
In Case of Modal Dialog, same will not work!, see my reply to actual poster!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
:(( I have a modal dialog box A and when it runs, it stays on top. Is there a way to hide the dialog box or set dialog box A at the back of another modal dialog box? I'm using MFC. I'm kinda desperate for solutions. waxie -- modified at 5:30 Wednesday 18th January, 2006
This will help you... http://www.codeproject.com/dialog/dlgboxtricks.asp[^]
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
-
Wow, I think your are mixing everything :~ Ok, first, using a modeless dialog box is still done with a ressource. In fact the only thing that changes is that it lets the user work with the rest of your program. Let's take an example:
CMyModalDlg Dlg; Dlg.DoModal(); MessageBox("Test message");
If you run this code, you will see that the "Test message" (message box) will only be displayed when you close your modal dialog. It means that your program 'stops' at this line to let the message box receive the inputs from the user. Once the dialog is closed, the DoModal function is exited and your program continues. But this also means that your program main loop is not processed thus you cannot work with the rest of your application (I think you already discovered that). Now, if instead of using a dialog box, you use a modeless one, you won't call the DoModal function (but rather simply ShowWindow) and thus, your program will continue and show immediatley the message box. This means also that you will still be able to 'work' with the rest of your program (click on buttons,...). I suggest you to search for modeless articles on this website to see how to use them. In your example, you won't be able to have two moal dialogs (because of what I explained below). Or, the only way to do it is to open one 'inside the code' of the first one. But, then the first one won't be refreshed and processed. I suggest that you buy yourself a book about the MFC because you are lacking some important concepts there. And it is impossible to explain in detail through a forum. Hope this helpsThank you very much for your reply Cedric! :) I sorta crashed myself into MFC. I had to do many things immediately, and learn in the process. Yeah, I admit I have a lousy mfc foundation and sorta did not have a good mfc first impression (I was a java kid). I am sort of in an experimenting stage right now. Good thing there are many of you experts here who can share your thoughts. Thanks! Waxie
-
This will help you... http://www.codeproject.com/dialog/dlgboxtricks.asp[^]
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
-
Owner drawn wrote:
This will help you...
Hai, i win the race this time :)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
Yeah you're right. I didn't see your post as the page was not refreshed. I only saw it afterwards. Dang!:sigh:
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
-
Yeah you're right. I didn't see your post as the page was not refreshed. I only saw it afterwards. Dang!:sigh:
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
Owner drawn wrote:
I didn't see your post as the page was not refreshed. I only saw it afterwards.
Better Luck next time... Welcome to Fastest Finger Fast Competition :)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
Owner drawn wrote:
I didn't see your post as the page was not refreshed. I only saw it afterwards.
Better Luck next time... Welcome to Fastest Finger Fast Competition :)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
Sure buddy! Wait and watch :laugh:
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
-
Thank you very much for your reply Cedric! :) I sorta crashed myself into MFC. I had to do many things immediately, and learn in the process. Yeah, I admit I have a lousy mfc foundation and sorta did not have a good mfc first impression (I was a java kid). I am sort of in an experimenting stage right now. Good thing there are many of you experts here who can share your thoughts. Thanks! Waxie
You're welcome ;)
-
Owner drawn wrote:
I didn't see your post as the page was not refreshed. I only saw it afterwards.
Better Luck next time... Welcome to Fastest Finger Fast Competition :)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
ThatsAlok wrote:
Welcome to Fastest Finger Fast Competition
:sigh: i was still running the Fastest Nose Contest... :((
TOXCCT >>> GEII power
[toxcct][VisualCalc 2.20][VCalc 3.0 soon...] -
ThatsAlok wrote:
Welcome to Fastest Finger Fast Competition
:sigh: i was still running the Fastest Nose Contest... :((
TOXCCT >>> GEII power
[toxcct][VisualCalc 2.20][VCalc 3.0 soon...]