Share via


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).

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

Syntax

'Declaration
Function GetItemRect ( _
    pIMI As IVsMenuItem, _
    <OutAttribute> prc As RECT(), _
    fForScrolling As Integer _
) As Integer
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

  • fForScrolling
    Type: System.Int32

    [in] Indicates whether this method is getting an item rectangle for the purpose of scrolling it into view. If true, it is for the purpose 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.

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

Microsoft.VisualStudio.Shell.Interop Namespace