CWebView::Redraw Method  
 
BOOL Redraw();

The Redraw method forces the host window and browser control to redraw.

Parameters

None.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The Redraw method reloads the current document and forces both the host window and the embedded WebView2 child window to repaint themselves. This differs from Reload, which simply reloads the page (similar to pressing F5) but does not explicitly invalidate and redraw the hosting window.

Internally, this method clears the browser cache and then forces a redraw by updating the control bounds and notifying the browser that the parent window has changed. If the host window itself is visible, it is also invalidated and updated to ensure that the client area is repainted.

Because this method performs multiple operations that can be relatively expensive, applications should generally prefer Reload unless a complete repaint of both the control and the host window is required. For example, it can be used if rendering artifacts are visible after a resize or when switching between different DPI contexts.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cshtmv12.lib

See Also