CWebView::GetOption Method  
 
BOOL GetOption(
  DWORD dwOption  
  LPBOOL lpbEnabled  
);

The GetOption method checks whether a specific option flag is enabled.

Parameters

dwOption
An unsigned integer which specifies the option to be checked. Refer to the Options documentation for the list of available options. Only a single option may be specified; you cannot combine multiple option bitflags when calling this method.
lpbEnabled
A pointer to an integer which will be updated when the method returns. If the value is non-zero, the option has been enabled. If the value is zero, the option has not been enabled.

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 GetOption method is used to determine if a specific option has been enabled for the browser instance associated with the specified host window. Each option corresponds to an individual feature or behavior that can be enabled or disabled at creation time or later using SetOption.

This method only supports checking a single option value at a time. The dwOption parameter must specify exactly one option bitflag, such as WEBVIEW_OPTION_ENABLE_SCRIPTING or WEBVIEW_OPTION_ENABLE_CONTEXT_MENU. It is not valid to combine multiple bitflags with a bitwise OR. If you need to retrieve the complete set of enabled options, call GetAllOptions.

Note that not all options may be applicable after a window has been created. Some options only take effect at creation time and cannot be changed dynamically. For example, options related to profile isolation or privacy modes must be specified before the control is initialized.

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