Home COM GDI+ WebBrowser Data Access 

MSHTML Editing Reference

 

 

This section contains reference information for MSHTML Editing.

Documentation: MSHTML Editing Reference

 

Activating the MSHTML Editor from C++

 

There are three ways to switch MSHTML into editing mode in C++.

Using IHTMLDocument2::put_designMode

 

IHTMLDocument2 has an IHTMLDocument2::designMode property that takes a BSTR argument. The IHTMLDocument2::designMode property can be switched on and off like this:

 

// Assume pDoc is a valid IHTMLDocument2 interface pointer
pDoc->put_designMode(L"On"); // switches MSHTML Editor on
pDoc->put_designMode(L"Off"); // switches MSHTML Editor off
 

The IHTMLDocument2::designMode property is stored with an initial capital letter. It also has an initial value of "Inherit" when the WebBrowser is first activated. Remember this if you test the IHTMLDocument2::designMode property's value. For instance, the following code switches the MSHTML Editor on and off based on the current IHTMLDocument2::designMode value. Note: even if you don't use an initial capital letter in the argument for the put_designMode calls, the method still works correctly.

 

USES_CONVERSION; // Needed for the OLE2A conversion macro
BSTR bstrMode;

pDoc->get_designMode(&bstrMode);
char* cMode = OLE2A(bstrMode);

// The "O" in "On" must be capitalized
if (strcmp(cMode, "On")) // strcmp returns 0 when
                         // the strings are the same
    pDoc->put_designMode(L"On");
else
    pDoc->put_designMode(L"Off");
 

Using IHTMLElement3::put_contentEditable

 

The MSHTML Editor can also be activated on a per-element basis using the IHTMLElement3::contentEditable property.

 

// Assume pElement is a valid pointer to an IHTMLElement3 interface
pElement->put_contentEditable(L"true");
 

Notice that the IHTMLElement3::contentEditable property is set with a BSTR rather than a Boolean value. This is because it has a possible value of "inherit," besides the usual "true" and "false" values.

 

Before you can make an element editable, you must locate it in the document. Here is how you might locate an element whose id is "editableblock."

 

// Assume m_spDoc is a valid pointer to the IHTMLDocument2 interface
IHTMLElementCollection* pEColl;
IDispatch* pDisp;
IHTMLElement3* pElem;
VARIANT id, index;

V_VT(&id) = VT_BSTR;
V_BSTR(&id) = L"editableblock";
V_VT(&index) = VT_I4;
V_I4(&index) = 0;

m_spDoc->get_all(&pEColl);
pEColl->item(id, index, &pDisp);
pDisp->QueryInterface(IID_IHTMLElement3, (void**)&pElem);
pElem->put_contentEditable(L"true");

// Release interfaces when done
pEColl->Release();
pDisp->Release();
pElem->Release();
 

When IHTMLElement3::contentEditable is set to "true" on an element, the IHTMLDocument2::designMode property of the document will not affect it. That is, the element content will remain editable even when the instruction pDoc->put_designMode(L"Off") is executed. Any of the editing commands issued on the document as a whole through IOleCommandTarget::Exec will apply to the editable elements in a document. Implementations of IHTMLEditHost and IHTMLEditDesigner will also apply.

 

Calling IHTMLElement3::contentEditable on the body element is the same thing as calling IHTMLDocument2::designMode on the document.

 

The IHTMLElementDefaults interface also has a IHTMLElementDefaults::contentEditable property.

 

Using DISPID_AMBIENT_USERMODE

 

The final way to activate the MSHTML Editor uses an ambient property through an IDispatch interface implemented by an application hosting the WebBrowser. To switch between browsing and editing this way, you need to implement IDispatch so that it handles the DISPID_AMBIENT_USERMODE message passed into IDispatch::Invoke:

 

HRESULT
CAtlBrCon::Invoke(DISPID dispidMember,
                  REFIID riid,
                  LCID lcid, WORD wFlags,
                  DISPPARAMS* pDispParams,
                  VARIANT* pvarResult,
                  EXCEPINFO*  pExcepInfo,
                  UINT* puArgErr)
{
    switch (dispidMember)
    {
        case DISPID_AMBIENT_USERMODE:

            V_VT(pvarResult) = VT_BOOL;
            V_BOOL(pvarResult) = m_bBrowseMode ?
                            VARIANT_TRUE : VARIANT_FALSE;

            break;
            .
            .
            .
 

Here, IDispatch::Invoke sets the out-parameter pvarResult that is returned to MSHTML based on the value of the variable m_bBrowseMode. Passing VARIANT_TRUE back to MSHTML in the pvarResult parameter switches the browser into browse mode. Passing VARIANT_FALSE switches it into editing mode.

 

Once your IDispatch interface is implemented, you must trigger MSHTML to call your IDispatch::Invoke implementation. To do this, use the IOleControl::OnAmbientPropertyChange method of an IOleControl interface obtained from the IWebBrowser2 control.

 

IOleControl* pControl;

hr = m_spWebBrowser->QueryInterface(IID_IOleControl,
                                    (void**)&pControl);

pControl->OnAmbientPropertyChange(DISPID_AMBIENT_USERMODE);

pControl->Release();
 

In this example, the call to IOleControl::OnAmbientPropertyChange causes MSHTML to call the IDispatch::Invoke method passing DISPID_AMBIENT_USERMODE for the DISPID.

 

Activating the MSHTML Editor from Visual Basic

 

In Visual Basic, you can use the MSHTML Editor on the document as a whole through the designMode property. You can make an individual element editable by using the element's contentEditable property. To use the designMode property, obtain the document object from either the WebBrowser object or the InternetExplorer object and change its designMode property.

 

Set doc = WebBrowser1.Document

If doc.DesignMode = "On" Then
    doc.DesignMode = "Off"
Else
    doc.DesignMode = "On"
End If
 

As with C++, the designMode property is stored with an initial capital letter. Keep this in mind if you test its value.

 

For editing on a per element basis, identify the element you want to make editable and set its contentEditable property to True:

 

Set doc = WebBrowser1.Document
Set allColl = doc.All
Set elem = allColl.Item("editableblock")
elem.contentEditable = True
 

The contentEditable property can be set with either a Boolean value or a string.

 

Setting the contentEditable property to True on the body element is the same thing as setting the designMode property to "On."

 

 

Interfaces

 

IDisplayPointer
IDisplayServices
IElementSegment
IHighlightRenderingServices
IHighlightSegment
IHTMLCaret
IHTMLChangeLog
IHTMLChangePlayback
IHTMLChangeSink
IHtmlDlgSafeHelper
IHTMLEditDesigner
IHTMLEditHost
IHTMLEditHost2
IHTMLEditServices
IHTMLEditServices2
IHTMLPainter
IHTMLPainterEventInfo
 

 

IHTMLPainterOverlay

IHTMLPaintSite
IIMEServices
ILineInfo
IMarkupContainer
IMarkupContainer2
IMarkupPointer
IMarkupPointer2
IMarkupServices
IMarkupServices2
IMarkupTextFrags
ISegment
ISegmentList
ISegmentListIterator
ISelectionServices
ISelectionServicesListener
 

 

Structures

 

HTML_PAINT_DRAW_INFO

 

TYPE HTML_PAINT_DRAW_INFO

   rcViewport AS RECT

   hrgnUpdate AS DWORD

   xform AS HTML_PAINT_XFORM

END TYPE
 

 

HTML_PAINT_XFORM

 

TYPE HTML_PAINT_XFORM

   eM11 AS SINGLE

   eM12 AS SINGLE

   eM21 AS SINGLE

   eM22 AS SINGLE

   eDx AS SINGLE

   eDy AS SINGLE

END TYPE
 

 

HTML_PAINTER_INFO

 

TYPE HTML_PAINTER_INFO

   lFlags AS LONG

   lZOrder AS LONG

   iiDrawObject AS GUID

   rcExpand AS RECT

END TYPE
 

 

Enumerations

 

CARET_DIRECTION

 

%CARET_DIRECTION_INDETERMINATE = 0
%CARET_DIRECTION_SAME = 1
%CARET_DIRECTION_BACKWARD = 2
%CARET_DIRECTION_FORWARD = 3
%CARET_DIRECTION_Max = 2147483647&

 

 

COORD_SYSTEM

 

%COORD_SYSTEM_GLOBAL = 0
%COORD_SYSTEM_PARENT = 1
%COORD_SYSTEM_CONTAINER = 2
%COORD_SYSTEM_CONTENT = 3
%COORD_SYSTEM_FRAME = 4
%COORD_SYSTEM_Max = 2147483647&

 

 

DISPLAY_BREAK

 

%DISPLAY_BREAK_None = 0
%DISPLAY_BREAK_Block = &H1
%DISPLAY_BREAK_Break = &H2
%DISPLAY_BREAK_Max = 2147483647&
 

 

DISPLAY_GRAVITY

 

%DISPLAY_GRAVITY_PreviousLine = 1
%DISPLAY_GRAVITY_NextLine = 2
%DISPLAY_GRAVITY_Max = 2147483647&

 

 

DISPLAY_MOVEUNIT

 

%DISPLAY_MOVEUNIT_PreviousLine = 1
%DISPLAY_MOVEUNIT_NextLine = 2
%DISPLAY_MOVEUNIT_CurrentLineStart = 3
%DISPLAY_MOVEUNIT_CurrentLineEnd = 4
%DISPLAY_MOVEUNIT_TopOfWindow = 5
%DISPLAY_MOVEUNIT_BottomOfWindow = 6
%DISPLAY_MOVEUNIT_Max = 2147483647&

 

 

ELEMENT_ADJACENCY

 

%ELEM_ADJ_BeforeBegin = 0
%ELEM_ADJ_AfterBegin = 1
%ELEM_ADJ_BeforeEnd = 2
%ELEM_ADJ_AfterEnd = 3
%ELEMENT_ADJACENCY_Max = 2147483647&

 

 

ELEMENT_CORNER

 

%ELEMENT_CORNER_NONE = 0
%ELEMENT_CORNER_TOP = 1
%ELEMENT_CORNER_LEFT = 2
%ELEMENT_CORNER_BOTTOM = 3
%ELEMENT_CORNER_RIGHT = 4
%ELEMENT_CORNER_TOPLEFT = 5
%ELEMENT_CORNER_TOPRIGHT = 6
%ELEMENT_CORNER_BOTTOMLEFT = 7
%ELEMENT_CORNER_BOTTOMRIGHT = 8
%ELEMENT_CORNER_Max = 2147483647&

 

 

ELEMENT_TAG_ID

 

%TAGID_NULL = 0
%TAGID_UNKNOWN = 1
%TAGID_A = 2
%TAGID_ACRONYM = 3
%TAGID_ADDRESS = 4
%TAGID_APPLET = 5
%TAGID_AREA = 6
%TAGID_B = 7
%TAGID_BASE = 8
%TAGID_BASEFONT = 9
%TAGID_BDO = 10
%TAGID_BGSOUND = 11
%TAGID_BIG = 12
%TAGID_BLINK = 13
%TAGID_BLOCKQUOTE = 14
%TAGID_BODY = 15
%TAGID_BR = 16
%TAGID_BUTTON = 17
%TAGID_CAPTION = 18
%TAGID_CENTER = 19
%TAGID_CITE = 20
%TAGID_CODE = 21
%TAGID_COL = 22
%TAGID_COLGROUP = 23
%TAGID_COMMENT = 24
%TAGID_COMMENT_RAW = 25
%TAGID_DD = 26
%TAGID_DEL = 27
%TAGID_DFN = 28
%TAGID_DIR = 29
%TAGID_DIV = 30
%TAGID_DL = 31
%TAGID_DT = 32
%TAGID_EM = 33
%TAGID_EMBED = 34
%TAGID_FIELDSET = 35
%TAGID_FONT = 36
%TAGID_FORM = 37
%TAGID_FRAME = 38
%TAGID_FRAMESET = 39
%TAGID_GENERIC = 40
%TAGID_H1 = 41
%TAGID_H2 = 42
%TAGID_H3 = 43
%TAGID_H4 = 44
%TAGID_H5 = 45
%TAGID_H6 = 46
%TAGID_HEAD = 47
%TAGID_HR = 48
%TAGID_HTML = 49
%TAGID_I = 50
%TAGID_IFRAME = 51
%TAGID_IMG = 52
%TAGID_INPUT = 53
%TAGID_INS = 54
%TAGID_KBD = 55
%TAGID_LABEL = 56
%TAGID_LEGEND = 57
%TAGID_LI = 58
%TAGID_LINK = 59
%TAGID_LISTING = 60
%TAGID_MAP = 61
%TAGID_MARQUEE = 62
%TAGID_MENU = 63
%TAGID_META = 64
%TAGID_NEXTID = 65
%TAGID_NOBR = 66
%TAGID_NOEMBED = 67
%TAGID_NOFRAMES = 68
%TAGID_NOSCRIPT = 69
%TAGID_OBJECT = 70
%TAGID_OL = 71
%TAGID_OPTION = 72
%TAGID_P = 73
%TAGID_PARAM = 74
%TAGID_PLAINTEXT = 75
%TAGID_PRE = 76
%TAGID_Q = 77
%TAGID_RP = 78
%TAGID_RT = 79
%TAGID_RUBY = 80
%TAGID_S = 81
%TAGID_SAMP = 82
%TAGID_SCRIPT = 83
%TAGID_SELECT = 84
%TAGID_SMALL = 85
%TAGID_SPAN = 86
%TAGID_STRIKE = 87
%TAGID_STRONG = 88
%TAGID_STYLE = 89
%TAGID_SUB = 90
%TAGID_SUP = 91
%TAGID_TABLE = 92
%TAGID_TBODY = 93
%TAGID_TC = 94
%TAGID_TD = 95
%TAGID_TEXTAREA = 96
%TAGID_TFOOT = 97
%TAGID_TH = 98
%TAGID_THEAD = 99
%TAGID_TITLE = 100
%TAGID_TR = 101
%TAGID_TT = 102
%TAGID_U = 103
%TAGID_UL = 104
%TAGID_VAR = 105
%TAGID_WBR = 106
%TAGID_XMP = 107
%TAGID_ROOT = 108
%TAGID_OPTGROUP = 109
%TAGID_COUNT = 110
%TAGID_LAST_PREDEFINED = 10000
%ELEMENT_TAG_ID_Max = 2147483647&

 

 

HT_OPTIONS

 

%HT_OPT_AllowAfterEOL = &H1
%HT_OPTIONS_Max = 2147483647&

 

 

HT_RESULTS

 

%HT_RESULTS_Glyph = &H1
%HT_RESULTS_Max = 2147483647&

 

 

HTML_PAINT_DRAW_FLAGS

 

%HTMLPAINT_DRAW_UPDATEREGION = &H1
%HTMLPAINT_DRAW_USE_XFORM = &H2
%HTML_PAINT_DRAW_FLAGS_Max = 2147483647&

 

 

HTML_PAINT_DRAW_INFO_FLAGS

 

%HTMLPAINT_DRAWINFO_VIEWPORT = &H1
%HTMLPAINT_DRAWINFO_UPDATEREGION = &H2
%HTMLPAINT_DRAWINFO_XFORM = &H4
%HTML_PAINT_DRAW_INFO_FLAGS_Max = 2147483647&

 

 

HTML_PAINT_EVENT_FLAGS

 

%HTMLPAINT_EVENT_TARGET = &H1
%HTMLPAINT_EVENT_SETCURSOR = &H2
%HTML_PAINT_EVENT_FLAGS_Max = 2147483647&

 

 

HTML_PAINT_ZORDER

 

%HTMLPAINT_ZORDER_NONE = 0
%HTMLPAINT_ZORDER_REPLACE_ALL = 1
%HTMLPAINT_ZORDER_REPLACE_CONTENT = 2
%HTMLPAINT_ZORDER_REPLACE_BACKGROUND = 3
%HTMLPAINT_ZORDER_BELOW_CONTENT = 4
%HTMLPAINT_ZORDER_BELOW_FLOW = 5
%HTMLPAINT_ZORDER_ABOVE_FLOW = 6
%HTMLPAINT_ZORDER_ABOVE_CONTENT = 7
%HTMLPAINT_ZORDER_WINDOW_TOP = 8
%HTML_PAINT_ZORDER_Max = 2147483647&

 

 

HTML_PAINTER

 

%HTMLPAINTER_OPAQUE = &H1
%HTMLPAINTER_TRANSPARENT = &H2
%HTMLPAINTER_ALPHA = &H4
%HTMLPAINTER_COMPLEX = &H8
%HTMLPAINTER_OVERLAY = &H10
%HTMLPAINTER_HITTEST = &H20
%HTMLPAINTER_SURFACE = &H100
%HTMLPAINTER_3DSURFACE = &H200
%HTMLPAINTER_NOBAND = &H400
%HTMLPAINTER_NODC = &H1000
%HTMLPAINTER_NOPHYSICALCLIP = &H2000
%HTMLPAINTER_NOSAVEDC = &H4000
%HTMLPAINTER_SUPPORTS_XFORM = &H8000
%HTMLPAINTER_EXPAND = &H10000
%HTMLPAINTER_NOSCROLLBITS = &H20000
%HTML_PAINTER_Max = 2147483647&

 

 

LINE_DIRECTION

 

%LINE_DIRECTION_RightToLeft = 1
%LINE_DIRECTION_LeftToRight = 2
%LINE_DIRECTION_Max = 2147483647&

 

 

MARKUP_CONTEXT_TYPE

 

%CONTEXT_TYPE_None = 0
%CONTEXT_TYPE_Text = 1
%CONTEXT_TYPE_EnterScope = 2
%CONTEXT_TYPE_ExitScope = 3
%CONTEXT_TYPE_NoScope = 4
%MARKUP_CONTEXT_TYPE_Max = 2147483647&

 

 

MOVEUNIT_ACTION

 

%MOVEUNIT_PREVCHAR = 0
%MOVEUNIT_NEXTCHAR = 1
%MOVEUNIT_PREVCLUSTERBEGIN = 2
%MOVEUNIT_NEXTCLUSTERBEGIN = 3
%MOVEUNIT_PREVCLUSTEREND = 4
%MOVEUNIT_NEXTCLUSTEREND = 5
%MOVEUNIT_PREVWORDBEGIN = 6
%MOVEUNIT_NEXTWORDBEGIN = 7
%MOVEUNIT_PREVWORDEND = 8
%MOVEUNIT_NEXTWORDEND = 9
%MOVEUNIT_PREVPROOFWORD = 10
%MOVEUNIT_NEXTPROOFWORD = 11
%MOVEUNIT_NEXTURLBEGIN = 12
%MOVEUNIT_PREVURLBEGIN = 13
%MOVEUNIT_NEXTURLEND = 14
%MOVEUNIT_PREVURLEND = 15
%MOVEUNIT_PREVSENTENCE = 16
%MOVEUNIT_NEXTSENTENCE = 17
%MOVEUNIT_PREVBLOCK = 18
%MOVEUNIT_NEXTBLOCK = 19
%MOVEUNIT_ACTION_Max = 2147483647&

 

 

POINTER_GRAVITY

 

%POINTER_GRAVITY_Left = 0
%POINTER_GRAVITY_Right = 1
%POINTER_GRAVITY_Max = 2147483647&

 

 

SAVE_SEGMENT_FLAGS

 

%SAVE_SEGMENTS_NoIE4SelectionCompat = 1
 

 

SELECTION_TYPE

 

%SELECTION_TYPE_None = 0
%SELECTION_TYPE_Caret = 1
%SELECTION_TYPE_Text = 2
%SELECTION_TYPE_Control = 3
%SELECTION_TYPE_Max = 2147483647&

 

 

 

Constants

 

CMID_SCRIPTSITE_HTMLDLGTRUST Command ID

 

Indicates whether an HTML dialog is trusted.

 

A trusted document is a document that is from a trusted source, and which may be granted additional permissions by a custom security manager.

 

If the document is not an HTML dialog, the function returns OLECMDERR_E_NOTSUPPORTED.

 

The globally unique identifier (GUID) for CGID_ScriptSite is 3050F3F-98B5-11CF-BB82-00AA00BDCE0B.

 

Command group: CGID_ScriptSite

Symbolic constant: CMDID_SCRIPTSITE_HTMLDLGTRUST

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn Set to NULL

pvaOut Receives a VARIANT of type VT_BOOL indicating whether this HTML dialog is trusted.

Minimum availability: Internet Explorer 6.0 and later.

 

 

CMID_SCRIPTSITE_NAMESPACE Command ID

 

Not currently implemented.

 

 

CMID_SCRIPTSITE_SECSTATE Command ID

 

Indicates whether the Web site is secure and the length of the encryption key.

 

The globally unique identifier (GUID) for CGID_ScriptSite is 3050F3F-98B5-11CF-BB82-00AA00BDCE0B.

 

Command group: CGID_ScriptSite

Symbolic constant: CMDID_SCRIPTSITE_SECSTATE

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn Set to NULL

pvaOut Receives a VARIANT of type VT_I4 that indicates whether the Web site is secure and the length of the encryption key.

Minimum availability: Internet Explorer 6.0 and later.

 

 

CMID_SCRIPTSITE_SECURITY_WINDOW Command ID

 

Provides access to the window object for the current document.

 

The globally unique identifier (GUID) for CGID_ScriptSite is 3050F3F-98B5-11CF-BB82-00AA00BDCE0B.

 

Command group: CGID_ScriptSite

Symbolic constant: CMDID_SCRIPTSITE_SECURITY_WINDOW

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Receives a IHTMLWindow2 for the current document.

Minimum availability: Internet Explorer 6.0 and later.

 

 

CMID_SCRIPTSITE_SID Command ID

 

Retrieves the security identifier (ID) of the current document.

 

If successful, pvaOut contains the scheme, domain, and zone information in the following format.

 

<scheme>:<domain>+<zone>

 

The globally unique identifier (GUID) for CGID_ScriptSite is 3050F3F-98B5-11CF-BB82-00AA00BDCE0B.

 

Command group: CGID_ScriptSite

Symbolic constant: CMDID_SCRIPTSITE_SID

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn Set to NULL

pvaOut Receives the security ID of the current document.

Minimum availability: Internet Explorer 6.0 and later.

 

 

CMID_SCRIPTSITE_TRUSTEDDOC Command ID

 

Indicates whether a document is trusted.

 

A trusted document is a document that is from a trusted source, and which may be granted additional permissions by a custom security manager.

 

The globally unique identifier (GUID) for CGID_ScriptSite is 3050F3F-98B5-11CF-BB82-00AA00BDCE0B.

 

Command group: CGID_ScriptSite

Symbolic constant: CMDID_SCRIPTSITE_TRUSTEDDOC

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn Set to NULL

pvaOut Receives a VARIANT of type VT_BOOL indicating whether this document is trusted.

Minimum availability: Internet Explorer 6.0 and later.

 

 

CMID_SCRIPTSITE_URL Command ID

 

Retrieves the full URL of the current document.

 

The globally unique identifier (GUID) for CGID_ScriptSite is 3050F3F-98B5-11CF-BB82-00AA00BDCE0B.

 

Command group: CGID_ScriptSite

Symbolic constant: CMDID_SCRIPTSITE_URL

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn Set to NULL

pvaOut Receives the full URL of the current document.

Minimum availability: Internet Explorer 6.0 and later.

 

 

IDM_1D_ELEMENT Command ID

 

Determines if an element is statically positioned.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_1D_ELEMENT

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn Set to NULL

pvaOut VARIANT of type VT_BOOL indicating whether the element is statically positioned.

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_2D_ELEMENT Command ID

 

Determines if an element is absolutely positioned.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_2D_ELEMENT

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn Set to NULL

pvaOut VARIANT of type VT_BOOL indicating whether the element is absolutely positioned.

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_2D_POSITION Command ID

 

Allows absolutely positioned elements to be moved by dragging.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_2D_POSITION

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_ABSOLUTE_POSITION Command ID

 

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

 

This command only applies to site selectable elements. In addition, IDM_ABSOLUTE_POSITION only affects inline styles. If the page defines absolute positioning for the element in a style block, IDM_ABSOLUTE_POSITION will not be able to affect the element's positioning property.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_ABSOLUTE_POSITION

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether the element is to be absolutely positioned.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_ADDTOGLYPHTABLE Command ID

 

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

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_ADDTOGLYPHTABLE

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BSTR specifying a glyph table entry string to add an entry or entries to the glyph table.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_ATOMICSELECTION Command ID

 

When this command is issued in design mode, any element that has an ATOMICSELECTION attribute set to TRUE will be selectable only as a unit.

 

Usually, elements with an ATOMICSELECTION attribute are selected as a unit in browse mode only. In design mode, the MSHTML Editor's default behavior allows you to locate the insertion point in the text of any element, including elements with an ATOMICSELECTION attribute. This command allows you to override the default Editor behavior.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_ATOMICSELECTION

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_AUTOURLDETECT_MODE Command ID

 

Turns automatic URL detection on and off.

 

By default, automatic URL detection is on when the MSHTML Editor is activated. The editor will automatically create a hyperlink for any text that is formatted as a URL.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_AUTOURLDETECT_MODE

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether automatic URL detection is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_CSSEDITING_LEVEL Command ID

 

Allows you to choose which CSS level (CSS1 or CSS2) the editor will support, if any.

 

If you do not wish CSS support, set pvaIn to zero. Without CSS support, elements can't be resized or moved.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_CSSEDITING_LEVEL

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_I4 value specifying the Cascading Style Sheets (CSS) Level to support.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_DISABLE_EDITFOCUS_UI Command ID

 

Turns off 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.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_DISABLE_EDITFOCUS_UI

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_EMPTYGLYPHTABLE Command ID

 

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

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_EMPTYGLYPHTABLE

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn Set to NULL

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_IE50_PASTE Command ID

 

Performs a paste operation compatible with Microsoft Internet Explorer 5.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_IE50_PASTE

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BSTR specifying the string to paste.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_IE50_PASTE_MODE Command ID

 

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

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_IE50_PASTE_MODE

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether paste operations are to be compatible with Internet Explorer 5. If TRUE, all paste operations are Internet Explorer 5 compatible. If FALSE, all paste operations are Internet Explorer 5.5 compatible.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_KEEPSELECTION Command ID

 

Maintains a selection in a browser instance when the browser loses focus.

 

This command is useful for applications that require multiple browser instances to interact with each other. One example is an e-mail application that allows users to select from a list of e-mails in one browser instance and to see the actual e-mail in a second instance.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_KEEPSELECTION

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether the selection remains selected when the browser instance loses focus.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_LIVERESIZE Command ID

 

Causes the MSHTML Editor 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.

 

When this feature is off, an element's new position or size is indicated by a dashed rectangle until the mouse button is released.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_LIVERESIZE

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_MULTIPLESELECTION Command ID

 

Allows for the selection of more than one site selectable element at a time when the user holds down the SHIFT or CTRL keys.

 

If multiple items are selected when the multiple selection feature is turned off, the items will remain selected.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_MULTIPLESELECTION

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_OVERRIDE_CURSOR Command ID

 

Commands the MSHTML Editor never to change the mouse pointer. The mouse pointer will remain fixed as the last icon before the IDM_OVERRIDE_CURSOR command was issued.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_OVERRIDE_CURSOR

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_REPLACEGLYPHCONTENTS Command ID

 

Replaces the current glyph table with a new one, changing which tags have images or which images are displayed for tags in design mode.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_REPLACEGLYPHCONTENTS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BSTR specifying a glyph table entry string to replace the current glyph table.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_RESPECTVISIBILITY_INDESIGN Command ID

 

When this feature is activated, any element that has a visibility set to "hidden" or display property set to "none" will not be shown in both design mode and browse mode.

 

Typically, the MSHTML Editor will display all content in a document, including content which would be hidden in browse mode due to the visibility or display property. This command allows you to override the Editor's default behavior.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_RESPECTVISIBILITY_INDESIGN

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_SHOWALIGNEDSITETAGS Command ID

 

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

 

This command does not work with custom editing glyphs.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWALIGNEDSITETAGS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_SHOWALLTAGS Command ID

 

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

 

This command does not work with custom editing glyphs.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWALLTAGS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_SHOWAREATAGS Command ID

 

Displays a glyph for all the area tags.

 

This command does not work with custom editing glyphs.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWAREALTAGS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_SHOWCOMMENTTAGS Command ID

 

Displays a glyph for all the comment tags.

 

This command does not work with custom editing glyphs.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWCOMMENTTAGS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 5.5 and later.

 

 

IDM_SHOWMISCTAGS Command ID

 

Displays all the tags shown in Microsoft Internet Explorer 4.0.

 

This command does not work with custom editing glyphs.

 

The tags shown are those displayed by IDM_SHOWALIGNEDSITETAGS, IDM_SHOWSCRIPTTAGS, IDM_SHOWSTYLETAGS, IDM_SHOWCOMMENTTAGS, IDM_SHOWAREATAGS, IDM_SHOWUNKNOWNTAGS, and IDM_SHOWWBRTAGS.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWMISCTAGS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 4.0 and later.

 

 

IDM_SHOWSCRIPTTAGS Command ID

 

Displays a glyph for all the script tags.

 

This command does not work with custom editing glyphs.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWSCRIPTTAGS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 4.0 and later.

 

 

IDM_SHOWSTYLETAGS Command ID

 

Displays a glyph for all the style tags.

 

This command does not work with custom editing glyphs.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWSTYLETAGS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 4.0 and later.

 

 

IDM_SHOWUNKNOWNTAGS Command ID

 

Displays a glyph for all the unknown tags.

 

This command does not work with custom editing glyphs.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWUNKNOWNTAGS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 4.0 and later.

 

 

IDM_SHOWWBRTAGS Command ID

 

Displays a glyph for all the br tags.

 

This command does not work with custom editing glyphs.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWWBRTAGS

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 4.0 and later.

 

 

IDM_SHOWZEROBORDERATDESIGNTIME Command ID

 

Draws a thin gray border in design mode around block elements that have no borders to show where their boundaries are.

 

This command does not work with custom editing glyphs.

 

The globally unique identifier (GUID) for CGID_MSHTML is DE4BA900-59CA-11CF-9592-444553540000.

 

Command group: CGID_MSHTML

Symbolic constant: IDM_SHOWZEROBORDERATDESIGNTIME

User interface: None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER.

IOleCommandTarget::Exec parameters:

pvaIn VARIANT of type VT_BOOL specifying whether this feature is to be on or off.

pvaOut Set to NULL

Minimum availability: Internet Explorer 4.0 and later.

 

 

Page last updated on Saturday, 07 January 2006 18:21:08 +0100