X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/085dd1e96fa33d4309e6c9f930d0ad4102b64088..37340c48fbdbd2e2aadfe371b504cea700816a83:/src/msw/control.cpp?ds=sidebyside diff --git a/src/msw/control.cpp b/src/msw/control.cpp index a4b4718831..1bf861d06a 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; @@ -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; } @@ -163,12 +163,13 @@ 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 InheritAttributes(); - SetFont(GetDefaultAttributes().font); + if (!m_hasFont) + SetFont(GetDefaultAttributes().font); // set the size now if no initial size specified SetInitialBestSize(size); @@ -249,7 +250,7 @@ bool wxControl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result) { - wxEventType eventType = wxEVT_NULL; + wxEventType eventType wxDUMMY_INITIALIZE(wxEVT_NULL); NMHDR *hdr = (NMHDR*) lParam; switch ( hdr->code )