InsertIntoWin32Menu Method

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)


Commands.InsertIntoWin32Menu ( menuHandle, menuItemToInsertBefore, byPosition, useShortcutKeys)


Inserts a menu item into a menu for each command in the Commands collection. Use this method to build a context menu for a control that generates the SequenceView.CreateContextMenu or ListBar.CreateContextMenu event.


menuHandle As Long

[In] Specifies the Microsoft Windows menu handle (HMENU) to insert the menu items into. The menu items invoke their corresponding Command objects when selected. You do not handle menu events for items this method inserts.

menuItemToInsertBefore As Long

[In] Specifies the position or menu item identifier (resource ID/command ID) of the menu item before which the method inserts the new menu items. To insert at the end of the menu, pass -1 and pass True to the byPosition parameter.

byPosition As Boolean

[In] Pass True when the menuItemToInsertBefore parameter contains a zero-based menu item position. Pass False when the menuItemToInsertBefore parameter contains a menu item identifier (resource ID/command ID).

useShortcutKeys As Boolean

[In] Pass True to show shortcut key text for each item this method inserts that has a shortcut key. Typically, you use this method to build context menus which do not automatically implement shortcut key handling. Therefore, show shortcut keys only for items that also appear in the main menu bar, unless you explicitly provide shortcut key handling for items that appear only in the context menu.

See Also




Not Helpful