Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MFC dialog
Hi,
 
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 1:33am
Rate this: bad
good
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.
 
—SA
  Permalink  
Comments
Member 8112150 at 9-Aug-11 1:46am
   
hi,
 
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
good
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).
  Permalink  
Comments
Member 8112150 at 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 at 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 at 12-Aug-11 2:37am
   
hey,
 
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
0 Mathew Soji 330
1 BillWoodruff 260
2 Sergey Alexandrovich Kryukov 240
3 OriginalGriff 216
4 Afzaal Ahmad Zeeshan 208
0 OriginalGriff 6,168
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,028
3 Manas Bhardwaj 4,539
4 Maciej Los 3,845


Advertise | Privacy | Mobile
Web02 | 2.8.1411019.1 | Last Updated 4 Aug 2011
Copyright © CodeProject, 1999-2014
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