X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be74a2a21a491f5d0ec6a333b2fdc4bedb578eaa..39d169639b01d4902583d4e541746a93a156ab78:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index ef2b7a8989..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);