共用方式為


CDHtmlDialog Class

Is used to create dialog boxes that use HTML rather than dialog resources to implement their user interface.

class CDHtmlDialog : public CDialog, public CDHtmlEventSink

Members

Public Constructors

Name

Description

CDHtmlDialog::CDHtmlDialog

Constructs a CDHtmlDialog object.

CDHtmlDialog::~CDHtmlDialog

Destroys a CDHtmlDialog object.

Public Methods

Name

Description

CDHtmlDialog::CanAccessExternal

Overridable that is called as an access check to see whether scripting objects on the loaded page can access the external dispatch of the control site. Checks to make sure the dispatch is either safe for scripting or the current zone allows for objects that are not safe for scripting.

CDHtmlDialog::CreateControlSite

Overridable used to create a control site instance to host the WebBrowser control on the dialog.

CDHtmlDialog::DDX_DHtml_AxControl

Exchanges data between a member variable and the property value of an ActiveX control on an HTML page.

CDHtmlDialog::DDX_DHtml_CheckBox

Exchanges data between a member variable and a check box on an HTML page.

CDHtmlDialog::DDX_DHtml_ElementText

Exchanges data between a member variable and any HTML element property on an HTML page.

CDHtmlDialog::DDX_DHtml_Radio

Exchanges data between a member variable and a radio button on an HTML page.

CDHtmlDialog::DDX_DHtml_SelectIndex

Gets or sets the index of a list box on an HTML page.

CDHtmlDialog::DDX_DHtml_SelectString

Gets or sets the display text of a list box entry (based on the current index) on an HTML page.

CDHtmlDialog::DDX_DHtml_SelectValue

Gets or sets the value of a list box entry (based on the current index) on an HTML page.

CDHtmlDialog::DestroyModeless

Destroys a modeless dialog box.

CDHtmlDialog::EnableModeless

Enables modeless dialog boxes.

CDHtmlDialog::FilterDataObject

Allows the dialog to filter clipboard data objects created by the hosted browser.

CDHtmlDialog::GetControlDispatch

Retrieves the IDispatch interface on an ActiveX control embedded in the HTML document.

CDHtmlDialog::GetControlProperty

Retrieves the requested property of the specified ActiveX control.

CDHtmlDialog::GetCurrentUrl

Retrieves the Uniform Resource Locator (URL) associated with the current document.

CDHtmlDialog::GetDHtmlDocument

Retrieves the IHTMLDocument2 interface on the currently loaded HTML document.

CDHtmlDialog::GetDropTarget

Called by the contained WebBrowser control when it is being used as a drop target to allow the dialog to supply an alternative IDropTarget.

CDHtmlDialog::GetElement

Gets an interface on an HTML element.

CDHtmlDialog::GetElementHtml

Retrieves the innerHTML property of an HTML element.

CDHtmlDialog::GetElementInterface

Retrieves the requested interface pointer from an HTML element.

CDHtmlDialog::GetElementProperty

Retrieves the value of an HTML element's property.

CDHtmlDialog::GetElementText

Retrieves the innerText property of an HTML element.

CDHtmlDialog::GetEvent

Gets the IHTMLEventObj pointer to the current event object.

CDHtmlDialog::GetExternal

Gets the host's IDispatch interface.

CDHtmlDialog::GetHostInfo

Retrieves the host's UI capabilities.

CDHtmlDialog::GetOptionKeyPath

Retrieves the registry key under which user preferences are stored.

CDHtmlDialog::HideUI

Hides the host's UI.

CDHtmlDialog::IsExternalDispatchSafe

Indicates whether the host's IDispatch interface is safe for scripting.

CDHtmlDialog::LoadFromResource

Loads the specified resource into the WebBrowser control.

CDHtmlDialog::Navigate

Navigates to the specified URL.

CDHtmlDialog::OnBeforeNavigate

Called by the framework before a navigation event is fired.

CDHtmlDialog::OnDocumentComplete

Called by the framework to notify an application when a document has reached the READYSTATE_COMPLETE state.

CDHtmlDialog::OnDocWindowActivate

Called by the framework when the document window is activated or deactivated.

CDHtmlDialog::OnFrameWindowActivate

Called by the framework when the frame window is activated or deactivated.

CDHtmlDialog::OnInitDialog

Called in response to the WM_INITDIALOG message.

CDHtmlDialog::OnNavigateComplete

Called by the framework after a navigation event is completed.

CDHtmlDialog::ResizeBorder

Alerts the object that it needs to resize its border space.

CDHtmlDialog::SetControlProperty

Sets the property of an ActiveX control to a new value.

CDHtmlDialog::SetElementHtml

Sets the innerHTML property of an HTML element.

CDHtmlDialog::SetElementProperty

Sets a property of an HTML element.

CDHtmlDialog::SetElementText

Sets the innerText property of an HTML element.

CDHtmlDialog::SetExternalDispatch

Sets the host's IDispatch interface.

CDHtmlDialog::SetHostFlags

Sets the host's UI flags.

CDHtmlDialog::ShowContextMenu

Called when a context menu is about to be displayed.

CDHtmlDialog::ShowUI

Shows the host's UI.

CDHtmlDialog::TranslateAccelerator

Called to process menu accelerator-key messages.

CDHtmlDialog::TranslateUrl

Called to modify the URL to be loaded.

CDHtmlDialog::UpdateUI

Called to notify the host that the command state has changed.

Public Data Members

Name

Description

CDHtmlDialog::m_bUseHtmlTitle

Indicates whether to use the HTML document's title as the dialog caption.

CDHtmlDialog::m_nHtmlResID

Resource ID of HTML resource to be displayed.

CDHtmlDialog::m_pBrowserApp

A pointer to a Web browser application.

CDHtmlDialog::m_spHtmlDoc

A pointer to an HTML document.

CDHtmlDialog::m_strCurrentUrl

The current URL.

CDHtmlDialog::m_szHtmlResID

String version of the HTML resource ID.

Remarks

CDHtmlDialog can load the HTML to be displayed from either an HTML resource or a URL.

CDHtmlDialog can also do data exchange with HTML controls and handle events from HTML controls, such as button clicks.

Inheritance Hierarchy

CObject

CDHtmlSinkHandlerBase2

CDHtmlSinkHandlerBase1

CCmdTarget

CDHtmlSinkHandler

CWnd

CDHtmlEventSink

CDialog

CDHtmlDialog

Requirements

Header: afxdhtml.h

See Also

Reference

DDX_DHtml Helper Macros

Hierarchy Chart

Concepts

MFC Sample DHtmlExplore