Partager via


CScrollView::FillOutsideRect

Call FillOutsideRect to fill the area of the view that appears outside of the scrolling area.

void FillOutsideRect(
   CDC* pDC,
   CBrush* pBrush 
);

Parameters

  • pDC
    Device context in which the filling is to be done.

  • pBrush
    Brush with which the area is to be filled.

Remarks

Use FillOutsideRect in your scroll view's OnEraseBkgnd handler function to prevent excessive background repainting.

Example

BOOL CMyScrollView::OnEraseBkgnd(CDC* pDC)
{
    CBrush br(GetSysColor(COLOR_WINDOW)); 
    FillOutsideRect(pDC, &br);
    return TRUE;                   // Erased
}

Requirements

Header: afxwin.h

See Also

Concepts

CScrollView Class

CScrollView Members

Hierarchy Chart

CWnd::OnEraseBkgnd