CWebView Constants  
 
Name Value Description
Options
WEBVIEW_OPTION_ENABLE_NOTHING 0 No options enabled. This is very restrictive and will not permit the use of JavaScript.
WEBVIEW_OPTION_ENABLE_ACCELERATORS 0x00001 Enables common keyboard accelerators (e.g., Ctrl+L, F5). Accelerator key events are surfaced via WEBVIEW_EVENT_ACCELERATOR_KEYPRESS.
WEBVIEW_OPTION_ENABLE_CONTEXT_MENU 0x00002 Shows the built-in right-click context menu. Clear this to fully suppress the menu.
WEBVIEW_OPTION_ENABLE_STATUSBAR 0x00004 Displays status text (e.g., link targets, loading state) in the bottom-left status area.
WEBVIEW_OPTION_ENABLE_ZOOM_CONTROL 0x00008 Allows user zoom (Ctrl+Plus/Minus, Ctrl+mouse-wheel). If disabled, zoom remains fixed unless set by API.
WEBVIEW_OPTION_ENABLE_AUDIO 0x00010 Permits audio playback in the WebView. Disable to mute at the engine level.
WEBVIEW_OPTION_ENABLE_AUTOFILL 0x00020 Enables form autofill suggestions where available.
WEBVIEW_OPTION_ENABLE_PASSWORD_AUTOSAVE 0x00040 Allows the engine to offer saving website passwords/credentials.
WEBVIEW_OPTION_ENABLE_PRIVACY 0x00080 Enable private browsing
WEBVIEW_OPTION_ENABLE_SCRIPTING 0x00100 Enables JavaScript execution. Disabling blocks script evaluation and script-initiated behaviors.
WEBVIEW_OPTION_ENABLE_DIALOGS 0x00200 Allows script dialogs (alert/confirm/prompt) and related UI. Disable to suppress script-driven dialogs.
WEBVIEW_OPTION_ENABLE_DEVTOOLS 0x00400 Permits opening Developer Tools (e.g., F12). Disable to block DevTools access.
WEBVIEW_OPTION_ENABLE_NEW_WINDOWS 0x00800 Allows the creation of new popup windows
WEBVIEW_OPTION_ENABLE_MESSAGES 0x01000 Enables window.chrome.webview.postMessage communication from the page to the host.
WEBVIEW_OPTION_ENABLE_EXTERNAL_DROP 0x02000 Allows external drag-and-drop (e.g., files from Explorer) into the WebView surface.
WEBVIEW_OPTION_RESTRICT_NAVIGATION 0x10000 Blocks navigations after the initial page load unless explicitly permitted by the host.
WEBVIEW_OPTION_RESTRICT_DOWNLOADS 0x20000 Blocks attempts to download files through the browser.
WEBVIEW_OPTION_EXCLUSIVE_PROFILE 0x40000 Require exclusive use of the user data folder
WEBVIEW_OPTION_TRANSPARENT_BACKGROUND 0x80000 Renders with a transparent background where content allows; the host window should support composition.
WEBVIEW_OPTION_ENABLE_DEFAULT 0x0031F Convenience preset enabling the most common interactive features for typical app scenarios.
Navigation Flags
WEBVIEW_NAVIGATION_REDIRECTED 0x0001 The navigation was the result of an HTTP redirect.
WEBVIEW_NAVIGATION_USER_INITIATED 0x0002 Navigation began from a user gesture rather than being initiated by a script.
WEBVIEW_NAVIGATION_LOCAL_DATA 0x1000 Content was served using local data rather than a full network fetch.
Accelerator Key Flags
WEBVIEW_ACCELERATOR_KEY_DOWN 0x0001 Indicates an accelerator key-down event.
WEBVIEW_ACCELERATOR_KEY_UP 0x0002 Indicates an accelerator key-up event.
WEBVIEW_ACCELERATOR_KEY_SYSTEM 0x0004 Indicates a system key event using the Alt key, similar to WM_SYSKEY.
History Movement Flags
WEBVIEW_MOVE_BACKWARD_ENABLED 0x0001 Backward navigation is currently available.
WEBVIEW_MOVE_FORWARD_ENABLED 0x0002 Forward navigation is currently available.
Navigation Error Codes
WEBVIEW_ERROR_NONE 0 No error.
WEBVIEW_ERROR_CERTIFICATE_COMMON_NAME 1 Certificate common name mismatch.
WEBVIEW_ERROR_CERTIFICATE_EXPIRED 2 Certificate is expired.
WEBVIEW_ERROR_INVALID_CLIENT_CERTIFICATE 3 Invalid or untrusted client certificate.
WEBVIEW_ERROR_CERTIFICATE_REVOKED 4 Certificate has been revoked.
WEBVIEW_ERROR_INVALID_CERTIFICATE 5 Certificate is invalid for another reason.
WEBVIEW_ERROR_SERVER_UNREACHABLE 6 Cannot reach the server/host.
WEBVIEW_ERROR_TIMEOUT 7 Operation timed out.
WEBVIEW_ERROR_INVALID_SERVER_RESPONSE 8 Server returned an invalid or unexpected response.
WEBVIEW_ERROR_CONNECTION_ABORTED 9 Connection aborted by the server or network.
WEBVIEW_ERROR_CONNECTION_RESET 10 Connection was reset.
WEBVIEW_ERROR_DISCONNECTED 11 Disconnected during the operation.
WEBVIEW_ERROR_CANNOT_CONNECT 12 Failed to establish a connection.
WEBVIEW_ERROR_HOST_NAME_NOT_RESOLVED 13 DNS resolution failed for the host.
WEBVIEW_ERROR_OPERATION_CANCELED 14 Operation was canceled by the user or host.
WEBVIEW_ERROR_REDIRECT_FAILED 15 Redirection failed.
WEBVIEW_ERROR_UNEXPECTED_ERROR 16 An unexpected error occurred.
WEBVIEW_ERROR_CREDENTIALS_REQUIRED 17 Authentication credentials are required.
WEBVIEW_ERROR_PROXY_AUTHENTICATION_REQUIRED 18 Proxy authentication is required.
Events
WEBVIEW_EVENT_WINDOW_ATTACHED 1 attached to the host window. This is the first event that fires after the browser is created.
WEBVIEW_EVENT_WINDOW_DETACHED 2 detached from the host window. This is the last event that fires before the browser is destroyed.
WEBVIEW_EVENT_FOCUS_CHANGED 3 focus changed. The wParam value indicates if focus was gained (1) or lost (0).
WEBVIEW_EVENT_ACCELERATOR_KEYPRESS 4 Accelerator key event. The wParam value is the virtual-key code and lParam is the accelerator flags.
WEBVIEW_EVENT_NAVIGATION_STARTING 5 Navigation starting. The wParam value indicates success (1) or failure (0) and lParam is the navigation flags.
WEBVIEW_EVENT_NAVIGATION_COMPLETED 6 Navigation completed. The wParam value indicates success (1) or failure (0) and lParam is the error code.
WEBVIEW_EVENT_SECURITY_CHANGED 7 Security level changed. The wParam is the security level and lParam is the security flags.
WEBVIEW_EVENT_HISTORY_CHANGED 8 Back/forward availability changed. The wParam value is the history movement flags.
WEBVIEW_EVENT_DOWNLOAD_STARTING 9 A download has been initiated. The wParam value indicates success (1) or failure (0) and lParam is the file ID.
WEBVIEW_EVENT_DOWNLOAD_COMPLETED 10 A download has completed. The wParam value indicates success (1) or failure (0) and lParam is the file ID.
WEBVIEW_EVENT_MESSAGE_RECEIVED 11 Message received from a script on the page.
WEBVIEW_EVENT_SCRIPT_COMPLETED 12 Script execution completed. The wParam value indicates success (1) or failure (0) and lParam is the user-defined parameter.
WEBVIEW_EVENT_DOM_CONTENT_LOADED 13 The HTML document has been parsed and the Document Object Model (DOM) is ready to be used.
Status Flags
WEBVIEW_STATUS_SESSION_IDLE 0 No navigation in progress, the browser is in an idle state.
WEBVIEW_STATUS_NAVIGATING 0x0001 Currently navigating to a new location.
WEBVIEW_STATUS_NAVIGATION_ERROR 0x0002 The navigation failed due to an error.
WEBVIEW_STATUS_NAVIGATION_CANCELED 0x0004 The navigation was canceled by the user or host.
WEBVIEW_STATUS_NAVIGATION_TIMEOUT 0x0008 The navigation exceeded the configured timeout period.
WEBVIEW_STATUS_NAVIGATION_BLOCKED 0x0010 The navigation was blocked by policy.
WEBVIEW_STATUS_CONNECTION_FAILED 0x0100 The connection attempt failed or hostname was invalid.
WEBVIEW_STATUS_CONNECTION_ABORTED 0x0200 The connection was aborted or reset.
WEBVIEW_STATUS_SECURITY_WARNING 0x1000 The page includes insecure/mixed content or weak encryption was detected.
Icon Flags
WEBVIEW_ICON_BIG 0x0001 Update the large window icon.
WEBVIEW_ICON_SMALL 0x0002 Update the small window icon.
WEBVIEW_ICON_BOTH 0x0003 Update both large and small icons.
WEBVIEW_ICON_DPI_AWARE 0x0100 Choose the system-recommended small icon size for the current DPI when possible.
Navigate Flags
WEBVIEW_NAVIGATE_DEFAULT 0 Default navigation behavior.
WEBVIEW_NAVIGATE_SAFE_URL 0x0001 Applies additional URL safety checks and normalization before navigating.
Header Type Flags
WEBVIEW_HEADERS_REQUEST 0x0001 Specifies custom request headers supplied by the client.
WEBVIEW_HEADERS_RESPONSE 0x0002 Specifies headers returned by the server in the last response.
Print Dialog Flags
WEBVIEW_PRINT_DIALOG_DEFAULT 0 Use Edge's print preview dialog, equivalent to the Ctrl+P experience.
WEBVIEW_PRINT_DIALOG_SYSTEM 0x0001 Use the native system print dialog. Does not include print preview.
File Types (Save Document)
WEBVIEW_FILE_TYPE_DEFAULT 0 Save using a format inferred from the file extension.
WEBVIEW_FILE_TYPE_TEXT 1 Save the document as a plain text file.
WEBVIEW_FILE_TYPE_HTML 2 Save the document as an HTML file.
WEBVIEW_FILE_TYPE_JSON 3 Save the document as JSON formatted string with reserved characters encoded.
WEBVIEW_FILE_TYPE_MHTML 4 Save the document as an MHTML single-file archive which includes all page assets.
WEBVIEW_FILE_TYPE_PDF 5 Save the document as a PDF file.
WEBVIEW_FILE_TYPE_JPEG 101 Save the current view as a JPEG image.
WEBVIEW_FILE_TYPE_PNG 102 Save the current view as a PNG image.
WEBVIEW_FILE_TYPE_WEBP 103 Save the current view as a WEBP image.
Download Status
WEBVIEW_DOWNLOAD_STARTED 1 The file download has started and is in-progress.
WEBVIEW_DOWNLOAD_COMPLETED 2 The file download has completed successfully.
WEBVIEW_DOWNLOAD_CANCELED 3 The file download has been canceled.
WEBVIEW_DOWNLOAD_FAILED 4 The file download failed due to a network error or other problem.
Zoom
WEBVIEW_ZOOM_MIN_PERCENT 25 Minimum zoom level as a percentage.
WEBVIEW_ZOOM_MAX_PERCENT 400 Maximum zoom level as a percentage.
WEBVIEW_ZOOM_DEFAULT 100 Default zoom level as a percentage.
Security Levels
WEBVIEW_SECURITY_LEVEL_UNKNOWN 0 The security state could not be determined.
WEBVIEW_SECURITY_LEVEL_INSECURE 1 The page was retrieved using plain HTTP or the site has an invalid certificate.
WEBVIEW_SECURITY_LEVEL_WARNING 2 The page contains mixed content or only weak encryption is available.
WEBVIEW_SECURITY_LEVEL_NEUTRAL 3 Local content or the browser is in a transitional/loading state.
WEBVIEW_SECURITY_LEVEL_SECURE 4 The page was retrieved using HTTPS and the site has a valid certificate.
WEBVIEW_SECURITY_LEVEL_LOW 1 Alias of WEBVIEW_SECURITY_LEVEL_WARNING.
WEBVIEW_SECURITY_LEVEL_HIGH 4 Alias of WEBVIEW_SECURITY_LEVEL_SECURE.
Security Flags
WEBVIEW_SECURITY_FLAG_NONE 0 No additional security indicators.
WEBVIEW_SECURITY_FLAG_UNENCRYPTED 0x0001 Content is not encrypted.
WEBVIEW_SECURITY_FLAG_INSECURE 0x0002 Site is insecure using outdated protocols or weak ciphers.
WEBVIEW_SECURITY_FLAG_CERT_WEAK 0x0004 The certificate uses weak signatures.
WEBVIEW_SECURITY_FLAG_CERT_ERROR 0x0008 The certificate is invalid. This is a general error condition.
WEBVIEW_SECURITY_FLAG_CERT_EXPIRED 0x0010 The certificate expired but is otherwise valid.
WEBVIEW_SECURITY_FLAG_UNSAFE 0x0020 The site is considered potentially unsafe (it failed reputation checks).