Disabling the browser window prevents it from receiving keyboard and
mouse input. The host window itself remains enabled and can continue to
process messages and receive user input. Disabling the browser window
prevents it from receiving keyboard and mouse input, but does not hide
the browser or prevent its content from being updated. The enabled
state is independent of the browser's visibility, which can be
controlled using the WebViewShowWindow function. To determine the current
state of the browser window, use the WebViewIsEnabled function.
If the browser window has the keyboard focus when it is disabled, the
focus is transferred to the host window. Enabling or disabling a browser
window that is already in the requested state has no effect and is
considered successful.
Applications should use this function to enable or disable the
browser window rather than calling the Windows API EnableWindow
function directly. Although the handle to the underlying browser
window can be obtained using WebViewGetChildWindow, this window
is managed internally by the Edge WebView2 control. Directly modifying
its state or other window properties may interfere with the normal
operation of the control and should be avoided unless required for
advanced interoperability with other components.