菜鸟请教:在MFC中,怎样按一个按键去连接到另一个应用程序
比如我写一个界面,上面放了一个按钮,我一按键就执行保存在C:/QQ/QQ.EXE,运行QQ程序。
已搞定
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "D:\\meter\\Meter.exe";
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
// WaitForSingleObject(ShExecInfo.hProcess,INFINITE);