EgtExecutor 1.8b6 :

- aggiunta impostazione handle finestra principale dell'exe per dialoghi della dll.
This commit is contained in:
Dario Sassi
2017-02-27 10:19:47 +00:00
parent 7a3cce8d59
commit 45c2e7a8b1
5 changed files with 28 additions and 5 deletions
+3 -2
View File
@@ -27,14 +27,15 @@ FindTopWindow( void)
pair<HWND, DWORD> params = { 0, pid} ;
// Enumerate the windows using a lambda to process each window
SetLastError( 0) ;
BOOL bResult = EnumWindows( []( HWND hWnd, LPARAM lParam) -> BOOL
{
auto pParams = ( pair<HWND, DWORD>*)(lParam) ;
DWORD processId ;
if ( GetWindowThreadProcessId( hWnd, &processId) &&
if ( GetWindowThreadProcessId( hWnd, &processId) != NULL &&
processId == pParams->second &&
GetWindow( hWnd, GW_OWNER) == (HWND) nullptr &&
GetWindow( hWnd, GW_OWNER) == NULL &&
IsWindowVisible( hWnd)) {
// Stop enumerating
SetLastError( -1) ;