导出 (0) 打印
全部展开
EN
此内容没有您的语言版本,但有英语版本。

Commands A-C (C++)

Command identifiers A-C for C++.

IDM_2D_POSITION

Allows absolutely positioned elements to be moved by dragging.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_2D_POSITION
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_ABSOLUTE_POSITION
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BACKCOLOR
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BACKGROUNDIMAGECACHE
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BEGINUNDOUNIT
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BLOCKDIRLTR

 

IDM_BLOCKDIRRTL

Not supported.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BLOCKDIRRTL

 

IDM_BLOCKFMT

Sets or retrieves the current block format tag.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BLOCKFMT
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BOLD
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BOOKMARK
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BROWSEMODE

 

IDM_BUTTON

Overwrites a button control on the text selection.

Command groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_BUTTON
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_CHECKBOX
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_CLEARAUTHENTICATIONCACHE
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_CLEARSELECTION
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_CLEARUNDO
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_COPY
Header filemshtmcid.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 groupCGID_MSHTML (defined in mshtmhst.h)
Symbolic constantIDM_CUT
Header filemshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

nCmdExecOpt

Set to OLECMDEXECOPT_DONTPROMPTUSER.

pvaIn

Set to NULL.

pvaOut

Set to NULL.

 

 

显示:
© 2014 Microsoft