From 6dcdeb3e253d6ac770c85a124b901eb95da0022e Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 6 May 2009 16:04:20 +0000 Subject: [PATCH] draw focus rect for wxCheckListBox item git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@60531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/checklst.cpp | 7 +++++++ src/msw/ownerdrw.cpp | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 98933f0fe0..5fd1765fc5 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -232,6 +232,13 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc, SelectInHDC selBrush2(hdc, ::GetStockObject(NULL_BRUSH)); Rectangle(hdc, x, y, x + nCheckWidth, y + nCheckHeight); + if (stat & wxODHasFocus) + { + RECT rect; + wxCopyRectToRECT(rc, rect); + DrawFocusRect(hdc, &rect); + } + return true; } diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index 36967d809e..23fec80468 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -262,14 +262,9 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight) // draw the item bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, - wxODAction act, + wxODAction, wxODStatus st) { - // we do nothing on focus change - if ( act == wxODFocusChanged ) - return true; - - // this flag determines whether or not an edge will // be drawn around the bitmap. In most "windows classic" // applications, a 1-pixel highlight edge is drawn around