We help IT Professionals succeed at work.

Imoprting Dialogs

yaAlex
yaAlex asked
on
I created a pretty elaborate dialog in a separate application. Now I want to import this dialog with all the controls to my main application. Can i do that using MFC GUI? And if yes - how ?

Thank you
Comment
Watch Question

ekc

Commented:
Right click on your dialog class in the Browser window and "Add to gallery".
Then open your main app proyect enter menu -> Project -> Add to project -> Components and Controls.
In the "open" window, enter the directory with your dialog name and select the OGX file from it.
This will create all the needed stuff...

Author

Commented:
Thanks I never knew this trick. It works but I have a problem with the "about" dilaog box and it's components.I try to remove all of them from my auxilliary application before exporting the dialog box. May be another method exists to eliminate an extra "about" stuff ?
Commented:
Why would you try to remove them?
The component is exported on the class basis and you can export your dialog only, without touching the "about" class.
But if you realy want to remove this box, you can eliminate it's files (h and cpp) from the project (using Browser window -> del) and I suposse the compiler will take care of all the clean-up work (i.e. the recource file details - every dialog has its data in the app's resource file). You will have to try this out, I'm not sure.

Author

Commented:
Unfortunately, when i created the auxiliary dialog-based application i did not uncheck the about box. MFC embedded the about dlg class on mydlg.cpp and .h and spreaded a lot of other stuff all over the place as usual. i commented it out and everything worked fine. Thank you again.    

Explore More ContentExplore courses, solutions, and other research materials related to this topic.