]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/checkbox.cpp
fixing focus, fixes #11911
[wxWidgets.git] / src / msw / checkbox.cpp
index 5dba25577d664174fb1eeba89fd5e8bb20938522..38a41092c9f2f4a7a7250505765b2b494967dea1 100644 (file)
@@ -200,7 +200,7 @@ wxSize wxCheckBox::DoGetBestSize() const
     int wCheckbox, hCheckbox;
     if ( !str.empty() )
     {
     int wCheckbox, hCheckbox;
     if ( !str.empty() )
     {
-        wxClientDC dc(wx_const_cast(wxCheckBox *, this));
+        wxClientDC dc(const_cast<wxCheckBox *>(this));
         dc.SetFont(GetFont());
         dc.GetMultiLineTextExtent(GetLabelText(str), &wCheckbox, &hCheckbox);
         wCheckbox += s_checkSize + GetCharWidth();
         dc.SetFont(GetFont());
         dc.GetMultiLineTextExtent(GetLabelText(str), &wCheckbox, &hCheckbox);
         wCheckbox += s_checkSize + GetCharWidth();
@@ -460,7 +460,7 @@ bool wxCheckBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
             break;
 
         default:
             break;
 
         default:
-            wxFAIL_MSG( _T("unexpected Get3StateValue() return value") );
+            wxFAIL_MSG( wxT("unexpected Get3StateValue() return value") );
             // fall through
 
         case wxCHK_UNCHECKED:
             // fall through
 
         case wxCHK_UNCHECKED:
@@ -495,7 +495,7 @@ bool wxCheckBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
         if ( !::DrawText(hdc, label.wx_str(), label.length(), &rectLabel,
                          fmt | DT_CALCRECT) )
         {
         if ( !::DrawText(hdc, label.wx_str(), label.length(), &rectLabel,
                          fmt | DT_CALCRECT) )
         {
-            wxLogLastError(_T("DrawText(DT_CALCRECT)"));
+            wxLogLastError(wxT("DrawText(DT_CALCRECT)"));
         }
     }
 
         }
     }
 
@@ -506,7 +506,7 @@ bool wxCheckBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
 
     if ( !::DrawText(hdc, label.wx_str(), label.length(), &rectLabel, fmt) )
     {
 
     if ( !::DrawText(hdc, label.wx_str(), label.length(), &rectLabel, fmt) )
     {
-        wxLogLastError(_T("DrawText()"));
+        wxLogLastError(wxT("DrawText()"));
     }
 
     // finally draw the focus
     }
 
     // finally draw the focus
@@ -516,7 +516,7 @@ bool wxCheckBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
         rectLabel.right++;
         if ( !::DrawFocusRect(hdc, &rectLabel) )
         {
         rectLabel.right++;
         if ( !::DrawFocusRect(hdc, &rectLabel) )
         {
-            wxLogLastError(_T("DrawFocusRect()"));
+            wxLogLastError(wxT("DrawFocusRect()"));
         }
     }
 
         }
     }