CHtmlEditCtrlBase Class

Represents an HTML editing component.

Syntax

template <class T> class CHtmlEditCtrlBase

Members

Public Methods

Name Description
CHtmlEditCtrlBase::AddToGlyphTable Adds an entry to the glyph table, which specifies images to display for specific tags in design mode.
CHtmlEditCtrlBase::Bold Toggles the bold state of the selected text.
CHtmlEditCtrlBase::Button Overwrites a button control on the current selection.
CHtmlEditCtrlBase::CheckBox Overwrites a check box control on the current selection.
CHtmlEditCtrlBase::ClearSelection Clears the current selection.
CHtmlEditCtrlBase::Copy Copies the current selection to the clipboard.
CHtmlEditCtrlBase::Cut Copies the current selection to the clipboard and then deletes it.
CHtmlEditCtrlBase::Delete Deletes the current selection.
CHtmlEditCtrlBase::DropDownBox Overwrites a drop-down selection control on the current selection.
CHtmlEditCtrlBase::EmptyGlyphTable Removes all entries from the glyph table, which hides all images displayed for tags in design mode.
CHtmlEditCtrlBase::ExecCommand Executes a command.
CHtmlEditCtrlBase::Font Opens a font dialog box to enable the user to change the text color, font, and font size of the current selection.
CHtmlEditCtrlBase::GetAbsolutePosition Returns whether an element's position property is "absolute."
CHtmlEditCtrlBase::GetBackColor Retrieves the background color of the current selection.
CHtmlEditCtrlBase::GetBlockFormat Retrieves the current block format tag.
CHtmlEditCtrlBase::GetBlockFormatNames Retrieves the strings corresponding to the available block format tags.
CHtmlEditCtrlBase::GetBookMark Retrieves the name of a bookmark anchor.
CHtmlEditCtrlBase::GetDocument Retrieves the document object.
CHtmlEditCtrlBase::GetDocumentHTML Retrieves the HTML of the current document.
CHtmlEditCtrlBase::GetDocumentTitle Retrieves the document's title.
CHtmlEditCtrlBase::GetEvent Retrieves an interface pointer to the event object that contains information relevant to the most recent event.
CHtmlEditCtrlBase::GetEventSrcElement Retrieves the object that fired the event.
CHtmlEditCtrlBase::GetFontFace Retrieves the font name for the current selection.
CHtmlEditCtrlBase::GetFontSize Retrieves the font size for the current selection.
CHtmlEditCtrlBase::GetForeColor Retrieves the foreground (text) color of the current selection.
CHtmlEditCtrlBase::GetFrameZone Returns the security zone of the current page in the web browser.
CHtmlEditCtrlBase::GetIsDirty Indicates whether the HTML document has changed.
CHtmlEditCtrlBase::GetShowAlignedSiteTags Returns whether a glyph is displayed for all elements that have a styleFloat property.
CHtmlEditCtrlBase::GetShowAllTags Returns whether the WebBrowser displays glyphs to show the location of all tags in a document.
CHtmlEditCtrlBase::GetShowAreaTags Retrieves whether the WebBrowser displays a glyph for area tags.
CHtmlEditCtrlBase::GetShowBRTags Retrieves whether the WebBrowser displays a glyph for br tags.
CHtmlEditCtrlBase::GetShowCommentTags Retrieves whether the WebBrowser displays a glyph for comment tags.
CHtmlEditCtrlBase::GetShowMiscTags Retrieves whether the WebBrowser displays all the tags shown in Microsoft Internet Explorer 4.0.
CHtmlEditCtrlBase::GetShowScriptTags Retrieves whether the WebBrowser displays a glyph for all the script tags.
CHtmlEditCtrlBase::GetShowStyleTags Retrieves whether the WebBrowser displays a glyph for all the style tags.
CHtmlEditCtrlBase::GetShowUnknownTags Retrieves whether the WebBrowser displays a glyph for all unknown tags.
CHtmlEditCtrlBase::HorizontalLine Overwrites a horizontal line on the current selection.
CHtmlEditCtrlBase::HyperLink Inserts a hyperlink on the current selection.
CHtmlEditCtrlBase::IE50Paste Performs a paste operation compatible with Microsoft Internet Explorer 5.
CHtmlEditCtrlBase::Iframe Overwrites an inline frame on the current selection.
CHtmlEditCtrlBase::Image Overwrites an image on the current selection.
CHtmlEditCtrlBase::Indent Increases the indent of the selected text by one indentation increment.
CHtmlEditCtrlBase::InsFieldSet Overwrites a box on the current selection.
CHtmlEditCtrlBase::InsInputButton Overwrites a button control on the current selection.
CHtmlEditCtrlBase::InsInputHidden Inserts a hidden control on the current selection.
CHtmlEditCtrlBase::InsInputImage Overwrites an image control on the current selection.
CHtmlEditCtrlBase::InsInputPassword Overwrites a password control on the current selection.
CHtmlEditCtrlBase::InsInputReset Overwrites a reset control on the current selection.
CHtmlEditCtrlBase::InsInputSubmit Overwrites a submit control on the current selection.
CHtmlEditCtrlBase::InsInputUpload Overwrites a file upload control on the current selection.
CHtmlEditCtrlBase::Is1DElement Determines if an element is statically positioned.
CHtmlEditCtrlBase::Is2DElement Determines if an element is absolutely positioned.
CHtmlEditCtrlBase::Italic Toggles the current selection between italic and nonitalic.
CHtmlEditCtrlBase::JustifyCenter Centers the format block in which the current selection is located.
CHtmlEditCtrlBase::JustifyLeft Left-justifies the format block in which the current selection is located.
CHtmlEditCtrlBase::JustifyRight Right-justifies the format block in which the current selection is located.
CHtmlEditCtrlBase::ListBox Overwrites a list box selection control on the current selection.
CHtmlEditCtrlBase::Marquee Overwrites an empty marquee on the current selection.
CHtmlEditCtrlBase::NewDocument Creates a new document.
CHtmlEditCtrlBase::OrderList Toggles the current selection between an ordered list and a normal format block.
CHtmlEditCtrlBase::Outdent Decreases by one increment the indentation of the format block in which the current selection is located.
CHtmlEditCtrlBase::Paragraph Overwrites a line break on the current selection.
CHtmlEditCtrlBase::Paste Overwrites the contents of the clipboard on the current selection.
CHtmlEditCtrlBase::PrintDocument Prints the current document.
CHtmlEditCtrlBase::PrintPreview Opens the Print Preview window for the current document using either the default print preview template or a custom template.
CHtmlEditCtrlBase::QueryStatus Call this method to query the status of commands.
CHtmlEditCtrlBase::RadioButton Overwrites a radio control on the current selection.
CHtmlEditCtrlBase::RefreshDocument Refreshes the current document.
CHtmlEditCtrlBase::RemoveFormat Removes the formatting tags from the current selection.
CHtmlEditCtrlBase::SaveAs Saves the current Web page to a file.
CHtmlEditCtrlBase::SelectAll Selects the entire document.
CHtmlEditCtrlBase::Set2DPosition Allows absolutely positioned elements to be moved by dragging.
CHtmlEditCtrlBase::SetAbsolutePosition Sets an element's position property to "absolute" or "static."
CHtmlEditCtrlBase::SetAtomicSelection Set atomic selection mode.
CHtmlEditCtrlBase::SetAutoURLDetectMode Turns automatic URL detection on and off.
CHtmlEditCtrlBase::SetBackColor Sets the background color of the current selection.
CHtmlEditCtrlBase::SetBlockFormat Sets the current block format tag.
CHtmlEditCtrlBase::SetBookMark Creates a bookmark anchor for the current selection or insertion point.
CHtmlEditCtrlBase::SetCSSEditingLevel Selects which CSS level (CSS1 or CSS2) the editor will support, if any.
CHtmlEditCtrlBase::SetDefaultComposeSettings Call this method to set the default compose settings.
CHtmlEditCtrlBase::SetDesignMode Set design mode.
CHtmlEditCtrlBase::SetDisableEditFocusUI Disables the hatched border and handles around an element that has edit focus.
CHtmlEditCtrlBase::SetDocumentHTML Sets the HTML of the current document.
CHtmlEditCtrlBase::SetFontFace Sets the font for the current selection.
CHtmlEditCtrlBase::SetFontSize Sets the font size for the current selection.
CHtmlEditCtrlBase::SetForeColor Sets the foreground (text) color of the current selection.
CHtmlEditCtrlBase::SetIE5PasteMode Sets the paste operation to be compatible with Microsoft Internet Explorer 5.
CHtmlEditCtrlBase::SetLiveResize Causes the WebBrowser to update an element's appearance continuously during a resizing or moving operation.
CHtmlEditCtrlBase::SetMultiSelect Enables multiple selection.
CHtmlEditCtrlBase::SetOverrideCursor Commands the WebBrowser never to change the mouse pointer.
CHtmlEditCtrlBase::SetOverwriteMode Toggles the text-entry mode between insert and overwrite.
CHtmlEditCtrlBase::SetRespectVisInDesign Hides invisible elements in design mode.
CHtmlEditCtrlBase::SetShowAlignedSiteTags Displays a glyph for all elements that have a styleFloat property.
CHtmlEditCtrlBase::SetShowAllTags Displays glyphs to show the location of all tags in a document.
CHtmlEditCtrlBase::SetShowAreaTags Displays a glyph for all the area tags.
CHtmlEditCtrlBase::SetShowBRTags Displays a glyph for all the br tags.
CHtmlEditCtrlBase::SetShowCommentTags Displays a glyph for all the comment tags.
CHtmlEditCtrlBase::SetShowMiscTags Displays all the tags shown in Microsoft Internet Explorer 4.0.
CHtmlEditCtrlBase::SetShowScriptTags Displays a glyph for all the script tags.
CHtmlEditCtrlBase::SetShowStyleTags Displays a glyph for all the style tags.
CHtmlEditCtrlBase::SetShowUnknownTags Displays a glyph for all the unknown tags.
CHtmlEditCtrlBase::TextArea Overwrites a multiline text input control on the current selection.
CHtmlEditCtrlBase::TextBox Overwrites a text control on the current selection.
CHtmlEditCtrlBase::UnBookmark Removes any bookmark from the current selection.
CHtmlEditCtrlBase::Underline Toggles the current selection between underlined and not underlined.
CHtmlEditCtrlBase::Unlink Removes any hyperlink from the current selection.
CHtmlEditCtrlBase::UnorderList Toggles the current selection between an ordered list and a normal format block.

Parameters

T
The name of the derived class.

Remarks

CHtmlEditCtrlBase provides member functions for the WebBrowser's HTML editing commands, such as Bold. (Alternately, you can call ExecCommand to execute the IDM_BOLD command.)

CHtmlEditCtrlBase is not intended to stand on its own. It is designed to be a base class for derived classes that expose the HTML editing functionality of the WebBrowser (see CHtmlEditCtrl and CHtmlEditView).

Inheritance Hierarchy

CHtmlEditCtrlBase

Requirements

Header: afxhtml.h

CHtmlEditCtrlBase::AddToGlyphTable

Adds an entry to the glyph table, which specifies images to display for specific tags in design mode.

HRESULT AddToGlyphTable(
    LPCTSTR szTag,
    LPCTSTR szImgUrl,
    unsigned short nTagType,
    unsigned short nAlignment,
    unsigned short nPosInfo,
    unsigned short nDirection,
    unsigned int nImgWidth,
    unsigned int nImgHeight) const;

Parameters

szTag
The tag name (for example, "P" or "table").

szImgUrl
The image URL.

nTagType
Tag type: 0 means the image is for the opening tag only. 1 means the image is for the closing tag only. 2 means the image is for both the opening and closing tags. Single tags such as br and comment must be added with the tag type set to 0.

nAlignment
Alignment (rectangular elements only): This parameter indicates that the image is for an element with an alignment attribute. Left = 0, center = 1, right = 2, and undefined = 3. Left, right, or center attributes must be explicitly set on the element.

nPosInfo
Positioning information. Determines what cascading style sheets (CSS) positioning value the glyph applies to, where static positioning = 0, absolute positioning = 1, relative positioning = 2, and all = 3. This field enables you to specify one glyph for a tag when it is not positioned and another glyph to show an anchor point when the tag is positioned.

nDirection
The direction. This parameter specifies the image for a tag based on the reading order of the current language. 0 specifies left to right, 1 specifies right to left, 2 specifies top to bottom, 3 specifies bottom to top, and 4 specifies all. You normally set this field to 4.

nImgWidth
The image width in pixels.

nImgHeight
The image height in pixels.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information on the parameters, see "Glyph Table String Format" in Using Editing Glyphs.

This method sends the IDM_ADDTOGLYPHTABLE command ID to the WebBrowser control.

CHtmlEditCtrlBase::Bold

Toggles the bold state of the selected text.

HRESULT Bold() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_BOLD command ID to the WebBrowser control.

CHtmlEditCtrlBase::Button

Overwrites a button control on the current selection.

HRESULT Button(LPCTSTR szId = NULL) const;

Parameters

szId
The ID of the button control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_BUTTON command ID to the WebBrowser control.

CHtmlEditCtrlBase::CheckBox

Overwrites a check box control on the current selection.

HRESULT CheckBox(LPCTSTR szId = NULL) const;

Parameters

szId
The ID of the check box control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_CHECKBOX command ID to the WebBrowser control.

CHtmlEditCtrlBase::ClearSelection

Clears the current selection.

HRESULT ClearSelection() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_CLEARSELECTION command ID to the WebBrowser control.

CHtmlEditCtrlBase::Copy

Copies the current selection to the clipboard.

HRESULT Copy() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_COPY command ID to the WebBrowser control.

CHtmlEditCtrlBase::Cut

Copies the current selection to the clipboard and then deletes it.

HRESULT Cut() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_CUT command ID to the WebBrowser control.

CHtmlEditCtrlBase::Delete

Deletes the current selection.

HRESULT Delete() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_DELETE command ID to the WebBrowser control.

Overwrites a drop-down selection control on the current selection.

HRESULT DropDownBox(LPCTSTR szId = NULL) const;

Parameters

szId
The ID of the drop-down selection control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_DROPDOWNBOX command ID to the WebBrowser control.

CHtmlEditCtrlBase::EmptyGlyphTable

Removes all entries from the glyph table, which hides all images displayed for tags in design mode.

HRESULT EmptyGlyphTable() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_EMPTYGLYPHTABLE command ID to the WebBrowser control.

CHtmlEditCtrlBase::ExecCommand

Executes a command.

HRESULT ExecCommand(
    long cmdID,
    long cmdExecOpt,
    VARIANT* pInVar = NULL,
    VARIANT* pOutVar = NULL) const;

HRESULT ExecCommand(
    const GUID* pGuid,
    long cmdID,
    long cmdExecOpt,
    VARIANT* pInVar = NULL,
    VARIANT* pOutVar = NULL) const;

Parameters

cmdID
The command ID to be executed. For a list, see MSHTML Command Identifiers.

cmdExecOpt
Values taken from the OLECMDEXECOPT enumeration, which describe how the object should execute the command.

pInVar
The input arguments.

pOutVar
The command output.

pGuid
The GUID of the command group.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method provides the functionality of IOleCommandTarget::Exec.

CHtmlEditCtrlBase::Font

Opens a font dialog box to enable the user to change the text color, font, and font size of the current selection.

HRESULT Font() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_FONT command ID to the WebBrowser control.

CHtmlEditCtrlBase::GetAbsolutePosition

Returns whether an element's position property is "absolute."

HRESULT GetAbsolutePosition(bool& bCurValue) const;

Parameters

bCurValue
TRUE if the element's position property is set to "absolute."

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_ABSOLUTE_POSITION Command ID.

CHtmlEditCtrlBase::GetBackColor

Retrieves the background color of the current selection.

HRESULT GetBackColor(int& nColor) const;

Parameters

nColor
The background color.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_BACKCOLOR Command ID to the WebBrowser control.

CHtmlEditCtrlBase::GetBlockFormat

Retrieves the current block format tag.

HRESULT GetBlockFormat(CString& strFormat) const;

Parameters

strFormat
The current block format tag.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_BLOCKFMT command ID to the WebBrowser control.

CHtmlEditCtrlBase::GetBlockFormatNames

Retrieves the strings corresponding to the available block format tags.

HRESULT GetBlockFormatNames(CStringArray& sa) const;

Parameters

sa
The available block format tags, as an array of strings.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_GETBLOCKFMTS command ID to the WebBrowser control.

CHtmlEditCtrlBase::GetBookMark

Retrieves the name of a bookmark anchor.

HRESULT GetBookMark(CString& strAnchor) const;

Parameters

strAnchor
The name of a bookmark anchor.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_BOOKMARK Command ID.

CHtmlEditCtrlBase::GetDocument

Retrieves the document object.

HRESULT GetDocument(IHTMLDocument2** ppDoc) const;

Parameters

ppDoc
The document object.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

CHtmlEditCtrlBase::GetDocumentHTML

Retrieves the HTML of the current document.

HRESULT GetDocumentHTML(CString& szHTML) const;

Parameters

szHTML
The HTML.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

CHtmlEditCtrlBase::GetDocumentTitle

Retrieves the document's title.

HRESULT GetDocumentTitle(CString& szTitle) const;

Parameters

szTitle
The document's title.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

CHtmlEditCtrlBase::GetEvent

Retrieves an interface pointer to the event object that contains information relevant to the most recent event.

HRESULT GetEvent(IHTMLEventObj** ppEventObj) const;

Parameters

ppEventObj
The event object.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

CHtmlEditCtrlBase::GetEventSrcElement

Retrieves the object that fired the event.

HRESULT GetEventSrcElement(IHTMLElement** ppSrcElement) const;

Parameters

ppSrcElement
The element that fired the event.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

CHtmlEditCtrlBase::GetFontFace

Retrieves the font name for the current selection.

HRESULT GetFontFace(CString& strFace) const;

Parameters

strFace
The font name.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

If the current selection uses more than one font, strFace will be an empty string.

This method sends the IDM_FONTNAME command ID to the WebBrowser control.

CHtmlEditCtrlBase::GetFontSize

Retrieves the font size for the current selection.

HRESULT GetFontSize(short& nSize) const;

Parameters

nSize
The font size.

Return Value

Returns the HTML font size (1-7). Returns 0 if the selection contains multiple font sizes.

Remarks

This method sends the IDM_FONTSIZE command ID to the WebBrowser control.

CHtmlEditCtrlBase::GetForeColor

Retrieves the foreground (text) color of the current selection.

HRESULT GetForeColor(int& nColor);

Parameters

nColor
The foreground color.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_FORECOLOR Command ID to the WebBrowser control.

CHtmlEditCtrlBase::GetFrameZone

Returns the security zone of the current page in the web browser.

HRESULT GetFrameZone(short& nZone) const;

Parameters

nZone
The security zone.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_GETFRAMEZONE command ID to the WebBrowser control.

CHtmlEditCtrlBase::GetIsDirty

Indicates whether the HTML document has changed.

HRESULT GetIsDirty() const;

Remarks

Indicates whether the document has changed. GetIsDirty returns an HRESULT from IPersistStorage::IsDirty.

CHtmlEditCtrlBase::GetShowAlignedSiteTags

Returns whether a glyph is displayed for all elements that have a styleFloat property.

HRESULT GetShowAlignedSiteTags(bool& bCurValue) const;

Parameters

bCurValue
TRUE if a glyph is displayed for all elements that have a styleFloat property; FALSE if no glyph is displayed.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_SHOWALIGNEDSITETAGS Command ID.

CHtmlEditCtrlBase::GetShowAllTags

Returns whether the WebBrowser displays glyphs to show the location of all tags in a document.

HRESULT GetShowAllTags(bool& bCurValue) const;

Parameters

bCurValue
TRUE if the WebBrowser displays glyphs to show the location of all tags in a document; FALSE if it does not.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_SHOWALLTAGS Command ID.

CHtmlEditCtrlBase::GetShowAreaTags

Retrieves whether the WebBrowser displays a glyph for area tags.

HRESULT GetShowAreaTags(bool& bCurValue) const;

Parameters

bCurValue
TRUE if the WebBrowser displays a glyph for area tags, FALSE if it does not.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_SHOWAREATAGS Command ID.

CHtmlEditCtrlBase::GetShowBRTags

Retrieves whether the WebBrowser displays a glyph for br tags.

HRESULT GetShowBRTags(bool& bCurValue) const;

Parameters

bCurValue
TRUE if the WebBrowser displays a glyph for br tags, FALSE if it doesn't.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_SHOWWBRTAGS Command ID.

CHtmlEditCtrlBase::GetShowCommentTags

Retrieves whether the WebBrowser displays a glyph for comment tags.

HRESULT GetShowCommentTags(bool& bCurValue) const;

Parameters

bCurValue
TRUE if the WebBrowser displays a glyph for comment tags, FALSE if it doesn't.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_SHOWCOMMENTTAGS Command ID.

CHtmlEditCtrlBase::GetShowMiscTags

Retrieves whether the WebBrowser displays all the tags shown in Microsoft Internet Explorer 4.0.

HRESULT GetShowMiscTags(bool& bCurValue) const;

Parameters

bCurValue
TRUE if the WebBrowser displays all the tags shown in Microsoft Internet Explorer 4.0, FALSE if it does not.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_SHOWMISCTAGS Command ID.

CHtmlEditCtrlBase::GetShowScriptTags

Retrieves whether the WebBrowser displays a glyph for all the script tags.

HRESULT GetShowScriptTags(bool& bCurValue) const;

Parameters

bCurValue
TRUE if the WebBrowser displays a glyph for all the script tags, FALSE if it does not.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_SHOWSCRIPTTAGS Command ID.

CHtmlEditCtrlBase::GetShowStyleTags

Retrieves whether the WebBrowser displays a glyph for all the style tags.

HRESULT GetShowStyleTags(bool& bCurValue) const;

Parameters

bCurValue
TRUE if the WebBrowser displays a glyph for all the style tags, FALSE if it does not

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_SHOWSTYLETAGS Command ID.

CHtmlEditCtrlBase::GetShowUnknownTags

Retrieves whether the WebBrowser displays a glyph for all unknown tags.

HRESULT GetShowUnknownTags(bool& bCurValue) const;

Parameters

bCurValue
TRUE if the WebBrowser displays a glyph for all unknown tags, FALSE if it does not.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

For more information, see IDM_SHOWUNKNOWNTAGS Command ID.

CHtmlEditCtrlBase::HorizontalLine

Overwrites a horizontal line on the current selection.

HRESULT HorizontalLine(LPCTSTR szId = NULL) const;

Parameters

szID
The ID for the horizontal line.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_HORIZONTALLINE command ID to the WebBrowser control.

Inserts a hyperlink on the current selection.

HRESULT HyperLink(LPCTSTR szUrl = NULL) const;

Parameters

szUrl
The hyperlink URL.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_HYPERLINK command ID to the WebBrowser control.

CHtmlEditCtrlBase::IE50Paste

Performs a paste operation that's compatible with Internet Explorer 5.

HRESULT IE50Paste(LPCTSTR szData) const;

Parameters

szData
The string to paste.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_IE50_PASTE command ID to the WebBrowser control.

CHtmlEditCtrlBase::Iframe

Overwrites an inline frame on the current selection.

HRESULT Iframe(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the inline frame.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_IFRAME command ID to the WebBrowser control.

CHtmlEditCtrlBase::Image

Overwrites an image on the current selection.

HRESULT Image(LPCTSTR szUrl = NULL) const;

Parameters

szUrl
The path and file name of the image to be inserted.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_IMAGE command ID to the WebBrowser control.

CHtmlEditCtrlBase::Indent

Increases the indent of the selected text by one indentation increment.

HRESULT Indent() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_INDENT command ID to the WebBrowser control.

CHtmlEditCtrlBase::InsFieldSet

Overwrites a box on the current selection.

HRESULT InsFieldSet(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the box.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_INSFIELDSET command ID to the WebBrowser control.

CHtmlEditCtrlBase::InsInputButton

Overwrites a button control on the current selection.

HRESULT InsInputButton(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the button control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_INSINPUTBUTTON command ID to the WebBrowser control.

CHtmlEditCtrlBase::InsInputHidden

Inserts a hidden control on the current selection.

HRESULT InsInputHidden(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the hidden control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_INSINPUTHIDDEN command ID to the WebBrowser control.

CHtmlEditCtrlBase::InsInputImage

Overwrites an image control on the current selection.

HRESULT InsInputImage(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the image control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_INSINPUTIMAGE command ID to the WebBrowser control.

CHtmlEditCtrlBase::InsInputPassword

Overwrites a password control on the current selection.

HRESULT InsInputPassword(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the password control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_INSINPUTPASSWORD command ID to the WebBrowser control.

CHtmlEditCtrlBase::InsInputReset

Overwrites a reset control on the current selection.

HRESULT InsInputReset(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the reset control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_INSINPUTRESET command ID to the WebBrowser control.

CHtmlEditCtrlBase::InsInputSubmit

Overwrites a submit control on the current selection.

HRESULT InsInputSubmit(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the submit control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_INSINPUTSUBMIT command ID to the WebBrowser control.

CHtmlEditCtrlBase::InsInputUpload

Overwrites a file upload control on the current selection.

HRESULT InsInputUpload(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the file upload control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_INSINPUTUPLOAD command ID to the WebBrowser control.

CHtmlEditCtrlBase::Is1DElement

Determines if an element is statically positioned.

HRESULT Is1DElement(bool& bValue) const;

Parameters

bValue
TRUE if the element is statically positioned, FALSE otherwise.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_1D_ELEMENT command ID to the WebBrowser control.

CHtmlEditCtrlBase::Is2DElement

Determines if an element is absolutely positioned.

HRESULT Is2DElement(bool& bValue) const;

Parameters

bValue
TRUE if the element is absolutely positioned, FALSE otherwise.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_2D_ELEMENT command ID to the WebBrowser control.

CHtmlEditCtrlBase::Italic

Toggles the current selection between italic and nonitalic.

HRESULT Italic() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_ITALIC command ID to the WebBrowser control.

CHtmlEditCtrlBase::JustifyCenter

Centers the format block in which the current selection is located.

HRESULT JustifyCenter() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_JUSTIFYCENTER command ID to the WebBrowser control.

CHtmlEditCtrlBase::JustifyLeft

Left-justifies the format block in which the current selection is located.

HRESULT JustifyLeft() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_JUSTIFYLEFT command ID to the WebBrowser control.

CHtmlEditCtrlBase::JustifyRight

Right-justifies the format block in which the current selection is located.

HRESULT JustifyRight() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_JUSTIFYRIGHT command ID to the WebBrowser control.

CHtmlEditCtrlBase::ListBox

Overwrites a list box selection control on the current selection.

HRESULT ListBox(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the list box control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_LISTBOX command ID to the WebBrowser control.

CHtmlEditCtrlBase::Marquee

Overwrites an empty marquee on the current selection.

HRESULT Marquee(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the marquee.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_MARQUEE command ID to the WebBrowser control.

CHtmlEditCtrlBase::NewDocument

Creates a new document.

HRESULT NewDocument() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

CHtmlEditCtrlBase::OrderList

Toggles the current selection between an ordered list and a normal format block.

HRESULT OrderList(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the ordered list.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_ORDERLIST command ID to the WebBrowser control.

CHtmlEditCtrlBase::Outdent

Decreases by one increment the indentation of the format block in which the current selection is located.

HRESULT Outdent() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_OUTDENT command ID to the WebBrowser control.

CHtmlEditCtrlBase::Paragraph

Overwrites a line break on the current selection.

HRESULT Paragraph(LPCTSTR szId = NULL) const;

Parameters

szId
The ID for the paragraph.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_PARAGRAPH command ID to the WebBrowser control.

CHtmlEditCtrlBase::Paste

Overwrites the contents of the clipboard on the current selection.

HRESULT Paste() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_PASTE command ID to the WebBrowser control.

CHtmlEditCtrlBase::PrintDocument

Prints the current document.

HRESULT PrintDocument() const;
HRESULT PrintDocument(LPCTSTR szPrintTemplate) const;
HRESULT PrintDocument(bool bShowPrintDialog) const;

Parameters

szPrintTemplate
Path to a print template; if none is specified, the default print template is used.

bShowPrintDialog
If TRUE, shows the Print dialog.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_PRINT command ID to the WebBrowser control.

CHtmlEditCtrlBase::PrintPreview

Opens the Print Preview window for the current document using either the default print preview template or a custom template.

HRESULT PrintPreview() const;
HRESULT PrintPreview(LPCTSTR szPrintTemplate) const;

Parameters

szPrintTemplate
Path to a print template.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_PRINTPREVIEW command ID to the WebBrowser control.

CHtmlEditCtrlBase::QueryStatus

Call this method to query the status of commands.

long QueryStatus(long cmdID) const;

Parameters

cmdID
The command ID. Command identifiers are taken from the CGID_MSHTML command group. These commands are defined in Mshtmcid.h. You can also find the list online at MSHTML Command Identifiers.

Return Value

Returns an OLECMDF indicating the status for cmdID, or 0 on failure.

CHtmlEditCtrlBase::RadioButton

Overwrites a radio control on the current selection.

HRESULT RadioButton(LPCTSTR szId = NULL) const;

Parameters

szId
The ID of the radio button.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_RADIOBUTTON command ID to the WebBrowser control.

CHtmlEditCtrlBase::RefreshDocument

Refreshes the current document.

HRESULT RefreshDocument() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_REFRESH Command ID to the WebBrowser control.

CHtmlEditCtrlBase::RemoveFormat

Removes the formatting tags from the current selection.

HRESULT RemoveFormat() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_REMOVEFORMAT command ID to the WebBrowser control.

CHtmlEditCtrlBase::SaveAs

Saves the current Web page to a file.

HRESULT SaveAs(LPCTSTR szPath = NULL) const;

Parameters

szPath
The path and file name to which to save the Web page.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SAVEAS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SelectAll

Selects the entire document.

HRESULT SelectAll() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SELECTALL command ID to the WebBrowser control.

CHtmlEditCtrlBase::Set2DPosition

Allows absolutely positioned elements to be moved by dragging.

HRESULT Set2DPosition(bool bNewValue) const;

Parameters

bNewValue
If TRUE, absolutely positioned elements can be moved by dragging.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_2D_POSITION command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetAbsolutePosition

Sets an element's position property to "absolute" or "static."

HRESULT SetAbsolutePosition(bool bNewValue) const;

Parameters

bNewValue
If TRUE, the element's position property is "absolute"; if FALSE, it is "static."

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_ABSOLUTE_POSITION command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetAtomicSelection

Set atomic selection mode.

HRESULT SetAtomicSelection(bool bNewValue) const;

Parameters

bNewValue
If TRUE, any element that has an ATOMICSELECTION attribute set to TRUE will be selectable only as a unit.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_ATOMICSELECTION command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetAutoURLDetectMode

Turns automatic URL detection on and off.

HRESULT SetAutoURLDetectMode(bool bNewValue) const;

Parameters

bNewValue
If TRUE, automatic URL detection is enabled.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_AUTOURLDETECT_MODE command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetBackColor

Sets the background color of the current selection.

HRESULT SetBackColor(int nColor) const;
HRESULT SetBackColor(LPCTSTR szColor) const;

Parameters

nColor
The color. See pvaIn in IDM_BACKCOLOR Command ID.

szColor
The color. See pvaIn in IDM_BACKCOLOR Command ID.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_BACKCOLOR_ command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetBlockFormat

Sets the current block format tag.

HRESULT SetBlockFormat(LPCTSTR szFormat) const;

Parameters

szFormat
The format tag.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_BLOCKFMT_command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetBookMark

Creates a bookmark anchor for the current selection or insertion point.

HRESULT SetBookMark(LPCTSTR szAnchorName) const;

Parameters

szAnchorName
The anchor name.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_BOOKMARK command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetCSSEditingLevel

Selects which CSS level (CSS1 or CSS2) the editor will support, if any.

HRESULT SetCSSEditingLevel(short nLevel) const;

Parameters

nLevel
The CSS level. Pass 0 if you do not want CSS support.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_CSSEDITING_LEVEL command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetDefaultComposeSettings

Call this method to set the default compose settings.

HRESULT SetDefaultComposeSettings(
    LPCSTR szFontName = NULL,
    unsigned short nFontSize = 3,
    COLORREF crFontColor = 0xFF000000,
    COLORREF crFontBgColor = 0xFF000000,
    bool bBold = false,
    bool bItalic = false,
    bool bUnderline = false) const;

Parameters

szFontName
The font name.

nFontSize
The font size.

crFontColor
The font color.

crFontBgColor
The font background color.

bBold
Pass TRUE for bold text.

bItalic
Pass TRUE for italic text.

bUnderline
Pass TRUE for underlined text.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_COMPOSESETTINGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetDesignMode

Set design mode.

BOOL SetDesignMode(BOOL bMode) const;

Parameters

bMode
If TRUE, turns design mode on.

Return Value

Returns TRUE on success, FALSE on failure.

CHtmlEditCtrlBase::SetDisableEditFocusUI

Disables the hatched border and handles around an element that has edit focus.

HRESULT SetDisableEditFocusUI(bool bNewValue) const;

Parameters

bNewValue
If TRUE, disables the hatched border and handles around a site selectable element when the element has "edit focus" in design mode; that is, when the text or contents of the element can be edited.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_DISABLE_EDITFOCUS_UI command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetDocumentHTML

Sets the HTML of the current document.

HRESULT SetDocumentHTML(LPCTSTR szHTML) const;

Parameters

szHTML
The HTML.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

CHtmlEditCtrlBase::SetFontFace

Sets the font for the current selection.

HRESULT SetFontFace(LPCTSTR szFace) const;

Parameters

szFace
The font name.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_FONTNAME Command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetFontSize

Sets the font size for the current selection.

HRESULT SetFontSize(unsigned short size) const;

Parameters

size
The HTML font size (1-7). A value of 0 sets the font size to 1.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_FONTSIZE command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetForeColor

Sets the foreground (text) color of the current selection.

HRESULT SetForeColor(LPCTSTR szColor) const;
HRESULT SetForeColor(int nColor) const;

Parameters

szColor
The color.

nColor
The color.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_FORECOLOR command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetIE5PasteMode

Sets the paste operation to be compatible with Microsoft Internet Explorer 5.

HRESULT SetIE5PasteMode(bool bNewValue) const;

Parameters

bNewValue
If TRUE, all paste operations are compatible with Internet Explorer 5; if FALSE, paste operations are compatible with Internet Explorer 5.5.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_IE50_PASTE_MODE command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetLiveResize

Causes the WebBrowser to update an element's appearance continuously during a resizing or moving operation, rather than updating only at the completion of the move or resize.

HRESULT SetLiveResize(bool bNewValue) const;

Parameters

bNewValue
If TRUE, causes the WebBrowser to update an element's appearance continuously during a resizing or moving operation; if FALSE, it updates only at the completion of the move or resize.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_LIVERESIZE command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetMultiSelect

Enables multiple selection.

HRESULT SetMultiSelect(bool bNewValue) const;

Parameters

bNewValue
If TRUE, allows for the selection of more than one site-selectable element at a time when the user holds down the SHIFT or CTRL keys.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_MULTIPLESELECTION command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetOverrideCursor

Commands the WebBrowser never to change the mouse pointer.

HRESULT SetOverrideCursor(bool bNewValue) const;

Parameters

bNewValue
If TRUE, the WebBrowser will not change the mouse pointer.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_OVERRIDE_CURSOR command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetOverwriteMode

Toggles the text-entry mode between insert and overwrite.

HRESULT SetOverwriteMode(bool bMode) const;

Parameters

bMode
If TRUE, text-entry mode is overwrite; if FALSE, text-entry mode is insert.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_OVERWRITE command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetRespectVisInDesign

Hides invisible elements in design mode.

HRESULT SetRespectVisInDesign(bool bNewValue) const;

Parameters

bNewValue
If TRUE, any elements that have a visibility set to "hidden" or display property set to "none" will not be shown in both design mode and browse mode; if FALSE, those elements will be displayed only in browse mode.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_RESPECTVISIBILITY_INDESIGN command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetShowAlignedSiteTags

Displays a glyph for all elements that have a styleFloat property.

HRESULT SetShowAlignedSiteTags(bool bNewValue) const;

Parameters

bNewValue
If TRUE, displays a glyph for all elements that have a styleFloat property.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SHOWALIGNEDSITETAGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetShowAllTags

Displays glyphs to show the location of all tags in a document.

HRESULT SetShowAllTags(bool bNewValue) const;

Parameters

bNewValue
If TRUE, displays glyphs to show the location of all tags in a document.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SHOWALLTAGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetShowAreaTags

Displays a glyph for all the area tags.

HRESULT SetShowAreaTags(bool bNewValue) const;

Parameters

bNewValue
If TRUE, displays a glyph for all the area tags.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SHOWAREATAGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetShowBRTags

Displays a glyph for all the br tags.

HRESULT SetShowBRTags(bool bNewValue) const;

Parameters

bNewValue
If TRUE, displays a glyph for all the br tags.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SHOWWBRTAGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetShowCommentTags

Displays a glyph for all the comment tags.

HRESULT SetShowCommentTags(bool bNewValue) const;

Parameters

bNewValue
If TRUE, displays a glyph for all the comment tags.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SHOWCOMMENTTAGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetShowMiscTags

Displays all the tags shown in Microsoft Internet Explorer 4.0.

HRESULT SetShowMiscTags(bool bNewValue) const;

Parameters

bNewValue
If TRUE, displays all the tags shown in Microsoft Internet Explorer 4.0.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SHOWMISCTAGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetShowScriptTags

Displays a glyph for all the script tags.

HRESULT SetShowScriptTags(bool bNewValue) const;

Parameters

bNewValue
If TRUE, displays a glyph for all the script tags.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SHOWSCRIPTTAGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetShowStyleTags

Displays a glyph for all the style tags.

HRESULT SetShowStyleTags(bool bNewValue) const;

Parameters

bNewValue
If TRUE, displays a glyph for all the style tags.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SHOWSTYLETAGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::SetShowUnknownTags

Displays a glyph for all the unknown tags.

HRESULT SetShowUnknownTags(bool bNewValue) const;

Parameters

bNewValue
If TRUE, displays a glyph for all the unknown tags.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_SHOWUNKNOWNTAGS command ID to the WebBrowser control.

CHtmlEditCtrlBase::TextArea

Overwrites a multiline text input control on the current selection.

HRESULT TextArea(LPCTSTR szId = NULL) const;

Parameters

szId
The ID of the multiline text input control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_TEXTAREA command ID to the WebBrowser control.

CHtmlEditCtrlBase::TextBox

Overwrites a text control on the current selection.

HRESULT TextBox(LPCTSTR szId = NULL) const;

Parameters

szId
The ID of the text control.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_TEXTBOX command ID to the WebBrowser control.

CHtmlEditCtrlBase::UnBookmark

Removes any bookmark from the current selection.

HRESULT UnBookmark() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_UNBOOKMARK command ID to the WebBrowser control.

CHtmlEditCtrlBase::Underline

Toggles the current selection between underlined and not underlined.

HRESULT Underline() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_UNDERLINE command ID to the WebBrowser control.

Removes any hyperlink from the current selection.

HRESULT Unlink() const;

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_UNLINK command ID to the WebBrowser control.

CHtmlEditCtrlBase::UnorderList

Toggles the current selection between an ordered list and a normal format block.

HRESULT UnorderList(LPCTSTR szId = NULL) const;

Parameters

szId
The ID of the unordered list.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This method sends the IDM_UNORDERLIST command ID to the WebBrowser control.

See also

Hierarchy Chart
HTMLEdit Sample