This example uses WinIsChild to determine if one window is a descendant of another window.

#define INCL_WINWINDOWMGR    /* Window Manager Functions */
#include <os2.h>

HWND    hwndChild;           /* Child window to check    */
HWND    hwndParent;          /* Parent window to check   */

if (WinIsChild(hwndChild, hwndParent))
   {
     /* hwndChild is a descendant of hwndParent */
   }
else
   {
    /* hwndChild is not a descendant of hwndParent */
   }


[Back] [Next]