3 instantiations of HMENU
System.Windows.Forms.Primitives (3)
Windows.Win32.HMENU.g.cs (3)
41
public static explicit operator HMENU(void* value) => new
HMENU
(value);
57
public static explicit operator HMENU(IntPtr value) => new
HMENU
((void*)value.ToPointer());
59
public static explicit operator HMENU(UIntPtr value) => new
HMENU
((void*)value.ToPointer());
115 references to HMENU
System.Windows.Forms (28)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (3)
699
HRESULT IOleInPlaceFrame.Interface.InsertMenus(
HMENU
hmenuShared, OLEMENUGROUPWIDTHS* lpMenuWidths) => HRESULT.S_OK;
701
HRESULT IOleInPlaceFrame.Interface.SetMenu(
HMENU
hmenuShared, nint holemenu, HWND hwndActiveObject) => HRESULT.E_NOTIMPL;
703
HRESULT IOleInPlaceFrame.Interface.RemoveMenus(
HMENU
hmenuShared) => HRESULT.E_NOTIMPL;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (2)
278
HMENU
* hmenu)
283
*hmenu =
HMENU
.Null;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
209
internal static unsafe ToolStripDropDownMenu FromHMenu(
HMENU
hmenu, IWin32Window targetWindow)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
891
HMENU
hMenu = PInvoke.GetMenu(toplevelControl);
892
if (hMenu ==
HMENU
.Null)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (4)
38
private
HMENU
_nativeMenuHandle =
HMENU
.Null;
118
internal ToolStripMenuItem(
HMENU
hmenu, int nativeMenuCommandId, IWin32Window targetWindow)
1087
internal void SetNativeTargetMenu(
HMENU
hmenu) => _nativeMenuHandle = hmenu;
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (3)
139
HRESULT IOleInPlaceFrame.Interface.InsertMenus(
HMENU
hmenuShared, OLEMENUGROUPWIDTHS* lpMenuWidths)
142
HRESULT IOleInPlaceFrame.Interface.SetMenu(
HMENU
hmenuShared, nint holemenu, HWND hwndActiveObject)
145
HRESULT IOleInPlaceFrame.Interface.RemoveMenus(
HMENU
hmenuShared) => HRESULT.E_NOTIMPL;
System\Windows\Forms\Form.cs (9)
2953
private void AdjustSystemMenu(
HMENU
hmenu)
3024
HMENU
hmenu = PInvoke.GetSystemMenu(this, bRevert: false);
3560
if (Properties.TryGetValue(s_propDummyMdiMenu, out
HMENU
dummyMenu))
6175
PInvoke.SetMenu(this,
HMENU
.Null);
6192
if (!Properties.TryGetValue(s_propDummyMdiMenu, out
HMENU
dummyMenu) || recreateMenu)
6208
HMENU
hMenu = PInvoke.GetMenu(this);
6212
PInvoke.SetMenu(this,
HMENU
.Null);
6353
HMENU
hMenu = PInvoke.GetMenu(this);
6354
if (hMenu ==
HMENU
.Null)
System\Windows\Forms\MDI\MdiControlStrip.ControlBoxMenuItem.cs (1)
11
internal ControlBoxMenuItem(
HMENU
hMenu, uint nativeMenuCommandId, IWin32Window targetWindow)
System\Windows\Forms\MDI\MDIControlStrip.cs (2)
26
HMENU
hMenu = PInvoke.GetSystemMenu(GetSafeHandle(target), bRevert: false);
116
HMENU
hmenu = PInvoke.GetSystemMenu(GetSafeHandle(_target), bRevert: false);
System\Windows\Forms\NativeWindow.cs (1)
449
HMENU
.Null,
System.Windows.Forms.Design (2)
System\ComponentModel\Design\MultilineStringEditor.OleCallback.cs (2)
145
HMENU
* hmenu)
150
*hmenu =
HMENU
.Null;
System.Windows.Forms.Primitives (78)
Windows.Win32.HMENU.g.cs (13)
25
: IEquatable<
HMENU
>
35
internal static
HMENU
Null => default;
39
public static implicit operator void*(
HMENU
value) => value.Value;
41
public static explicit operator
HMENU
(void* value) => new HMENU(value);
43
public static bool operator ==(
HMENU
left,
HMENU
right) => left.Value == right.Value;
45
public static bool operator !=(
HMENU
left,
HMENU
right) => !(left == right);
47
public bool Equals(
HMENU
other) => this.Value == other.Value;
49
public override bool Equals(object obj) => obj is
HMENU
other && this.Equals(other);
55
public static implicit operator IntPtr(
HMENU
value) => new IntPtr(value.Value);
57
public static explicit operator
HMENU
(IntPtr value) => new HMENU((void*)value.ToPointer());
59
public static explicit operator
HMENU
(UIntPtr value) => new HMENU((void*)value.ToPointer());
Windows.Win32.IOleInPlaceFrame.g.cs (17)
255
/// <inheritdoc cref="InsertMenus(winmdroot.UI.WindowsAndMessaging.
HMENU
, winmdroot.System.Ole.OLEMENUGROUPWIDTHS*)"/>
256
internal unsafe winmdroot.Foundation.HRESULT InsertMenus(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared, ref winmdroot.System.Ole.OLEMENUGROUPWIDTHS lpMenuWidths)
268
private static winmdroot.Foundation.HRESULT InsertMenus(IOleInPlaceFrame* pThis, winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared, winmdroot.System.Ole.OLEMENUGROUPWIDTHS* lpMenuWidths)
296
public unsafe winmdroot.Foundation.HRESULT InsertMenus(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared, winmdroot.System.Ole.OLEMENUGROUPWIDTHS* lpMenuWidths)
298
return ((delegate *unmanaged [Stdcall]<IOleInPlaceFrame*,winmdroot.UI.WindowsAndMessaging.
HMENU
,winmdroot.System.Ole.OLEMENUGROUPWIDTHS* ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((IOleInPlaceFrame*)Unsafe.AsPointer(ref this), hmenuShared, lpMenuWidths);
304
private static winmdroot.Foundation.HRESULT SetMenu(IOleInPlaceFrame* pThis, winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared, nint holemenu, winmdroot.Foundation.HWND hwndActiveObject)
333
public winmdroot.Foundation.HRESULT SetMenu(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared, nint holemenu, winmdroot.Foundation.HWND hwndActiveObject)
335
return ((delegate *unmanaged [Stdcall]<IOleInPlaceFrame*,winmdroot.UI.WindowsAndMessaging.
HMENU
,nint ,winmdroot.Foundation.HWND ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((IOleInPlaceFrame*)Unsafe.AsPointer(ref this), hmenuShared, holemenu, hwndActiveObject);
341
private static winmdroot.Foundation.HRESULT RemoveMenus(IOleInPlaceFrame* pThis, winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared)
368
public winmdroot.Foundation.HRESULT RemoveMenus(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared)
370
return ((delegate *unmanaged [Stdcall]<IOleInPlaceFrame*,winmdroot.UI.WindowsAndMessaging.
HMENU
,winmdroot.Foundation.HRESULT>)lpVtbl[11])((IOleInPlaceFrame*)Unsafe.AsPointer(ref this), hmenuShared);
536
internal delegate *unmanaged [Stdcall]<IOleInPlaceFrame*,winmdroot.UI.WindowsAndMessaging.
HMENU
,winmdroot.System.Ole.OLEMENUGROUPWIDTHS* ,winmdroot.Foundation.HRESULT> InsertMenus_10;
538
internal delegate *unmanaged [Stdcall]<IOleInPlaceFrame*,winmdroot.UI.WindowsAndMessaging.
HMENU
,nint ,winmdroot.Foundation.HWND ,winmdroot.Foundation.HRESULT> SetMenu_11;
540
internal delegate *unmanaged [Stdcall]<IOleInPlaceFrame*,winmdroot.UI.WindowsAndMessaging.
HMENU
,winmdroot.Foundation.HRESULT> RemoveMenus_12;
602
unsafe winmdroot.Foundation.HRESULT InsertMenus(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared, winmdroot.System.Ole.OLEMENUGROUPWIDTHS* lpMenuWidths);
605
winmdroot.Foundation.HRESULT SetMenu(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared, nint holemenu, winmdroot.Foundation.HWND hwndActiveObject);
608
winmdroot.Foundation.HRESULT RemoveMenus(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared);
Windows.Win32.IRichEditOleCallback.g.cs (8)
482
/// <inheritdoc cref="GetContextMenu(winmdroot.UI.Controls.RichEdit.RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE, winmdroot.System.Ole.IOleObject*, winmdroot.UI.Controls.RichEdit.CHARRANGE*, winmdroot.UI.WindowsAndMessaging.
HMENU
*)"/>
483
internal unsafe winmdroot.Foundation.HRESULT GetContextMenu(winmdroot.UI.Controls.RichEdit.RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE seltype, winmdroot.System.Ole.IOleObject* lpoleobj, ref winmdroot.UI.Controls.RichEdit.CHARRANGE lpchrg, ref winmdroot.UI.WindowsAndMessaging.
HMENU
lphmenu)
485
fixed (winmdroot.UI.WindowsAndMessaging.
HMENU
* lphmenuLocal = &lphmenu)
498
private static winmdroot.Foundation.HRESULT GetContextMenu(IRichEditOleCallback* pThis, winmdroot.UI.Controls.RichEdit.RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE seltype, winmdroot.System.Ole.IOleObject* lpoleobj, winmdroot.UI.Controls.RichEdit.CHARRANGE* lpchrg, winmdroot.UI.WindowsAndMessaging.
HMENU
* lphmenu)
534
public unsafe winmdroot.Foundation.HRESULT GetContextMenu(winmdroot.UI.Controls.RichEdit.RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE seltype, winmdroot.System.Ole.IOleObject* lpoleobj, winmdroot.UI.Controls.RichEdit.CHARRANGE* lpchrg, winmdroot.UI.WindowsAndMessaging.
HMENU
* lphmenu)
536
return ((delegate *unmanaged [Stdcall]<IRichEditOleCallback*,winmdroot.UI.Controls.RichEdit.RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE ,winmdroot.System.Ole.IOleObject* ,winmdroot.UI.Controls.RichEdit.CHARRANGE* ,winmdroot.UI.WindowsAndMessaging.
HMENU
* ,winmdroot.Foundation.HRESULT>)lpVtbl[12])((IRichEditOleCallback*)Unsafe.AsPointer(ref this), seltype, lpoleobj, lpchrg, lphmenu);
584
internal delegate *unmanaged [Stdcall]<IRichEditOleCallback*,winmdroot.UI.Controls.RichEdit.RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE ,winmdroot.System.Ole.IOleObject* ,winmdroot.UI.Controls.RichEdit.CHARRANGE* ,winmdroot.UI.WindowsAndMessaging.
HMENU
* ,winmdroot.Foundation.HRESULT> GetContextMenu_13;
647
unsafe winmdroot.Foundation.HRESULT GetContextMenu(winmdroot.UI.Controls.RichEdit.RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE seltype, winmdroot.System.Ole.IOleObject* lpoleobj, winmdroot.UI.Controls.RichEdit.CHARRANGE* lpchrg, winmdroot.UI.WindowsAndMessaging.
HMENU
* lphmenu);
Windows.Win32.MENUITEMINFOW.g.cs (1)
60
internal winmdroot.UI.WindowsAndMessaging.
HMENU
hSubMenu;
Windows.Win32.PInvoke.USER32.dll.g.cs (20)
410
internal static winmdroot.Foundation.BOOL DestroyMenu(winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu)
418
static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu);
427
internal static winmdroot.UI.WindowsAndMessaging.
HMENU
CreateMenu()
430
winmdroot.UI.WindowsAndMessaging.
HMENU
__retVal = LocalExternFunction();
435
static extern winmdroot.UI.WindowsAndMessaging.
HMENU
LocalExternFunction();
438
/// <inheritdoc cref="CreateWindowEx(winmdroot.UI.WindowsAndMessaging.WINDOW_EX_STYLE, winmdroot.Foundation.PCWSTR, winmdroot.Foundation.PCWSTR, winmdroot.UI.WindowsAndMessaging.WINDOW_STYLE, int, int, int, int, winmdroot.Foundation.HWND, winmdroot.UI.WindowsAndMessaging.
HMENU
, winmdroot.Foundation.HINSTANCE, void*)"/>
440
internal static unsafe winmdroot.Foundation.HWND CreateWindowEx(winmdroot.UI.WindowsAndMessaging.WINDOW_EX_STYLE dwExStyle, string lpClassName, string lpWindowName, winmdroot.UI.WindowsAndMessaging.WINDOW_STYLE dwStyle, int X, int Y, int nWidth, int nHeight, winmdroot.Foundation.HWND hWndParent, winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu, winmdroot.Foundation.HINSTANCE hInstance, void* lpParam)
512
internal static unsafe winmdroot.Foundation.HWND CreateWindowEx(winmdroot.UI.WindowsAndMessaging.WINDOW_EX_STYLE dwExStyle, winmdroot.Foundation.PCWSTR lpClassName, winmdroot.Foundation.PCWSTR lpWindowName, winmdroot.UI.WindowsAndMessaging.WINDOW_STYLE dwStyle, int X, int Y, int nWidth, int nHeight, winmdroot.Foundation.HWND hWndParent, winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu, winmdroot.Foundation.HINSTANCE hInstance, [Optional] void* lpParam)
520
static extern unsafe winmdroot.Foundation.HWND LocalExternFunction(winmdroot.UI.WindowsAndMessaging.WINDOW_EX_STYLE dwExStyle, winmdroot.Foundation.PCWSTR lpClassName, winmdroot.Foundation.PCWSTR lpWindowName, winmdroot.UI.WindowsAndMessaging.WINDOW_STYLE dwStyle, int X, int Y, int nWidth, int nHeight, winmdroot.Foundation.HWND hWndParent, winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu, winmdroot.Foundation.HINSTANCE hInstance, [Optional] void* lpParam);
830
internal static extern winmdroot.Foundation.BOOL EnableMenuItem(winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu, uint uIDEnableItem, winmdroot.UI.WindowsAndMessaging.MENU_ITEM_FLAGS uEnable);
1541
internal static extern winmdroot.UI.WindowsAndMessaging.
HMENU
GetMenu(winmdroot.Foundation.HWND hWnd);
1555
internal static int GetMenuItemCount(winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu)
1563
static extern int LocalExternFunction(winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu);
1566
/// <inheritdoc cref="GetMenuItemInfo(winmdroot.UI.WindowsAndMessaging.
HMENU
, uint, winmdroot.Foundation.BOOL, winmdroot.UI.WindowsAndMessaging.MENUITEMINFOW*)"/>
1568
internal static unsafe winmdroot.Foundation.BOOL GetMenuItemInfo(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenu, uint item, winmdroot.Foundation.BOOL fByPosition, ref winmdroot.UI.WindowsAndMessaging.MENUITEMINFOW lpmii)
1602
internal static unsafe winmdroot.Foundation.BOOL GetMenuItemInfo(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenu, uint item, winmdroot.Foundation.BOOL fByPosition, winmdroot.UI.WindowsAndMessaging.MENUITEMINFOW* lpmii)
1610
static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.UI.WindowsAndMessaging.
HMENU
hmenu, uint item, winmdroot.Foundation.BOOL fByPosition, winmdroot.UI.WindowsAndMessaging.MENUITEMINFOW* lpmii);
1850
internal static extern winmdroot.UI.WindowsAndMessaging.
HMENU
GetSystemMenu(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.BOOL bRevert);
3225
internal static winmdroot.Foundation.BOOL SetMenu(winmdroot.Foundation.HWND hWnd, winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu)
3233
static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HWND hWnd, winmdroot.UI.WindowsAndMessaging.
HMENU
hMenu);
Windows.Win32.System_Ole_IOleInPlaceFrame_Extensions.g.cs (2)
73
/// <inheritdoc cref="winmdroot.System.Ole.IOleInPlaceFrame.Interface.InsertMenus(winmdroot.UI.WindowsAndMessaging.
HMENU
, winmdroot.System.Ole.OLEMENUGROUPWIDTHS*)"/>
74
internal static unsafe winmdroot.Foundation.HRESULT InsertMenus(this winmdroot.System.Ole.IOleInPlaceFrame.Interface @this, winmdroot.UI.WindowsAndMessaging.
HMENU
hmenuShared, ref winmdroot.System.Ole.OLEMENUGROUPWIDTHS lpMenuWidths)
Windows.Win32.UI_Controls_RichEdit_IRichEditOleCallback_Extensions.g.cs (3)
73
/// <inheritdoc cref="winmdroot.UI.Controls.RichEdit.IRichEditOleCallback.Interface.GetContextMenu(winmdroot.UI.Controls.RichEdit.RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE, winmdroot.System.Ole.IOleObject*, winmdroot.UI.Controls.RichEdit.CHARRANGE*, winmdroot.UI.WindowsAndMessaging.
HMENU
*)"/>
74
internal static unsafe winmdroot.Foundation.HRESULT GetContextMenu(this winmdroot.UI.Controls.RichEdit.IRichEditOleCallback.Interface @this, winmdroot.UI.Controls.RichEdit.RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE seltype, winmdroot.System.Ole.IOleObject* lpoleobj, ref winmdroot.UI.Controls.RichEdit.CHARRANGE lpchrg, ref winmdroot.UI.WindowsAndMessaging.
HMENU
lphmenu)
76
fixed (winmdroot.UI.WindowsAndMessaging.
HMENU
* lphmenuLocal = &lphmenu)
Windows\Win32\PInvoke.CreateWindowEx.cs (2)
11
/// <inheritdoc cref="CreateWindowEx(WINDOW_EX_STYLE, string, string, WINDOW_STYLE, int, int, int, int, HWND,
HMENU
, HINSTANCE, void*)"/>
22
HMENU
hMenu,
Windows\Win32\PInvoke.EnableMenuItem.cs (2)
8
/// <inheritdoc cref="EnableMenuItem(
HMENU
, uint, MENU_ITEM_FLAGS)"/>
10
where T : IHandle<
HMENU
>
Windows\Win32\PInvoke.GetMenu.cs (2)
9
public static
HMENU
GetMenu<T>(T hWnd)
12
HMENU
result = GetMenu(hWnd.Handle);
Windows\Win32\PInvoke.GetMenuItemCount.cs (2)
8
/// <inheritdoc cref="GetMenuItemCount(
HMENU
)"/>
10
where T : IHandle<
HMENU
>
Windows\Win32\PInvoke.GetSystemMenu.cs (2)
9
public static
HMENU
GetSystemMenu<T>(T hwnd, BOOL bRevert) where T : IHandle<HWND>
11
HMENU
result = GetSystemMenu(hwnd.Handle, bRevert);
Windows\Win32\PInvoke.SetMenu.cs (4)
8
/// <inheritdoc cref="SetMenu(HWND,
HMENU
)"/>
9
public static BOOL SetMenu<T>(T hWnd,
HMENU
hMenu)
17
/// <inheritdoc cref="SetMenu(HWND,
HMENU
)"/>
20
where T2 : IHandle<
HMENU
>
System.Windows.Forms.Primitives.TestUtilities (4)
Win32\EditControl.cs (1)
18
HMENU
menuHandle = default)
Win32\Window.cs (1)
23
HMENU
menuHandle = default)
Win32\WindowClass.cs (2)
133
HMENU
menuHandle = default)
154
HMENU
menuHandle = default)
System.Windows.Forms.Tests (3)
System\Windows\Forms\MdiControlStripTests.cs (1)
309
int menuItemCount = PInvoke.GetMenuItemCount((
HMENU
)menuHandle);
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
114
HMENU
hmenu = PInvoke.GetSystemMenu(form, bRevert: false);
423
internal SubToolStripMenuItem(
HMENU
hmenu, int nativeMenuCommandId, IWin32Window targetWindow) : base(hmenu, nativeMenuCommandId, targetWindow)