IHTMLControlRange::queryCommandText Method

Retrieves the string associated with a command.

Syntax


HRESULT queryCommandText(
    BSTR cmdID,
    BSTR *pcmdText
);

Parameters

cmdID
[in] BSTR that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers.
pcmdText
[out, retval] Pointer to a BSTR where the text associated with the command will be stored.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

This method is a wrapper function for the IOleCommandTarget::QueryStatus method to enable scriptable execution of some command constants. You can obtain an IOleCommandTarget interface by calling QueryInterface on the IHTMLControlRange interface using IID_IHTMLControlRange for the IID.

See Also

IHTMLControlRange::queryCommandValue

Community Additions

Show: