WinDataDrivenAdapter.FindMenuItem Method
Finds the menu item associated with a control.
Namespace: Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter
Assembly: Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter (in Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter.dll)
Usage
'Usage
Dim controlName As String
Dim throwExceptionIfNotFound As Boolean
Dim hMenu As IntPtr
Dim subMenuIndex As Integer
Dim hMenuItemId As Integer
Dim returnValue As Boolean
returnValue = Me.FindMenuItem(controlName, throwExceptionIfNotFound, hMenu, subMenuIndex, hMenuItemId)
Syntax
'Declaration
Protected Function FindMenuItem ( _
controlName As String, _
throwExceptionIfNotFound As Boolean, _
<OutAttribute> ByRef hMenu As IntPtr, _
<OutAttribute> ByRef subMenuIndex As Integer, _
<OutAttribute> ByRef hMenuItemId As Integer _
) As Boolean
protected bool FindMenuItem (
string controlName,
bool throwExceptionIfNotFound,
out IntPtr hMenu,
out int subMenuIndex,
out int hMenuItemId
)
protected:
bool FindMenuItem (
String^ controlName,
bool throwExceptionIfNotFound,
[OutAttribute] IntPtr% hMenu,
[OutAttribute] int% subMenuIndex,
[OutAttribute] int% hMenuItemId
)
protected boolean FindMenuItem (
String controlName,
boolean throwExceptionIfNotFound,
/** @attribute OutAttribute() */ /** @ref */ IntPtr hMenu,
/** @attribute OutAttribute() */ /** @ref */ int subMenuIndex,
/** @attribute OutAttribute() */ /** @ref */ int hMenuItemId
)
Parameters
- controlName
Specifies the name of the control.
- throwExceptionIfNotFound
Contains a Boolean value that, when true, throws DataDrivenAdapterException if the control isn’t found.
- hMenu
Specifies the handler for the menu item.
- subMenuIndex
Specifies the submenu index.
- hMenuItemId
Specifies the Id of the menu item control.
Return Value
Type: Boolean
true if it finds the control; otherwise, false.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
See Also
Reference
WinDataDrivenAdapter Class
WinDataDrivenAdapter Members
Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter Namespace
Unified Service Desk
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.