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
'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
- pIMI
Type: Microsoft.VisualStudio.Shell.Interop.IVsMenuItem
[in]
- prc
Type: array<Microsoft.VisualStudio.OLE.Interop.RECT[]
[out]
- fForScrolling
Type: System.Int32
[in]
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.