void CListCtrlEx::OnPaint() { // in full row select mode, we need to extend the clipping region // so we can paint a selection all the way to the right if (m_bClientWidthSel && (GetStyle() & LVS_TYPEMASK) == LVS_REPORT && GetFullRowSel()) { CRect rcAllLabels; GetItemRect(0, rcAllLabels, LVIR_BOUNDS); if(rcAllLabels.right < m_cxClient) { // need to call BeginPaint (in CPaintDC c-tor) // to get correct clipping rect CPaintDC dc(this); CRect rcClip; dc.GetClipBox(rcClip); rcClip.left = min(rcAllLabels.right-1, rcClip.left); rcClip.right = m_cxClient; InvalidateRect(rcClip, FALSE); // EndPaint will be called in CPaintDC d-tor } } CListCtrl::OnPaint(); }
void CRowListView::OnViewFullRowDetails() { if ((GetViewType() != LVS_REPORT) || !GetFullRowSel()) { SetFullRowSel(TRUE); if (GetViewType() != LVS_REPORT) SetViewType(LVS_REPORT); } }
void CRowListView::OnUpdateViewClientWidthSel(CCmdUI* pCmdUI) { pCmdUI->SetCheck(m_bClientWidthSel); pCmdUI->Enable((GetViewType() == LVS_REPORT) && GetFullRowSel()); }
void CRowListView::OnUpdateViewFullRowDetails(CCmdUI* pCmdUI) { pCmdUI->SetCheck((GetViewType() == LVS_REPORT) && GetFullRowSel()); }