X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1de4baa31f17548b32a376a71ce50fee6a3e759c..cfce733e1732b46ebb076ef10fae5a7d552dc2f9:/src/os2/window.cpp diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 951bf17e8c..6382bbee26 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" @@ -2841,8 +2844,9 @@ MRESULT wxWindowOS2::OS2WindowProc( } else { - bProcessed = OS2OnMeasureItem(nIdCtrl, - (WXMEASUREITEMSTRUCT *)lParam); + return MRFROMLONG(OS2OnMeasureItem( nIdCtrl + ,(WXMEASUREITEMSTRUCT *)lParam + )); } if ( bProcessed ) @@ -3807,7 +3811,7 @@ bool wxWindowOS2::OS2OnDrawItem( return FALSE; } // end of wxWindowOS2::OS2OnDrawItem -bool wxWindowOS2::OS2OnMeasureItem( +long wxWindowOS2::OS2OnMeasureItem( int lId , WXMEASUREITEMSTRUCT* pItemStruct ) @@ -3833,13 +3837,16 @@ bool wxWindowOS2::OS2OnMeasureItem( ,&nHeight )) { + MRESULT mRc; + pMeasureStruct->rclItem.xRight = nWidth; pMeasureStruct->rclItem.xLeft = 0L; pMeasureStruct->rclItem.yTop = nHeight; pMeasureStruct->rclItem.yBottom = 0L; - return TRUE; + mRc = MRFROM2SHORT(nHeight, nWidth); + return LONGFROMMR(mRc); } - return FALSE; + return 0L; } } wxWindow* pItem = FindItem(lId); @@ -4589,7 +4596,10 @@ void wxWindowOS2::MoveChildren( int nDiff ) { - if (GetAutoLayout()) + // + // We want to handle top levels ourself, manually + // + if (!IsTopLevel() && GetAutoLayout()) { Layout(); }