[GD-Windows] Foregroundness
Brought to you by:
vexxed72
From: Daniel V. <vo...@ep...> - 2001-11-01 02:00:24
|
I'm having some problems with forcing my app to the foreground. We currently show a splash screen at startup and defer going fullscreen till almost everything is loaded so there is enough time for a user to click on other windows to continue browsing or whatever (especially in debug builds ;)). I don't want to change this behaviour at all and using the below code to obtain foregroundness works except if the app that currently has the focus/ is the foreground app is 'cmd'. Is there a way to make it work even in this case? HWND hWndForeground = ::GetForegroundWindow(); AttachThreadInput(GetWindowThreadProcessId(hWndForeground, NULL), GetCurrentThreadId(), true); SetForegroundWindow( Window->hWnd ); AttachThreadInput(GetWindowThreadProcessId(hWndForeground, NULL), GetCurrentThreadId(), false); - Daniel Vogel, Programmer, Epic Games Inc. |