This function finds the window below a specified point, that is a descendant of a specified window.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwndParent; /* Window handle whose child windows are to be tested. */ PPOINTL pptlPoint; /* The point to be tested. */ BOOL fEnumChildren; /* Test control. */ HWND hwndFound; /* Window handle beneath pptlPoint. */ hwndFound = WinWindowFromPoint(hwndParent, pptlPoint, fEnumChildren);