Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start an .exe from within another .exe (MFC) 1

Status
Not open for further replies.

richsb

Technical User
Aug 2, 2001
34
NO
Hi all,

I have got a dialog project, and a single document interface project. I would like to be able to start the SDI from the dialog project via a button control. The button and message handler are setup but that is as far as I can get. Both projects are now in the same project!

Any help appreciated, thanks.

Boatman
 
Use the WinExec() function. It takes only two parameters. The first one of the filename and directory (if not in the same folder) and the second is the window style. I use something like SM_SHOW or WM_SHOW. I can't remember which one...
 
Thanks for that, it got me going again. However, the online help states that is for 16 bit apps now, and that for 32 bit apps the CreateProcess() should be used. Far more complicated than WinExec() however and WinExec did get it going so I will stick with it.

Have a pint on me !
 
richsb,
you can also try to use the function "ShellExecute" it is more simple than "CreateProcess" and it was designed for 32 bit applications.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top