Returns a Boolean value that indicates the current state of the command.
HRESULT queryCommandState( BSTR cmdID, VARIANT_BOOL *pfRet );
- [in] BSTR that specifies a command identifier.
- [out, retval] Pointer to a VARIANT_BOOL that returns one of the following possible values:
- The given command has been executed on the object.
- The given command has not been executed on the object.
Returns S_OK if successful, or an error value otherwise.
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 IHTMLDocument2 interface using IID_IHTMLDocument2 for the IID.