다음을 통해 공유


IOleInPlaceComponentUIManager.SetActiveUI Method

Definition

Allows a UI active VSPackage object to change the menus, toolbars, or commands that are displayed on its behalf by the environment.

public:
 int SetActiveUI(System::UInt32 dwCompRole, Guid % rclsid, System::UInt32 cCmdGrpId, cli::array <int> ^ rgnCmdGrpId);
public int SetActiveUI (uint dwCompRole, ref Guid rclsid, uint cCmdGrpId, int[] rgnCmdGrpId);
abstract member SetActiveUI : uint32 * Guid * uint32 * int[] -> int
Public Function SetActiveUI (dwCompRole As UInteger, ByRef rclsid As Guid, cCmdGrpId As UInteger, rgnCmdGrpId As Integer()) As Integer

Parameters

dwCompRole
UInt32

[in] Role of the in-place object requesting the user interface change. For a list of valid dwCompRole values, see OLEROLE.

rclsid
Guid

[in] Class identifier (CLSID) of the in-place object requesting the change.

cCmdGrpId
UInt32

[in] Count of the toolbars identified by rgnCmdGrpId.

rgnCmdGrpId
Int32[]

[in] Array of identifiers of toolbars to be displayed in the update.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From oleipc.idl:

HRESULT IOleInPlaceComponentUIManager::SetActiveUI(  
   [in] DWORD dwCompRole,  
   [in] REFCLSID rclsid,  
   [in] ULONG cCmdGrpId,  
   [in] LONG *rgnCmdGrpId  
);  

Applies to