Can we open two Modal Dialogs at Same Time?
-
Hello Friends I am creating a win32 based window application.I created one modal Dialog but at the same time while first modal dialog is open I want to open another second modal dialog so for that I created second modal dialog in showWindow of First Modal Dialog. But It is not opening. First of all ,I want to know that can we do it ? Or is any other way to do it? I want to know one more thing that How can I get the Handle of Modal Dialog? Thanks In Advance. Regards Yogesh
-
Hello Friends I am creating a win32 based window application.I created one modal Dialog but at the same time while first modal dialog is open I want to open another second modal dialog so for that I created second modal dialog in showWindow of First Modal Dialog. But It is not opening. First of all ,I want to know that can we do it ? Or is any other way to do it? I want to know one more thing that How can I get the Handle of Modal Dialog? Thanks In Advance. Regards Yogesh
What do you want to achieve exactly ? That you have the two modal dialogs but only the last opened can be used (so the last one is on top and doesn't allow the first one to be clicked) ? Or do you really want to be able to click on the two dialogs at the same time but not on the rest of your application ? I guess from your question that it is what you want to achieve. In that case, your second dialog has to be a modeless dialog (if you search in the articles of codeproject, you'll find plenty of articles discussing them).
Cédric Moonen Software developer
Charting control [v2.0] OpenGL game tutorial in C++ -
Hello Friends I am creating a win32 based window application.I created one modal Dialog but at the same time while first modal dialog is open I want to open another second modal dialog so for that I created second modal dialog in showWindow of First Modal Dialog. But It is not opening. First of all ,I want to know that can we do it ? Or is any other way to do it? I want to know one more thing that How can I get the Handle of Modal Dialog? Thanks In Advance. Regards Yogesh
You first need to understand "blocking", "modality" and the relationship between them. I can only tell you that if you really need two modal dialogs to be displayed simultaneously (why would such a thing be needed completely escapes me), then you could spawn the dialogs from two different threads (one could be the main thread). But seriously reconsider what you're doing. Perhaps there's something better that you can do.
“Follow your bliss.” – Joseph Campbell
-
Hello Friends I am creating a win32 based window application.I created one modal Dialog but at the same time while first modal dialog is open I want to open another second modal dialog so for that I created second modal dialog in showWindow of First Modal Dialog. But It is not opening. First of all ,I want to know that can we do it ? Or is any other way to do it? I want to know one more thing that How can I get the Handle of Modal Dialog? Thanks In Advance. Regards Yogesh
Your design is wrong! A modal dialog is used to stop an application while the user enters some information, selects options etc, in order to control the work to be done. The whole idea of modal dialogs is to prevent the user doing anything until the requirements of the dialog have been met. If you need more than one dialog at the same time then the design of your application is seriously flawed.
-
Hello Friends I am creating a win32 based window application.I created one modal Dialog but at the same time while first modal dialog is open I want to open another second modal dialog so for that I created second modal dialog in showWindow of First Modal Dialog. But It is not opening. First of all ,I want to know that can we do it ? Or is any other way to do it? I want to know one more thing that How can I get the Handle of Modal Dialog? Thanks In Advance. Regards Yogesh