相关疑难解决方法(0)

如何通过ShellExecuteEx打开hWnd窗口.. hProcess?

这个"简单"问题似乎充满了侧面问题.
例如.新进程是否打开了多个窗口; 它有闪屏吗?
有一个简单的方法吗?(我正在开始一个新的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?
}
...
Run Code Online (Sandbox Code Playgroud)

c++ window process handle

8
推荐指数
1
解决办法
1万
查看次数

标签 统计

c++ ×1

handle ×1

process ×1

window ×1