X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f79f06665c112b6eb081216d66589cad189fa166..11716cbe14313011016472f56edb51c55aabe852:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index d62b8ab161..4f02fbaf85 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -2055,7 +2055,7 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) WXHBRUSH wxTextCtrl::MSWControlColor(WXHDC hDC, WXHWND hWnd) { - if ( !IsEnabled() && !HasFlag(wxTE_MULTILINE) ) + if ( !IsThisEnabled() && !HasFlag(wxTE_MULTILINE) ) return MSWControlColorDisabled(hDC); return wxTextCtrlBase::MSWControlColor(hDC, hWnd); @@ -2397,9 +2397,7 @@ bool wxTextCtrl::SetForegroundColour(const wxColour& colour) if ( IsRich() ) { // change the colour of everything - CHARFORMAT cf; - wxZeroMemory(cf); - cf.cbSize = sizeof(cf); + WinStruct cf; cf.dwMask = CFM_COLOR; cf.crTextColor = wxColourToRGB(colour); ::SendMessage(GetHwnd(), EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf); @@ -2744,7 +2742,7 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style) // Convert the height from the units of 1/20th of the point in which // CHARFORMAT stores it to pixel-based units used by LOGFONT. const wxCoord ppi = wxClientDC(this).GetPPI().y; - lf.lfHeight = -MulDiv(cf.yHeight/2, ppi, 72); + lf.lfHeight = -MulDiv(cf.yHeight/20, ppi, 72); lf.lfWidth = 0; lf.lfCharSet = ANSI_CHARSET; // FIXME: how to get correct charset? lf.lfClipPrecision = 0;