+*/
+}
+#endif // wxUSE_TOOLBAR
+
+// propagate our state change to all child frames: this allows us to emulate X
+// Windows behaviour where child frames float independently of the parent one
+// on the desktop, but are iconized/restored with it
+void wxFrame::IconizeChildFrames(bool bIconize)
+{
+    for ( wxWindowList::Node *node = GetChildren().GetFirst();
+          node;
+          node = node->GetNext() )
+    {
+        wxWindow *win = node->GetData();
+
+        if ( win->IsKindOf(CLASSINFO(wxFrame)) )
+        {
+            ((wxFrame *)win)->Iconize(bIconize);
+        }
+    }
+}
+
+
+// make the window modal (all other windows unresponsive)
+void wxFrame::MakeModal(bool modal)
+{
+    if (modal) {
+        wxEnableTopLevelWindows(FALSE);
+        Enable(TRUE);           // keep this window enabled
+    }
+    else {
+        wxEnableTopLevelWindows(TRUE);
+    }
+}
+
+
+// ===========================================================================
+// message processing
+// ===========================================================================
+
+// ---------------------------------------------------------------------------
+// preprocessing
+// ---------------------------------------------------------------------------
+
+bool wxFrame::OS2TranslateMessage(WXMSG* pMsg)
+{
+    if ( wxWindow::OS2TranslateMessage(pMsg) )
+        return TRUE;
+
+    // try the menu bar accels
+    wxMenuBar *menuBar = GetMenuBar();
+    if ( !menuBar )
+        return FALSE;
+
+    const wxAcceleratorTable& acceleratorTable = menuBar->GetAccelTable();
+    return acceleratorTable.Translate(this, pMsg);
+}
+
+// ---------------------------------------------------------------------------
+// our private (non virtual) message handlers
+// ---------------------------------------------------------------------------
+
+bool wxFrame::HandlePaint()
+{
+// TODO:
+/*
+    RECT rect;
+    if ( GetUpdateRect(GetHwnd(), &rect, FALSE) )
+    {
+        if ( m_iconized )
+        {
+            HICON hIcon = m_icon.Ok() ? GetHiconOf(m_icon)
+                                      : (HICON)m_defaultIcon;
+
+            // Hold a pointer to the dc so long as the OnPaint() message
+            // is being processed
+            PAINTSTRUCT ps;
+            HDC hdc = ::BeginPaint(GetHwnd(), &ps);
+
+            // Erase background before painting or we get white background
+            MSWDefWindowProc(WM_ICONERASEBKGND, (WORD)(LONG)ps.hdc, 0L);
+
+            if ( hIcon )
+            {
+                RECT rect;
+                ::GetClientRect(GetHwnd(), &rect);
+
+                // FIXME: why hardcoded?
+                static const int icon_width = 32;
+                static const int icon_height = 32;
+
+                int icon_x = (int)((rect.right - icon_width)/2);
+                int icon_y = (int)((rect.bottom - icon_height)/2);
+
+                ::DrawIcon(hdc, icon_x, icon_y, hIcon);
+            }
+
+            ::EndPaint(GetHwnd(), &ps);
+
+            return TRUE;
+        }
+        else
+        {
+            return wxWindow::HandlePaint();
+        }
+    }
+    else
+    {
+        // nothing to paint - processed
+        return TRUE;
+    }
+*/
+    return FALSE;
+}
+
+bool wxFrame::HandleSize(int x, int y, WXUINT id)
+{
+    bool processed = FALSE;
+
+// TODO:
+/*
+    switch ( id )
+    {
+        case SIZENORMAL:
+            // only do it it if we were iconized before, otherwise resizing the
+            // parent frame has a curious side effect of bringing it under it's
+            // children
+            if ( !m_iconized )
+                break;
+
+            // restore all child frames too
+            IconizeChildFrames(FALSE);
+
+            // fall through
+
+        case SIZEFULLSCREEN:
+            m_iconized = FALSE;
+            break;
+
+        case SIZEICONIC:
+            // iconize all child frames too
+            IconizeChildFrames(TRUE);
+
+            m_iconized = TRUE;
+            break;
+    }
+*/
+    if ( !m_iconized )
+    {
+        // forward WM_SIZE to status bar control
+        PositionStatusBar();
+        PositionToolBar();
+
+        wxSizeEvent event(wxSize(x, y), m_windowId);
+        event.SetEventObject( this );
+        processed = GetEventHandler()->ProcessEvent(event);
+    }
+
+    return processed;
+}
+
+bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
+{
+    if ( control )
+    {
+        // In case it's e.g. a toolbar.
+        wxWindow *win = wxFindWinFromHandle(control);
+        if ( win )
+            return win->OS2Command(cmd, id);
+    }
+
+    // handle here commands from menus and accelerators
+    if ( cmd == 0 || cmd == 1 )
+    {
+        if ( wxCurrentPopupMenu )
+        {
+            wxMenu *popupMenu = wxCurrentPopupMenu;
+            wxCurrentPopupMenu = NULL;
+
+            return popupMenu->OS2Command(cmd, id);
+        }
+
+        if ( ProcessCommand(id) )
+        {
+            return TRUE;
+        }
+    }
+
+    return FALSE;
+}
+
+bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
+{
+    int item;
+    if ( flags == 0xFFFF && hMenu == 0 )
+    {
+        // menu was removed from screen
+        item = -1;
+    }
+// TODO:
+/*
+    else if ( !(flags & MF_POPUP) && !(flags & MF_SEPARATOR) )
+    {
+        item = nItem;
+    }
+*/
+    else
+    {
+        // don't give hints for separators (doesn't make sense) nor for the
+        // items opening popup menus (they don't have them anyhow)
+        return FALSE;
+    }
+
+    wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item);
+    event.SetEventObject( this );
+
+    return GetEventHandler()->ProcessEvent(event);
+}
+
+// ---------------------------------------------------------------------------
+// the window proc for wxFrame
+// ---------------------------------------------------------------------------
+
+MRESULT wxFrame::OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
+{
+    MRESULT rc = 0;
+    bool processed = FALSE;
+
+// TODO:
+/*
+    switch ( message )
+    {
+        case WM_CLOSE:
+            // if we can't close, tell the system that we processed the
+            // message - otherwise it would close us
+            processed = !Close();
+            break;
+
+        case WM_COMMAND:
+            {
+                WORD id, cmd;
+                WXHWND hwnd;
+                UnpackCommand((WXWPARAM)wParam, (WXLPARAM)lParam,
+                              &id, &hwnd, &cmd);
+
+                processed = HandleCommand(id, cmd, (WXHWND)hwnd);
+            }
+            break;
+
+        case WM_MENUSELECT:
+            {
+                WXWORD item, flags;
+                WXHMENU hmenu;
+                UnpackMenuSelect(wParam, lParam, &item, &flags, &hmenu);
+
+                processed = HandleMenuSelect(item, flags, hmenu);
+            }
+            break;
+
+        case WM_PAINT:
+            processed = HandlePaint();
+            break;
+
+        case WM_QUERYDRAGICON:
+            {
+                HICON hIcon = m_icon.Ok() ? GetHiconOf(m_icon)
+                                          : (HICON)(m_defaultIcon);
+                rc = (long)hIcon;
+                processed = rc != 0;
+            }
+            break;
+
+        case WM_SIZE:
+            processed = HandleSize(LOWORD(lParam), HIWORD(lParam), wParam);
+            break;
+    }
+*/
+    if ( !processed )
+        rc = wxWindow::OS2WindowProc(hwnd, message, wParam, lParam);
+
+    return rc;