Compartilhar via


Commands A-C (C++)

Command identifiers A-C for C++.

  • IDM_2D_POSITION
  • IDM_ABSOLUTE_POSITION
  • IDM_BACKCOLOR
  • IDM_BACKGROUNDIMAGECACHE
  • IDM_BEGINUNDOUNIT
  • IDM_BLOCKDIRLTR
  • IDM_BLOCKDIRRTL
  • IDM_BLOCKFMT
  • IDM_BOLD
  • IDM_BOOKMARK
  • IDM_BROWSEMODE
  • IDM_BUTTON
  • IDM_CHECKBOX
  • IDM_CLEARAUTHENTICATIONCACHE
  • IDM_CLEARSELECTION
  • IDM_CLEARUNDO
  • IDM_COPY
  • IDM_CUT

IDM_2D_POSITION

Allows absolutely positioned elements to be moved by dragging.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_2D_POSITION
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

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

  • pvaOut
    Set to NULL.

IDM_ABSOLUTE_POSITION

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

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_ABSOLUTE_POSITION
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

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

  • pvaOut
    Set to NULL.

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.

IDM_BACKCOLOR

Sets or retrieves the background color of the current selection.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BACKCOLOR
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    VARIANT of type VT_BSTR that specifies a color name or a six-digit hexadecimal RGB value, with or without a leading hash mark, as defined in the Color Table.VARIANT of type VT_BSTR or VT_I4 that specifies the new color. If pvaIn is a VT_BSTR, the value can be a color name or a string representing a six-digit hexadecimal RGB color value, with or without a leading hash mark, as defined in the Color Table. If pvaIn is a VT_I4, the value will be in interpreted as a COLORREF. pvaIn may be set to NULL.

  • pvaOut
    VARIANT of type VT_I4 that receives a COLORREF value. If the current selection uses more than one back color, pvaOut will return a VARIANT of type VT_NULL. Set pvaIn to NULL to retrieve information to pvaOut.

The HTML generated by this command may vary depending on the version of Windows Internet Explorer.

IDM_BACKGROUNDIMAGECACHE

Caches background image(s).

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BACKGROUNDIMAGECACHE
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

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

  • pvaOut
    Set to TRUE.

document.execCommand("BackgroundImageCache", false, true);

IDM_BEGINUNDOUNIT

Starts an undo unit. Any DOM changes between IDM_BEGINUNDOUNIT and IDM_ENDUNDOUNIT (including any changes from script) are collected into an undo unit and undone and redone as if they were a single command.

If an undo unit is started through IDM_BEGINUNDOUNIT and any of the following conditions is met, the current undo unit will be ended automatically:

  • When the user does something that would be an undo-able action, such as typing some text.
  • When the current script completes execution and returns to the event loop.
  • When an undo or redo occurs, either when initiated by the user or by IDM_UNDO/IDM_REDO.
  • When undo data is cleared by IDM_CLEARUNDO.

Undo units cannot be nested. If IDM_BEGINUNDOUNIT and IDM_ENDUNDOUNIT called within a another pair of commands, only a single unit will be created to span all editing from the first IDM_BEGINUNDOUNIT to the last IDM_ENDUNDOUNIT.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BEGINUNDOUNIT
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_BLOCKDIRLTR

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BLOCKDIRLTR

 

IDM_BLOCKDIRRTL

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BLOCKDIRRTL

 

IDM_BLOCKFMT

Sets or retrieves the current block format tag.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BLOCKFMT
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    VARIANT of type VT_BSTR that specifies a valid block format tag. May be set to NULL.

  • pvaOut
    VARIANT of type VT_BSTR that receives a valid block format tag. May be set to NULL.

The available block formatting strings may change in subsequent releases of the MSHTML component. Call IOleCommandTarget::Exec with the IDM_GETBLOCKFMTS Command ID to obtain the current list of available block formatting commands that can be passed with the IDM_BLOCKFMT Command ID.

IDM_BOLD

Toggles the current selection between bold and nonbold.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BOLD
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_BOOKMARK

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

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BOOKMARK
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    VARIANT of type VT_BSTR that specifies a valid anchor name. Providing an empty string will cause the command to fail.

  • pvaOut
    VARIANT of type VT_BSTR that receives the anchor name of the bookmark. Set pvaIn to NULL to retrieve information to pvaOut.

The HTML generated by this command may vary depending on the version of Internet Explorer.

IDM_BROWSEMODE

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BROWSEMODE

 

IDM_BUTTON

Overwrites a button control on the text selection.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_BUTTON
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    VARIANT of type VT_BSTR that specifies an id attribute for the button control.

  • pvaOut
    Set to NULL.

IDM_CHECKBOX

Overwrites a check box control on the text selection.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_CHECKBOX
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    VARIANT of type VT_BSTR that specifies an id attribute for the check box control. May be set to NULL or omitted.

  • pvaOut
    Set to NULL.

IDM_CLEARAUTHENTICATIONCACHE

Clears all authentication credentials from the cache. Applies only to execCommand.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_CLEARAUTHENTICATIONCACHE
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_CLEARSELECTION

Clears the current selection.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_CLEARSELECTION
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_CLEARUNDO

Clears the undo history.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_CLEARUNDO
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_COPY

Copies the current selection to the clipboard.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_COPY
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_CUT

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

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_CUT
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.