This example shows how to get the frame window handle from the client window handle.
#define INCL_WINWINDOWMGR #define INCL_WINACCELERATORS #include <OS2.H> HACCEL haccel; HWND hwndFrame, hwndClient; /* window handles. */ HAB hab; /* anchor block. */ hwndFrame = WinQueryWindow(hwndClient, QW_PARENT); /* get handle of parent, */ /* which is frame window. */