在MFC(Microsoft Foundation Classes)中打开另一个程序,你可以使用`ShellExecute`函数。这个函数是Windows API的一部分,可以用来启动程序、打开文件、打开网页等。
以下是一个使用`ShellExecute`函数在MFC应用程序中打开另一个程序的示例代码:
```cpp
include
void CYourClass::OpenAnotherProgram()
{
// 要打开的程序路径
char szExePath[] = "C:Program FilesSomeAppSomeApp.exe";
// 使用ShellExecute打开程序
ShellExecute(NULL, _T("open"), szExePath, NULL, NULL, SW_SHOW);