How to switch between windows?
-
-
Hi, When I press a push button on one dialog box ,other dialog box or form should be displayed.How Can I do that? Also please tell me how can we start an application B from other application A( eg. by pressing push button on application A). Drushti
In the button click event handler, add something like
CSecondDialog dlg; dlg.DoModal();
Have a read of CDialog::DoModal[^] for further info. Launching a FormView is slightly more complex, especially in an SDI app - have a read of Switching Views in a Single Document Interface Program[^] Michael CP Blog [^] -
Hi, When I press a push button on one dialog box ,other dialog box or form should be displayed.How Can I do that? Also please tell me how can we start an application B from other application A( eg. by pressing push button on application A). Drushti
-
to start another application, use ShellExecute() Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store My articles[^] bdiamond :zzz:
-
In the button click event handler, add something like
CSecondDialog dlg; dlg.DoModal();
Have a read of CDialog::DoModal[^] for further info. Launching a FormView is slightly more complex, especially in an SDI app - have a read of Switching Views in a Single Document Interface Program[^] Michael CP Blog [^] -
Hi bdiamond, How to use Shellexecute to switch to other application in VC++ by just clicling a push button?? Can u please elaborate on this ? Thankyou in advance. Drushti
ShellExecute(NULL, "open", "myapplication.exe", NULL, NULL, SW_SHOWNORMAL);
that will open an application and start it called "myapplication.exe", of course you'd have to replace that with the real name of your app. However if an application is already open, you would probably have to use something like
FindWindow()
to get the window's hWnd, then callSetForegroundWindow()
or something like that. Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store My articles[^] bdiamond :zzz: