【发布时间】:2011-03-17 05:04:57
【问题描述】:
这个“简单”的问题似乎充满了附带问题。
例如。新进程是否打开多个窗口;它有启动画面吗?
有简单的方法吗? (我正在启动一个新的 Notepad++ 实例)
...
std::tstring tstrNotepad_exe = tstrProgramFiles + _T("\\Notepad++\\notepad++.exe");
SHELLEXECUTEINFO SEI={0};
sei.cbSize = sizeof(SHELLEXECUTEINFO);
sei.fMask = SEE_MASK_NOCLOSEPROCESS;
sei.hwnd = hWndMe; // This app's window handle
sei.lpVerb = _T("open");
sei.lpFile = tstrNotepad_exe.c_str();
sei.lpParameters = _T(" -multiInst -noPlugins -nosession -notabbar ";
sei.lpDirectory = NULL;
sei.nShow = SW_SHOW;
sei.hInstApp = NULL;
if( ShellExecuteEx(&sei) )
{ // I have sei.hProcess, but how best to utilize it from here?
}
...
【问题讨论】: