X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5ea767eb8f7950caa42e06803ff38869b449c8b..dc1f566f6ac9e15f08730ad9a0ec17fef44e9468:/src/os2/window.cpp diff --git a/src/os2/window.cpp b/src/os2/window.cpp index ce34797831..2d3bee6535 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -27,6 +27,8 @@ #include "wx/app.h" #include "wx/panel.h" #include "wx/layout.h" + #include "wx/checkbox.h" + #include "wx/combobox.h" #include "wx/dialog.h" #include "wx/frame.h" #include "wx/listbox.h" @@ -34,6 +36,7 @@ #include "wx/msgdlg.h" #include "wx/scrolwin.h" #include "wx/radiobox.h" + #include "wx/radiobut.h" #include "wx/slider.h" #include "wx/statbox.h" #include "wx/statusbr.h" @@ -2969,6 +2972,26 @@ MRESULT wxWindowOS2::OS2WindowProc( case WM_CONTROL: switch(SHORT2FROMMP(wParam)) { + case BN_PAINT: + { + HWND hWnd = ::WinWindowFromID((HWND)GetHwnd(), SHORT1FROMMP(wParam)); + wxWindowOS2* pWin = wxFindWinFromHandle(hWnd); + + if (!pWin) + { + bProcessed = FALSE; + break; + } + if (pWin->IsKindOf(CLASSINFO(wxBitmapButton))) + { + wxBitmapButton* pBitmapButton = wxDynamicCast(pWin, wxBitmapButton); + + pBitmapButton->OS2OnDraw((WXDRAWITEMSTRUCT *)lParam); + } + return 0; + } + break; + case BKN_PAGESELECTEDPENDING: { PPAGESELECTNOTIFY pPage = (PPAGESELECTNOTIFY)lParam; @@ -4593,7 +4616,10 @@ void wxWindowOS2::MoveChildren( int nDiff ) { - if (GetAutoLayout()) + // + // We want to handle top levels ourself, manually + // + if (!IsTopLevel() && GetAutoLayout()) { Layout(); }