This example uses the WinSetParent call to change a window to a main window.
#define INCL_WINWINDOWMGR #include <OS2.H> HWND hwnd; /* Window handles */ WinSetParent(hwnd, HWND_DESKTOP, TRUE); /* Do any necessary redrawing */