This function obtains the Window List handle belonging to a window.
#define INCL_WINSWITCHLIST /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwnd; /* Window handle of an application. */ PID idProcess; /* Process identity of the application. */ HSWITCH hswitchSwitch; /* Switch list handle for the specified application. */ hswitchSwitch = WinQuerySwitchHandle(hwnd, idProcess);