in reply to Re: Win32::GuiTest Get Window Focus
in thread Win32::GuiTest Get Window Focus

Duh, so the question wasn't about getting at the desktop ...
GetFocus( GetForegroundWindow() )
works for me, but, Wx will give you hwnd if you use $window->GetHandle(). On a related note, see How to Retrieve another Process' Window Title?