IOleInPlaceComponentSite.SetUIMode Method

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

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function SetUIMode ( _
    dwUIMode As UInteger _
) As Integer
int SetUIMode(
    uint dwUIMode
)
int SetUIMode(
    [InAttribute] unsigned int dwUIMode
)
abstract SetUIMode : 
        dwUIMode:uint32 -> int 
function SetUIMode(
    dwUIMode : uint
) : int

Parameters

  • dwUIMode
    Type: System.UInt32
    [in] Identifier for the UI mode of the in-place object.

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IOleInPlaceComponentSite Interface

Microsoft.VisualStudio.Shell.Interop Namespace