+ if ((ulStyle & wxMINIMIZE) || (ulStyle & wxICONIZE))
+ ulStyleFlags |= WS_MINIMIZED;
+ if (ulStyle & wxMAXIMIZE)
+ ulStyleFlags |= WS_MAXIMIZED;
+
+ //
+ // Clear the visible flag, we always call show
+ //
+ ulStyleFlags &= (unsigned long)~WS_VISIBLE;
+ m_bIconized = FALSE;
+
+ //
+ // Set the frame control block
+ //
+ vFrameCtlData.cb = sizeof(vFrameCtlData);
+ vFrameCtlData.flCreateFlags = ulCreateFlags;
+ vFrameCtlData.hmodResources = 0L;
+ vFrameCtlData.idResources = 0;
+
+ //
+ // Create the frame window
+ //
+ if (!wxWindow::OS2Create( hParent
+ ,WC_FRAME
+ ,zTitle
+ ,ulStyleFlags
+ ,(long)nX
+ ,(long)nY
+ ,(long)nWidth
+ ,(long)nHeight
+ ,NULLHANDLE
+ ,HWND_TOP
+ ,(long)nId
+ ,(void*)&vFrameCtlData
+ ,NULL
+ ))
+ {
+ return FALSE;
+ }
+
+ hFrame = GetHwnd();
+
+ //
+ // Since under PM the controling window proc is associated with the client window handle
+ // not the frame's we have to perform the hook here in order to associated the client handle,
+ // not the frame's with the window object !
+ //
+
+ wxWndHook = this;
+ //
+ // Create the client window. We must call the API from here rather than
+ // the static base class create because we need a separate handle
+ //
+ if ((hClient = ::WinCreateWindow( hFrame // Frame is parent
+ ,wxFrameClassName
+ ,NULL // Window title
+ ,0 // No styles
+ ,0, 0, 0, 0 // Window position
+ ,NULLHANDLE // Owner
+ ,HWND_TOP // Sibling
+ ,FID_CLIENT // standard client ID
+ ,NULL // Creation data
+ ,NULL // Window Pres Params
+ )) == 0L)
+ {
+ return FALSE;
+ }
+
+ wxWndHook = NULL;
+ //
+ // Send anything to initialize the frame
+ //
+ ::WinSendMsg( hFrame
+ ,WM_UPDATEFRAME
+ ,(MPARAM)FCF_TASKLIST
+ ,(MPARAM)0
+ );
+
+ //
+ // Now size everything. If adding a menu the client will need to be resized.
+ //
+ if (!::WinSetWindowPos( hFrame
+ ,HWND_TOP
+ ,nX
+ ,nY
+ ,nWidth
+ ,nHeight
+ ,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE
+ ))
+ return FALSE;