◄CWnd► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── BOOL GetUpdateRect( LPRECT lpRect, BOOL bErase = FALSE ); Parameter Description <lpRect> Points to a CRect or ◄RECT► structure that is to receive the client coordinates of the update enclosing the update region. <bErase> Specifies whether the background in the update region is to be erased. Remarks Retrieves the coordinates of the smallest rectangle that completely encloses the update region. If CWnd was created with the CS_OWNDC style and the mapping mode is not MM_TEXT, the GetUpdateRect member function gives the rectangle in logical coordinates. Otherwise, GetUpdateRect gives the rectangle in client coordinates. If there is no update region, GetUpdateRect sets the rectangle to be empty (sets all coordinates to 0). The <bErase> parameter specifies whether GetUpdateRect should erase the background of the update region. If <bErase> is TRUE and the update region is not empty, the background is erased. To erase the background, GetUpdateRect sends the ◄WM_ERASEBKGND► message. The update rectangle retrieved by the ◄BeginPaint► member function is identical to that retrieved by the GetUpdateRect member function. The ◄BeginPaint► member function automatically validates the update region, so any call to GetUpdateRect made immediately after a call to ◄BeginPaint► retrieves an empty update region. Return Value Specifies the status of the update region. The value is TRUE if the update region is not empty; otherwise FALSE. See Also ◄CWnd::BeginPaint►, ◄::GetUpdateRect► -♦-