Skip to content

Latest commit

 

History

History
141 lines (109 loc) · 3.86 KB

File metadata and controls

141 lines (109 loc) · 3.86 KB
title CHtmlEditCtrl Class | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic reference
f1_keywords
CHtmlEditCtrl
AFXHTML/CHtmlEditCtrl
AFXHTML/CHtmlEditCtrl::CHtmlEditCtrl
AFXHTML/CHtmlEditCtrl::Create
AFXHTML/CHtmlEditCtrl::GetDHtmlDocument
AFXHTML/CHtmlEditCtrl::GetStartDocument
dev_langs
C++
helpviewer_keywords
CHtmlEditCtrl class
ms.assetid 0fc4a238-b05f-4874-9edc-6a6701f064d9
caps.latest.revision 22
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

CHtmlEditCtrl Class

Provides the functionality of the WebBrowser ActiveX control in an MFC window.

Syntax

class CHtmlEditCtrl: public CWnd,   
    public CHtmlEditCtrlBase<CHtmlEditCtrl>  

Members

Public Constructors

Name Description
CHtmlEditCtrl::CHtmlEditCtrl Constructs a CHtmlEditCtrl object.

Public Methods

Name Description
CHtmlEditCtrl::Create Creates a WebBrowser ActiveX control and attaches it to the CHtmlEditCtrl object. This function automatically puts the WebBrowser ActiveX control into edit mode.
CHtmlEditCtrl::GetDHtmlDocument Retrieves the IHTMLDocument2 interface on the document currently loaded in the contained WebBrowser control.
CHtmlEditCtrl::GetStartDocument Retrieves the URL to a default document to load in the contained WebBrowser control.

Remarks

The hosted WebBrowser control is automatically put into edit mode after it is created.

Inheritance Hierarchy

CObject

CCmdTarget

CHtmlEditCtrlBase

CWnd

CHtmlEditCtrl

Requirements

Header: afxhtml.h

CHtmlEditCtrl::CHtmlEditCtrl

Constructs a CHtmlEditCtrl object.

CHtmlEditCtrl();

CHtmlEditCtrl::Create

Creates a WebBrowser ActiveX control and attaches it to the CHtmlEditCtrl object. The WebBrowser ActiveX control automatically navigates to a default document and then is placed in edit mode by this function.

virtual BOOL Create(
    LPCTSTR lpszWindowName,  
    DWORD dwStyle,  
    const RECT& rect,  
    CWnd* pParentWnd,  
    int nID,  
    CCreateContext* pContext = NULL);

Parameters

lpszWindowName
This parameter is unused.

dwStyle
This parameter is unused.

rect
Specifies the control's size and position.

pParentWnd
Specifies the control's parent window. It must not be NULL.

nID
Specifies the control's ID.

pContext
This parameter is unused.

Return Value

Returns TRUE on success, FALSE on failure.

CHtmlEditCtrl::GetDHtmlDocument

Retrieves the IHTMLDocument2 interface on the document currently loaded in the contained WebBrowser control

BOOL GetDHtmlDocument(IHTMLDocument2** ppDocument) const;  

Parameters

ppDocument
The document interface.

CHtmlEditCtrl::GetStartDocument

Retrieves the URL to a default document to load in the contained WebBrowser control.

virtual LPCTSTR GetStartDocument();

See Also

Hierarchy Chart