Difference between revisions of "MenuItem.Handle"
From Xojo Documentation
(Created page with "<ShowIf version=2013r3> {{PropertyBox | name=Handle | owner=MenuItem | ownertype=class | scope=public | parameters=type As HandleType | type=Integer | platform=all | r...") |
|||
Line 21: | Line 21: | ||
* WindowsParentHMENU: Returns the HMENU of the MenuItem if it is a submenu, otherwise it returns the parent's HMENU | * WindowsParentHMENU: Returns the HMENU of the MenuItem if it is a submenu, otherwise it returns the parent's HMENU | ||
* WindowsCommandID: Returns the unique menu item identifier for the MenuItem, used by various Win32 APIs such as GetMenuItemInfo | * WindowsCommandID: Returns the unique menu item identifier for the MenuItem, used by various Win32 APIs such as GetMenuItemInfo | ||
− |
Latest revision as of 05:35, 28 January 2022
<ShowIf version=2013r3>
Read-Only Property (As Integer )
Provides access to the appropriate underlying platform menu implementation.
Notes
If the requested handle type doesn't make sense for the platform the application is running on, a PlatformNotSupportedException is raised.
MenuItem.HandleType enumeration:
- CocoaNSMenuItem: Returns the underlying NSMenuItem. If there is a submenu, the NSMenu can be got through NSMenuItem's submenu method.
- WindowsParentHMENU: Returns the HMENU of the MenuItem if it is a submenu, otherwise it returns the parent's HMENU
- WindowsCommandID: Returns the unique menu item identifier for the MenuItem, used by various Win32 APIs such as GetMenuItemInfo