Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
1.60/5 (2 votes)
See more:
hi every body I want to ask that how can I call dialog application to another application by a button in mfc
actully I make a windows calculator and now I make an other dialog for scientific calculator . I want open scientific calculator when scientific mode has selected from standard mode.and this problem had been solved by Diba.s solution but there is another pro
blem and that is how to close the previous dialog when new dialog has been opened?
plz help me
thanks
Posted
Updated 14-Nov-13 22:47pm
v4
Comments
nv3 14-Nov-13 15:33pm    
There is no button in Visual Studio that allows you to switch from a dialog based application to a full main frame window app. Your best bet is probably to generate an empty application with the wizard and then carry over the parts that you already have in your dialog based application.
Albert Holguin 14-Nov-13 15:52pm    
Smells like a repost... did you post this?[^]
Sergey Alexandrovich Kryukov 14-Nov-13 16:45pm    
What exactly do you mean by "move"? Activation of a main window? Something else? Why?
—SA
Niusha.m 15-Nov-13 3:48am    
I mean call an other dialog in current dialog .
Sergey Alexandrovich Kryukov 15-Nov-13 3:50am    
There is no such thing as "call a dialog". If you want to show it on top of another one, this is a bad idea. And why?
—SA

1 solution

right click on current project(for example:Project1)and then Add and then resource
in new dialog box , right click on background of dialog and Add Class
Set the Class Name to CSecondDlg and base it on CDialog
now go to project1Dlg.cpp and add this :
C++
#include "SecondDlg.h"

and this code for button that you want to open second dialog:
C++
CSecondDlg dlg;
dlg.DoModal();


did u mean this?!!
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900