示例#1
0
文件: ListCtrlEx.cpp 项目: bugou/test
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();
}
示例#2
0
void CRowListView::OnViewFullRowDetails()
{
	if ((GetViewType() != LVS_REPORT) || !GetFullRowSel())
	{
		SetFullRowSel(TRUE);
		if (GetViewType() != LVS_REPORT)
			SetViewType(LVS_REPORT);
	}
}
示例#3
0
void CRowListView::OnUpdateViewClientWidthSel(CCmdUI* pCmdUI)
{
	pCmdUI->SetCheck(m_bClientWidthSel);
	pCmdUI->Enable((GetViewType() == LVS_REPORT) && GetFullRowSel());
}
示例#4
0
void CRowListView::OnUpdateViewFullRowDetails(CCmdUI* pCmdUI)
{
	pCmdUI->SetCheck((GetViewType() == LVS_REPORT) && GetFullRowSel());
}