X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/51c42fc50a57a09392e7d119608b74f91cf85d05..180b5b4827d08f1ac13bbb5eca03f775ab35a0b1:/src/msw/renderer.cpp diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index e40371fca0..285dfabbd1 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -302,7 +302,7 @@ int wxRendererMSW::GetHeaderButtonHeight(wxWindow * WXUNUSED(win)) // create a temporary header window just to get its geometry - HWND hwndHeader = ::CreateWindow(WC_HEADER, NULL, NULL, + HWND hwndHeader = ::CreateWindow(WC_HEADER, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); if ( !hwndHeader ) return DEFAULT_HEIGHT; @@ -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 ); }