Syntax:
INT LlDesignerAddAction(HLLJOB hJob, UINT nID, UINT nFlags, LPCTSTR pszMenuText, LPCTSTR pszMenuHierarchy, LPCTSTR pszTooltipText, UINT nIcon, LPVOID pvReserved);
Task:
Extends the Designer's menu and optionally the toolbar of the Designer. In contrast to using the callback LL_CMND_MODIFYMENU a command button with a selectable icon can be added to the toolbar here. This command must be called before LlDefineLayout().
Parameter:
hJob: List & Label Job-Handle
nID: Menu-ID for the new action to be added. This ID is passed by the callback LL_CMND_SELECTMENU, when the user selects the corresponding menu item or toolbar button. User defined IDs should be in the range between 10100 and 10999.
nFlags: Combination (ORed) of the following flags:
Value |
Meaning |
LLDESADDACTIONFLAG_ADD_TO_TOOLBAR |
Add a command button to the toolbar in addition to the menu item. |
LLDESADDACTION_MENUITEM_APPEND |
The menu item is added behind the entry in pszMenuHierarchy. |
LLDESADDACTION_MENUITEM_INSERT |
The menu item is added in front of the entry pszMenuHierarchy. |
As well as an optional Keycode as a Shortcut and a combination of the following flags as modifiers:
Value |
Meaning |
LLDESADDACTION_ACCEL_CONTROL |
Keyboard shortcut is CTRL+Keycode. |
LLDESADDACTION_ACCEL_SHIFT |
Keyboard shortcut is SHIFT+Keycode. |
LLDESADDACTION_ACCEL_ALT |
Keyboard shortcut is ALT+Keycode. |
LLDESADDACTION_ACCEL_VIRTKEY |
Should always be set. |
pszMenuText:Menu text without a keyboard shortcut (this will be added automatically). You can however, use the "&" symbol to allocate the shortcuts for menu navigation. Use "." as a hierarchy separator to create submenu items. For example, in order to create a Menu "Draft" with a sub-point "Invoices", use "Draft.Invoices" as a menu text.
pszMenuHierarchy:Menu hierarchy of the new menu item. The description is given in the form of "<Level>.<Level>…" whereby "Level" is always the 0-based index of the menu entry. For example, to insert a new entry in the first place in the "Edit" menu, use "1.0" and LLDESADDACTION_MENUITEM_INSERT.
pszTooltipText:Text for the tooltip on the toolbar command button. Will only be evaluated if the flag LLDESADDACTIONFLAG_ADD_TO_TOOLBAR is set. May be NULL.
nIcon: Icon-ID for the command button. Will only be evaluated if the flag LLDESADDACTIONFLAG_ADD_TO_TOOLBAR is set. Use the program IconSelector.exe (in the Tools directory) to see the list of available icons with their IDs.
pvReserved: For future extensions, must be NULL.
Return Value:
Error code
Hints:
To execute the actual action, the LL_CMND_SELECTMENU-Callback has to be processed.
See also:
LlDefineLayout