Hi Guys
In a recent application I had to set focus back to the previous working
application. I used GetForeGroundWindow() to do this. I believe you
need to include ShellAPI to get access to this function. In my case
this was the "previous" window.
var
PreviousWindow : THandle;
begin
...
PreviousWindow := GetForeGroundWindow();
...
end
Rob Kennedy wrote:
Wilfried Mestdagh wrote:
I read in windows API help:
WM_ACTIVATE
fActive = LOWORD(wParam); // activation flag fMinimized =
(BOOL) HIWORD(wParam); // minimized flag hwndPrevious = (HWND)
lParam; // window handle
But when I make a custom message handler in my main form for the
WM_ACTIVATE then lParam is always 0.
Yeah, the documentation mentions that possibility.
I need to find the handle of the previous active application.
Any idea?
Explain more about what problem you're actually trying to solve.
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk