| DirectX SDK | 
The ID3DXContext::GetFocusWindow method retrieves a handle to the associated focus window.
HWND GetFocusWindow();
This method returns a handle (HWND) to the associated focus window.
The focus window is the window that is currently receiving keyboard input. The focus window is always the active window, a descendent of the active window, or NULL..
  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Version: Requires DirectX 7.0.
  Header: Declared in d3dxcore.h.
  Library: Use d3dx.lib.