External program execution
-
To execute another program from within your MFC/SDK application you can use 'ShellExecute'. ================== The original message was: I would like to know how I can execute another program
from within my MFC apps. -
================== The original message was: I would like to know how I can execute another program
from within my MFC apps. I recommend using the _exec function or any of the variations of it. Look it up in C++ help since the command instructions are extensive. Best wishes for the holday! -
To execute another program from within your MFC/SDK application you can use 'ShellExecute'. ================== The original message was: I would like to know how I can execute another program
from within my MFC apps.================== The original message was: To execute another program from within your MFC/SDK application you can use 'ShellExecute'.
==================
The original message was:I would like to know how I can execute another program
from within my MFC apps. Thanks, This is what I needed -
STARTUPINFO si; PROCESS_INFORMATION pi; BOOL bResult; // Initialise the STARTUPINFO structure memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOW; bResult = ::CreateProcess(NULL, // no executable module name (use command line) "WordPad.Exe", // command line, file name in same directory as the DLL NULL, // process handle not inheritable NULL, // thread handle not inheritable FALSE, // handle inheritance 0, // no creation flags NULL, // use parent's environnement block NULL, // use parent's starting directory &si, // pointer to STARTUPINFO structure &pi); // pointer to PROCESS_INFORMATION structure if (!bResult) { TRACE("Can't start WordPad.Exe\n"); } regards, Jean-Claude.