rafziggy

Hi all.

I've a windows multidocument application initially developed by visual studio 6.0. I've a propertysheet derived class used in modal way. Now I've the need to use it in modeless way too. What's the best solution for this problem

Thanks.

Raffaele



Re: Visual C++ Language From modal to modeless dialog

Paul Marriott

Whether to use modal or modeless would be determined by how the dialog can be or needs to be used in your application.

Generally if a dialog is one time use with an OK button and then the user goes onto something else then modal will do.

If the user needs the dialog open all the time and sets changes with the Apply Now button then modeless would be better to think about.

But I repeat, it really depends on the how dialog is used by the user of your application.





Re: Visual C++ Language From modal to modeless dialog

rafziggy

first of all, thank you. Probably I was not clear in my question. My problem is to change the modalyty of dialog windows from modal to modeless. In few words the question is: how to modify the relative code in relation above all in creation and showing it





Re: Visual C++ Language From modal to modeless dialog

Holger Grund

You wouldn't call DialogBox(Xxx) but CreateDialog(Xxx) and use the standard message loop to dispatch messages to the dialog. DialogBox(Xxx) disables the parent and runs its own message loop discarding window messages that are not relevant for the dialog (i.e. other windows no longer "react").

In MFC the former maps to CDlg:Big SmileoModal the latter CDlg::Create. Just calling Create should do the trick.

-hg





Re: Visual C++ Language From modal to modeless dialog

rafziggy

Thank you. I'm trying and the creation and visualization it's ok. Now I'll try to manage standard message for the dialog.