Compartilhar via


IOleComponentUIManager.OnUIEvent Method

Informs the SOleComponentUIManager service of a UI event.

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

Syntax

'Declaration
Sub OnUIEvent ( _
    dwCompRole As UInteger, _
    ByRef rclsidComp As Guid, _
    ByRef pguidUIEventGroup As Guid, _
    nUIEventId As UInteger, _
    dwUIEventStatus As UInteger, _
    dwEventFreq As UInteger, _
    prcEventRegion As RECT(), _
    ByRef pvarEventArg As Object _
)
void OnUIEvent(
    uint dwCompRole,
    ref Guid rclsidComp,
    ref Guid pguidUIEventGroup,
    uint nUIEventId,
    uint dwUIEventStatus,
    uint dwEventFreq,
    RECT[] prcEventRegion,
    ref Object pvarEventArg
)
void OnUIEvent(
    [InAttribute] unsigned int dwCompRole, 
    [InAttribute] Guid% rclsidComp, 
    [InAttribute] Guid% pguidUIEventGroup, 
    [InAttribute] unsigned int nUIEventId, 
    [InAttribute] unsigned int dwUIEventStatus, 
    [InAttribute] unsigned int dwEventFreq, 
    [InAttribute] array<RECT>^ prcEventRegion, 
    [InAttribute] Object^% pvarEventArg
)
abstract OnUIEvent : 
        dwCompRole:uint32 * 
        rclsidComp:Guid byref * 
        pguidUIEventGroup:Guid byref * 
        nUIEventId:uint32 * 
        dwUIEventStatus:uint32 * 
        dwEventFreq:uint32 * 
        prcEventRegion:RECT[] * 
        pvarEventArg:Object byref -> unit
function OnUIEvent(
    dwCompRole : uint, 
    rclsidComp : Guid, 
    pguidUIEventGroup : Guid, 
    nUIEventId : uint, 
    dwUIEventStatus : uint, 
    dwEventFreq : uint, 
    prcEventRegion : RECT[], 
    pvarEventArg : Object
)

Parameters

  • dwCompRole
    Type: UInt32

    [in] Role of the affected in-place VSPackage object. For valid dwCompRole values, see OLEROLE.

  • rclsidComp
    Type: Guid%

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

  • pguidUIEventGroup
    Type: Guid%

    [in] Uniquely identifies the UI events group of the in-place VSPackage object.

  • nUIEventId
    Type: UInt32

    [in] Identifies the event using a combination of the events group and event ID.

  • dwUIEventStatus
    Type: UInt32

    [in] Represents the status of the event. For valid dwUIEventStatus values, see OLEUIEVENTSTATUS.

  • dwEventFreq
    Type: UInt32

    [in] Indicates how often the event occurs. For valid dwEventFreq values, see OLEUIEVENTFREQ.

  • prcEventRegion
    Type: array<Microsoft.VisualStudio.OLE.Interop.RECT[]

    [in] Screen coordinates of the region that might be affected by the event. The environment uses this information to avoid the region.

  • pvarEventArg
    Type: Object%

    [in] Contains event-specific information if applicable. Typically, pvarEventArg will be nulla null reference (Nothing in Visual Basic).

Remarks

COM Signature

From oleipc.idl:

void IOleComponentUIManager::OnUIEvent(
   [in] DWORD dwCompRole,
   [in] REFCLSID rclsidComp,
   [in] const GUID *pguidUIEventGroup,
   [in] DWORD nUIEventId,
   [in] DWORD dwUIEventStatus,
   [in] DWORD dwEventFreq,
   [in] RECT *prcEventRegion,
   [in] VARIANT *pvarEventArg
);

The functionality provided by OnUIEvent is also available with the SVsStatusbar service. OnUIEvent can be used to control various fields in the environment's status bar. It is intended to insulate an in-place VSPackage object from interacting directly with any environment-specific UI peculiarities.

A call to OnUIEvent communicates an event's identifier, its status, its frequency, and the region affected. The following events are currently supported by OnUIEvent.

Events

 

uieventidSetTextLinePos

uieventidSetGraphicYPos

uieventidSetTextColPos

uieventidSetGraphicXSize

uieventidSetTextSelMode

uieventidSetGraphicYSize

uieventidSetTextCharPos

uieventidSetGraphicXPos

uieventidSetTextInsMode

uieventidAnimateIcon

.NET Framework Security

See Also

Reference

IOleComponentUIManager Interface

Microsoft.VisualStudio.Shell.Interop Namespace