Try manually handling WM_SETFOCUS; It's wParam gives the window that 
lost focus. If that's not good enough try registering a global hook and 
keeping track of all WM_SETFOCUS messages on the system. That way you'll 
be able to request information on previously focused windows at any time!

--
Cosmin Prund

Peter Laman wrote:
> Hi all,
>
> Win32 question: If I switch to my application from another app, how can I
> detect which window from the previous application had input focus before
> switching apps?
>
> Peter Laman
> Senior Software Engineer
> Lance ICT Group
> Roermond, the Netherlands
> http://www.lance-safety.com
>
> __________________________________________________
> Delphi-Talk mailing list -> Delphi-Talk@elists.org
> http://www.elists.org/mailman/listinfo/delphi-talk
>
>   

__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to