X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a268f4b734bd4479bb2accd5bd0d5da0f9e1e1ce..f1fc7bab85864e99f4e7de4994e947ab0ab5a83a:/src/msw/renderer.cpp diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index 1fe0bf7374..285dfabbd1 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -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 ); }