X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af8fc1161cc10818b95bea8f08c2bd0995a1964d..40b849aafea1f6ccaa592e47419f5e3f98fb58a8:/src/msw/checklst.cpp?ds=sidebyside diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 98a4e6763b..99d72f3e89 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -47,6 +47,7 @@ #include "wx/renderer.h" #include "wx/msw/private.h" +#include "wx/msw/dc.h" // ---------------------------------------------------------------------------- // private functions @@ -174,8 +175,9 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc, if ( !wxOwnerDrawn::OnDrawItem(dc, rc, act, stat) ) return false; + wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl(); // now draw the check mark part - HDC hdc = GetHdcOf(dc); + HDC hdc = GetHdcOf(*impl); int nBmpWidth = ::GetSystemMetrics(SM_CXMENUCHECK), nBmpHeight = ::GetSystemMetrics(SM_CYMENUCHECK); @@ -506,20 +508,6 @@ void wxCheckListBox::OnLeftClick(wxMouseEvent& event) } } -int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const -{ - int nItem = (int)::SendMessage - ( - (HWND)GetHWND(), - LB_ITEMFROMPOINT, - 0, - MAKELPARAM(x, y) - ); - - return nItem >= (int)m_noItems ? wxNOT_FOUND : nItem; -} - - wxSize wxCheckListBox::DoGetBestSize() const { wxSize best = wxListBox::DoGetBestSize(); @@ -528,4 +516,4 @@ wxSize wxCheckListBox::DoGetBestSize() const return best; } -#endif +#endif // wxUSE_CHECKLISTBOX