S
Stephan Steiner
Hi
I need to start a GUI application from a console app. Upon startup, the
application can display one or two popups, which need clicking away. I have
all this handled using FindWindow, GetDLGCtrlID and PostMessage respectively
(find window, find control ID of the button that needs pressing, and press
the button).
However, the software in question will only bring up the popup if it is in
the foreground. So I'm using GetForegroundWindow to find the window that
currently has focus, and if it's not the one I need to have focus, I call
SetForegroundWindow to give the proper window focus.
So far, everything is still good. However, now, the app needs to keep on
running if no user is in front of the computer. And as soon as the screen is
locked, SetForegroundWindow does nothing.. so the app starts minimized and
remains so and the popup never comes up - and thus the application never
starts up properly. Is there a way to bring an application in front even if
the screen is locked (we assume some interactive user is logged in.. we're
not looking at a situation where there's no active user session ).
Regards
Stephan
I need to start a GUI application from a console app. Upon startup, the
application can display one or two popups, which need clicking away. I have
all this handled using FindWindow, GetDLGCtrlID and PostMessage respectively
(find window, find control ID of the button that needs pressing, and press
the button).
However, the software in question will only bring up the popup if it is in
the foreground. So I'm using GetForegroundWindow to find the window that
currently has focus, and if it's not the one I need to have focus, I call
SetForegroundWindow to give the proper window focus.
So far, everything is still good. However, now, the app needs to keep on
running if no user is in front of the computer. And as soon as the screen is
locked, SetForegroundWindow does nothing.. so the app starts minimized and
remains so and the popup never comes up - and thus the application never
starts up properly. Is there a way to bring an application in front even if
the screen is locked (we assume some interactive user is logged in.. we're
not looking at a situation where there's no active user session ).
Regards
Stephan