X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74052fe83bbeb7e37e98d57c88a05e8a1425c86d..0738b901b17340f09766524b8d9d79e9ed1268e7:/src/msw/checklst.cpp diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index fd480f4f70..0769cb2f34 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -146,7 +146,7 @@ private: wxCheckListBox *m_pParent; size_t m_nIndex; - DECLARE_NO_COPY_CLASS(wxCheckListBoxItem) + wxDECLARE_NO_COPY_CLASS(wxCheckListBoxItem); }; wxCheckListBoxItem::wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex) @@ -215,6 +215,9 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc, ImageList_Destroy(himl); + if (stat & wxODHasFocus) + wxRendererNative::Get().DrawFocusRect(m_pParent, dc, rc); + return true; } @@ -377,14 +380,14 @@ bool wxCheckListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item) bool wxCheckListBox::IsChecked(unsigned int uiIndex) const { - wxCHECK_MSG( IsValid(uiIndex), false, _T("bad wxCheckListBox index") ); + wxCHECK_MSG( IsValid(uiIndex), false, wxT("bad wxCheckListBox index") ); return GetItem(uiIndex)->IsChecked(); } void wxCheckListBox::Check(unsigned int uiIndex, bool bCheck) { - wxCHECK_RET( IsValid(uiIndex), _T("bad wxCheckListBox index") ); + wxCHECK_RET( IsValid(uiIndex), wxT("bad wxCheckListBox index") ); GetItem(uiIndex)->Check(bCheck); } @@ -446,7 +449,7 @@ void wxCheckListBox::OnKeyDown(wxKeyEvent& event) wxCheckListBoxItem *item = GetItem(selections[i]); if ( !item ) { - wxFAIL_MSG( _T("no wxCheckListBoxItem?") ); + wxFAIL_MSG( wxT("no wxCheckListBoxItem?") ); continue; } @@ -462,7 +465,7 @@ void wxCheckListBox::OnKeyDown(wxKeyEvent& event) break; default: - wxFAIL_MSG( _T("what should this key do?") ); + wxFAIL_MSG( wxT("what should this key do?") ); } // we should send an event as this has been done by the user and @@ -508,20 +511,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(); @@ -530,4 +519,4 @@ wxSize wxCheckListBox::DoGetBestSize() const return best; } -#endif +#endif // wxUSE_CHECKLISTBOX