How to get hWnd of window opened by ShellExecuteEx.. hProcess?
问题 This "simple" issue seems to be fraught with side issues. eg. Does the new process open multiple windows; Does it have a splash screen? Is there a simple way? (I'm starting a new instance of 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