hSwitch = WinQuerySwitchHandle(hWnd,0); ulSuccess = WinQuerySwitchEntry(hSwitch, SwitchData); hTarget = WinWindowFromID(SwitchData.hwnd, FID_CLIENT);