CWnd::GetWindowRect void GetWindowRect( LPRECT lpRect ) const;ParameterslpRectPoints to a CRect object or a RECT structure that will receive the screen coordinates of the upper-left and lower-right corners.
CDC::FillRect void FillRect( LPCRECT lpRect, CBrush* pBrush );ParameterslpRectPoints to a RECT structure that contains the logical coordinates of the rectangle to be filled. You can also pass a CRect object for this parameter.pBrushIdentifies the brush used to fill the rectangle.
CDC * pMyDC = pWnd->GetDC();
CBrush brush(RGB( r,g,b));
CRect rect = pWnd->GetWindowRect( &rect)
pMyDC->FillRect(&rect,&brush);pWnd->ReleaseDC();
void GetWindowRect( LPRECT lpRect ) const;ParameterslpRectPoints to a CRect object or a RECT structure that will receive the screen coordinates of the upper-left and lower-right corners.
void FillRect( LPCRECT lpRect, CBrush* pBrush );ParameterslpRectPoints to a RECT structure that contains the logical coordinates of the rectangle to be filled. You can also pass a CRect object for this parameter.pBrushIdentifies the brush used to fill the rectangle.