]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
Fix wxString unit test when not using UTF-8.
[wxWidgets.git] / src / msw / textctrl.cpp
index ef2b7a898993abd3967f06ddd51521ac6b9aef60..4f02fbaf851dcff7a0caddcf50034a0d83e3d074 100644 (file)
@@ -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<CHARFORMAT> cf;
         cf.dwMask = CFM_COLOR;
         cf.crTextColor = wxColourToRGB(colour);
         ::SendMessage(GetHwnd(), EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);