CWebView::Resize Method  
 
BOOL Resize();

The Resize method resizes the browser child window to the size of its host window.

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 Resize method updates the position and size of the embedded browser window to the size of client area of the host window. It calls the put_Bounds method on the underlying WebView2 controller to resize the child window that renders the web content. The coordinates and dimensions are determined by calling the Win32 function GetClientRect with the host window.

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