Compartilhar via


COleDocObjectItem::QueryCommand

Queries for the status of one or more commands generated by user interface events.

HRESULT QueryCommand( 
   ULONG nCmdID, 
   DWORD* pdwStatus, 
   OLECMDTEXT* pCmdText=NULL, 
   const GUID* pguidCmdGroup=NULL 
);

Parameters

  • nCmdID
    identifier of the command being queried for.

  • pdwStatus
    A pointer to the flags returned as a result of the query. For a list of possible values, see OLECMDF.

  • pCmdText
    Pointer to an OLECMDTEXT structure in which to return name and status information for a single command. Can be NULL to indicate that the caller does not need this information.

  • pguidCmdGroup
    Unique identifier of the command group; can be NULL to specify the standard group.

Return Value

For a complete listing of return values, see IOleCommandTarget::QueryStatus in the Windows SDK.

Remarks

This member function emulates the functionality of the IOleCommandTarget::QueryStatus method, as described in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleDocObjectItem Class

Hierarchy Chart