This function changes the owner window of a specified window.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwnd; /* Window handle whose owner window is to be changed. */ HWND hwndNewOwner; /* Handle of the new owner. */ BOOL rc; /* Success indicator. */ rc = WinSetOwner(hwnd, hwndNewOwner);