From: Vadim Zeitlin Date: Wed, 25 May 2005 23:27:34 +0000 (+0000) Subject: apparently the check for too small rect is needed not only with wxNB_MULTILINE (see... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/628eae0bcd7916c57847b7eab739d4cc32534ccf?ds=inline apparently the check for too small rect is needed not only with wxNB_MULTILINE (see http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?p=9842#9842) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 8fb74d7e20..e6104def38 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -497,12 +497,12 @@ wxRect wxNotebook::GetPageSize() const ::GetClientRect(GetHwnd(), &rc); // This check is to work around a bug in TabCtrl_AdjustRect which will - // cause a crash on win2k, or on XP with themes disabled, if the - // wxNB_MULTILINE style is used and the rectangle is very small, (such as - // when the notebook is first created.) The value of 20 is just - // arbitrarily chosen, if there is a better way to determine this value - // then please do so. --RD - if ( !HasFlag(wxNB_MULTILINE) || (rc.right > 20 && rc.bottom > 20) ) + // cause a crash on win2k or on XP with themes disabled if either + // wxNB_MULTILINE is used or tabs are placed on a side, if the rectangle + // is too small. + // + // The value of 20 is chosen arbitrarily but seems to work + if ( rc.right > 20 && rc.bottom > 20 ) { TabCtrl_AdjustRect(GetHwnd(), false, &rc);