IVsMenuEditor.GetItemRect Method

Called to obtain the bounding rectangle for a specific menu item (pmi != NULL) or the bounding rectangle for all currently displayed menu windows (pmi == NULL). fForScrolling = true if it is getting an item rectangle for the purposes of scrolling it into view. In this case, the Designer includes the items Popup rectangle and next item rectangle since these items may not yet be known by the Site, and thus there is no way to obtain their rectangles to make them visible.

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

Syntax

‘선언
Function GetItemRect ( _
    pIMI As IVsMenuItem, _
    <OutAttribute> prc As RECT(), _
    fForScrolling As Integer _
) As Integer
‘사용 방법
Dim instance As IVsMenuEditor
Dim pIMI As IVsMenuItem
Dim prc As RECT()
Dim fForScrolling As Integer
Dim returnValue As Integer

returnValue = instance.GetItemRect(pIMI, _
    prc, fForScrolling)
int GetItemRect(
    IVsMenuItem pIMI,
    RECT[] prc,
    int fForScrolling
)
int GetItemRect(
    [InAttribute] IVsMenuItem^ pIMI, 
    [OutAttribute] array<RECT>^ prc, 
    [InAttribute] int fForScrolling
)
abstract GetItemRect : 
        pIMI:IVsMenuItem * 
        prc:RECT[] byref * 
        fForScrolling:int -> int 
function GetItemRect(
    pIMI : IVsMenuItem, 
    prc : RECT[], 
    fForScrolling : int
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

C++

From vsshell.idl:

HRESULT IVsMenuEditor::GetItemRect([in]IVsMenuItem* pIMI, [out]LPRECT prc, [in]BOOL fForScrolling);

.NET Framework Security

See Also

Reference

IVsMenuEditor Interface

IVsMenuEditor Members

Microsoft.VisualStudio.Shell.Interop Namespace