Udostępnij za pośrednictwem


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.

Requirements

Header: afxhtml.h

See Also

Reference

CHtmlEditCtrlBase Class

Other Resources

CHtmlEditCtrlBase Members