GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Nine — Dialog Functions (continued)
Overview
The DialogSetAdHocMenu function adds or replaces an ad hoc menu to a single page dialog.
Syntax/Parameters
Syntax
int = DialogSetAdHocMenu ( string list[] );
Parameters
list
A string array containing menu strings and codes to present on the menu. The first empty item or the end of the array determines the last item added. The ‘&’ character can be used as a key code for keyboard selection of the menu item. Prefixing the menu item with ‘-’ will disable the item.
Return Value
Returns an int value as ERROR_NONE or a formatted error code. Use the GetLastError function to retrieve error information.
Remarks
Legato does not support the MENU resource control since it requires resources to be embedded in the executable. The alternative is to set a menu during dialog setup.
DialogSetAdHocMenu differs from DialogSetMenu in that the menu items do not have to be predefined as application level menu functions.
The list parameter can contain display strings or three control terms:
‘separator’
Adding this string results in a separator line being added to the menu.
‘popup string’
Adding this string creates a popup group and adds a named position to the current menu node. The ‘string’ becomes the text of the popup. All following items are added to the popup sub menu until the ‘endpopup’ is found. An endpopup is not required if the list of menu function codes simply ends. The string is required.
‘endpopup’
Using this string ends a popup section and moves up the tree to the parent menu.
Menu function selections are posted via the ‘action’ procedure. The control id is the position in the array or’d with 0x00008000. Therefore the first item available would be 0x00008001 since the very first declaration in the array should be a popup.
An exit event can occur from a button with the control id as IDCANCEL (2), IDOK (1), the user pressing the Esc or Enter keys, the user pressing the [X] close icon or selecting ‘Close’ from the system menu or double clicking on the window icon. Programmers can use the ok and cancel procedures to prevent exit.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.