Knowledge Base Nr: 00312 unusedscroll.cpp - http://www.swe-kaiser.de

Downloads:

MFC: show unused regions within view/scrollview

  
void CBaseView::OnDraw(CDC* pDC)
{
...
if (!pDC->IsPrinting())
{
CBrush br(::GetSysColor(COLOR_GRAYTEXT));
CRect rcClip;
GetClientRect(&rcClip);
pDC->DPtoLP(&rcClip);

//rechter rand
rcClip.left = sizeTotal.cx;
pDC->FillRect(rcClip,&br);

//unterer rand
rcClip.left = 0;
rcClip.top = -sizeTotal.cy;
pDC->FillRect(rcClip,&br);
}
...
}