]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/renderer.cpp
flags moved to chkconf
[wxWidgets.git] / src / msw / renderer.cpp
index 1fe0bf7374d13ef8acc78b1ad7da5838b75bbe96..285dfabbd1bd279532724b7e97f770abb0eb4f6b 100644 (file)
@@ -311,7 +311,7 @@ int wxRendererMSW::GetHeaderButtonHeight(wxWindow * WXUNUSED(win))
 
     // initialize the struct filled with the values by Header_Layout()
     RECT parentRect = { 0, 0, 100, 100 };
-    WINDOWPOS wp = { 0 };
+    WINDOWPOS wp = { 0, 0, 0, 0, 0, 0, 0 };
     HDLAYOUT hdl = { &parentRect, &wp };
 
     return Header_Layout(hwndHeader, &hdl) ? wp.cy : DEFAULT_HEIGHT;
@@ -534,7 +534,7 @@ wxRendererXP::DrawPushButton(wxWindow * win,
 }
 
 void
-wxRendererXP::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
+wxRendererXP::DrawItemSelectionRect(wxWindow *win,
                                     wxDC& dc,
                                     const wxRect& rect,
                                     int flags)
@@ -548,7 +548,7 @@ wxRendererXP::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
         }
         else // !focused
         {
-            brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW));
+            brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
         }
     }
     else // !selected
@@ -557,12 +557,11 @@ wxRendererXP::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
     }
 
     dc.SetBrush(brush);
-
-    // unlike for wxRendererGeneric, on windows we _never_ want to draw
-    // the outline of the rectangle:
     dc.SetPen(*wxTRANSPARENT_PEN);
-
     dc.DrawRectangle( rect );
+    
+    if ((flags & wxCONTROL_FOCUSED) && (flags & wxCONTROL_CURRENT))
+        DrawFocusRect( win, dc, rect, flags );
 }