X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..f79a46f83a4cf63fac29b2a6716be7112003918d:/src/msw/control.cpp diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 65042f462e..668756f630 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -131,7 +131,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname, w = size.x == -1 ? 0 : size.x, h = size.y == -1 ? 0 : size.y; - // ... and adjust it to account for ap ossible parent frames toolbar + // ... and adjust it to account for a possible parent frames toolbar AdjustForParentClientOrigin(x, y); m_hWnd = (WXHWND)::CreateWindowEx @@ -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; } @@ -168,7 +168,8 @@ bool wxControl::MSWCreateControl(const wxChar *classname, // set up fonts and colours InheritAttributes(); - SetFont(GetDefaultAttributes().font); + if (!m_hasFont) + SetFont(GetDefaultAttributes().font); // set the size now if no initial size specified SetInitialBestSize(size);