GetFocus() in Windows NT and Windows 95

Hello!

I have run in to some problems and would really appreciate some advice.

I am writing an application in which I need the handle to the window with
input focus.
I have tried GetFocus() and it works fine if the application with input
focus is a 16-bit application.
However, if the application owning the window with input focus is 32-bit,
GetFocus() will return 0. I think this might have something to do with the
fact the the 32-bit version of GetFocus() is thread-specific and will
return 0 if the window with input focus doesn't belong to the calling
thread.

Any thoughts???

I want to get that handle no matter what the circumstances.

Any small hint would be greatly appreciated.

Best regards,
Stefan Wallberg  S...@Syntronic.se