Click here to Skip to main content
12,398,181 members (60,067 online)
Rate this:
Please Sign up or sign in to vote.
See more: MFC dialog

i have been developing a MFC dialog based application.
a new requirement came up such that first another dialog box will be displayed and on clicking on a button in it, the dialog i was developing should pop up.

can i just makes modifications in the existing code to call the other UI first?
if so what should be the changes?

or should i create a new project and copy the files??
Posted 4-Aug-11 0:33am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You should introduce Revision Control system and stop asking yourself or anyone else such questions. So far, you did not even start producing your software. Where are your artifacts? In the air? Any wrong modification and you loose the ends? Or you back up? How often? And how do you find proper back-up to retreat your step?

No, you do not do software development yet, you just waste your development life working( at permanent risk or loosing everything or (more typically) making a mess-up without apparent way to sort out the entangled.

With Revision Control System, you should make a release and freeze it (release branch in some system, tag in others), continue development on trunk. Nevertheless, you should exercise building a project from scratch in any new computer or a different place and keep it flawless. Revision Control Systems can be Open Source (should be, in my opinion; don't risk your work to the proprietary), used by millions and therefore well supported.

About selection of concrete system, please see this discussion:
Revision control systems, which to choose from?[^]

Stop doing what you doing and start real software development.

Member 8112150 9-Aug-11 1:46am

i m not sure if you got my situation right.
i was developing a sample keyboard application. but now i need to invoke the same on the click of a button.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

A MFC dialog based application has a main application (something derived from CWinApp) and a GUI (something derived from CDialog). With that said, you can add any number of GUIs (CDialogs or whatever) to the CWinApp, just look at the source in there to see where its most appropriate. Usually a MFC dialog based application creates a single modal dialog, meaning the application terminates when the dialog is closed. To change this behavior, just make the dialogs non-modal (unless you have one main dialog).
Member 8112150 9-Aug-11 1:48am
i have a dialog box and the main application.
is there any way to make the dialog box as the main application??
i seriously am finding it hard to explain the scenario i need..
really sorry :(
Albert Holguin 9-Aug-11 10:24am
That's an MFC dialog application... although you could make a dialog be a CWinApp, not sure it was meant to be used that way and I don't see how that would be useful in any way. If my explanation above wasn't clear to what you have, maybe you need to restate your question and what it is you currently have.
Member 8112150 12-Aug-11 2:37am

thanks for the help..

i was able to call the desired UI first by changing the function that was mapped to CWinApp.
instead of calling the old UI.domodal, i called the desired Ui.domodal and solved my issue :)

thanks all for the help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 4 Aug 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100