Share via


CWindow::SetRedraw

Sets or clears the redraw flag by sending a WM_SETREDRAW message to the window.

void SetRedraw( 
   BOOL bRedraw = TRUE  
) throw();

Parameters

  • bRedraw
    [in] Specifies the state of the redraw flag. If TRUE (the default value), the redraw flag is set; if FALSE, the flag is cleared.

Remarks

Call SetRedraw to allow changes to be redrawn or to prevent changes from being redrawn.

Example

//The following example attaches an HWND to the CWindow object and  
//calls CWindow::SetRedraw() to set and reset the redraw flag

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.SetRedraw();      //sets the redraw flag to TRUE 
// 
//
myWindow.SetRedraw(FALSE); //sets the redraw flag to FALSE

Requirements

Header: atlwin.h

See Also

Reference

CWindow Class