IOleInPlaceComponentSite.SetUIMode(UInt32) Method

Definition

Changes the UI mode of an in-place VSPackage object. This method is currently not supported.

public:
 int SetUIMode(System::UInt32 dwUIMode);
public:
 int SetUIMode(unsigned int dwUIMode);
int SetUIMode(unsigned int dwUIMode);
public int SetUIMode (uint dwUIMode);
abstract member SetUIMode : uint32 -> int
Public Function SetUIMode (dwUIMode As UInteger) As Integer

Parameters

dwUIMode
UInt32

[in] Identifier for the UI mode of the in-place object.

Returns

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

Remarks

COM Signature

From oleipc.idl:

HRESULT IOleInPlaceComponentSite::SetUIMode(  
   [in] DWORD dwUIMode  
);  

Because this method is currently not supported, the environment handles the changing of an object's UI mode by having the object retrieve the IVsWindowFrame pointer of its container through the SVsWindowFrame service and then calling SetProperty and setting the propid parameter to VSFPROPID_CmdUIGuid.

When supported, in-place objects must call SetUIMode before calling UIActivateForMe. Objects are able to make this call for the first time in their implementation of UseComponentUIManager.

The interpretation of the dwUIMode parameter will be VSPackage-specific. The environment typically has compile-time knowledge of the modes of its in-place objects and can map the modes to particular sets of menus and toolbars. The environment can arrange to have different toolbars for the various UI modes of the in-place object. As part of building and owning the toolbars, the environment has complete knowledge of which commands are on each toolbar and knowledge of which command groups include these commands. The knowledge of which command groups are represented on a particular toolbar is necessary to manage the UI requests negotiated through the SOleComponentUIManager service.

Applies to