Click to See Complete Forum and Search --> : About ShellExecute Function


June 21st, 1999, 06:19 AM
How to get Handler to window(HWND) that was created by function "ShellExecute" function?

Jason Teagle
June 21st, 1999, 06:52 AM
ShellExecute() returns an HINSTANCE if successful. You need to call EnumWindows() to list all top-level windows, and then use

hInstWnd = (HINSTANCE)::GetWindowLong(hWnd, GWL_HINSTANCE)

on each of them to see if hInstWnd matches the instance returned from ShellExecute().