X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af905c94b5ff79a63656e0e9ee6dbf0d3b0a758d..020707bba9c960c155f4257d9a027d6aecdae5b8:/src/msw/spinctrl.cpp diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index a302bc53bf..36396bf241 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -372,16 +372,13 @@ bool wxSpinCtrl::Create(wxWindow *parent, // should have the same font as the other controls SetFont(GetParent()->GetFont()); - - WXHANDLE hFont = GetFont().GetResourceHandle(); - (void)::SendMessage(GetBuddyHwnd(), WM_SETFONT, (WPARAM)hFont, TRUE); // set the size of the text window - can do it only now, because we // couldn't call DoGetBestSize() before as font wasn't set if ( sizeText.y <= 0 ) { int cx, cy; - wxGetCharSize(GetHWND(), &cx, &cy, &GetFont()); + wxGetCharSize(GetHWND(), &cx, &cy, GetFont()); sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy); } @@ -529,7 +526,7 @@ wxSize wxSpinCtrl::DoGetBestSize() const sizeBtn.x += DEFAULT_ITEM_WIDTH + MARGIN_BETWEEN; int y; - wxGetCharSize(GetHWND(), NULL, &y, &GetFont()); + wxGetCharSize(GetHWND(), NULL, &y, GetFont()); y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(y); // JACS: we should always use the height calculated