X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fbfe58cb95e3e0586f52371964a44d345db99f2b..4d01e350fe2d8cb15c068d579c4022345f3ff0c0:/src/msw/control.cpp diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 3b60836933..7b4bdfa542 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -119,7 +119,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname, // all controls should have this style style |= WS_CHILD; - // create the control visible if it's currently shown for wxWindows + // create the control visible if it's currently shown for wxWidgets if ( m_isShown ) { style |= WS_VISIBLE; @@ -150,7 +150,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname, if ( !m_hWnd ) { wxLogDebug(wxT("Failed to create a control of class '%s'"), classname); - wxFAIL_MSG(_T("something is very wrong")); + wxFAIL_MSG(_T("something is very wrong, CreateWindowEx failed")); return FALSE; } @@ -163,7 +163,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname, } #endif // wxUSE_CTL3D - // install wxWindows window proc for this window + // install wxWidgets window proc for this window SubclassWin(m_hWnd); // set up fonts and colours @@ -171,10 +171,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname, SetFont(GetDefaultAttributes().font); // set the size now if no initial size specified - if ( w <= 0 || h <= 0 ) - { - SetBestSize(size); - } + SetInitialBestSize(size); return TRUE; }