Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemaccel.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemaccel.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemaccel.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemaccel.html on line 8
Modify the keyboard shortcut for a menu item
int ApModifyItemAccel( ApMenuLink_t *menu,
int item_no,
const char *new_text,
int new_flags );
- menu
- A pointer to a PhAB menu link structure.
- item_num
- The number of the menu item, as generated by PhAB.
- new_text
- A pointer to the new shortcut for the menu item.
- new_flags
- Zero, or the following:
- AB_ITEM_ACCEL_STRDUP — duplicate the string and
store the copy in the menu item.
If memory was allocated for the former keyboard shortcut, the function
frees the space.
Ap
ApModifyItemAccel() modifies the keyboard shortcut for a menu item
in a PhAB menu module.
|
If you don't set AB_ITEM_ACCEL_STRDUP in the
new_flags argument, ApModifyItemAccel() stores the
address given by new_text instead of making a copy of the string
pointed to by new_text.
In this case, don't modify the string after calling this function. |
You can call ApModifyItemAccel() at any time to
set the menu item's shortcut, and the effect will be seen when the menu
is next displayed.
- 0
- The item number isn't valid.
- 1
- Success.
- -1
- An error occurred.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
ApGetItemText(),
ApModifyItemState(),
ApModifyItemText()
“Changing
menu-item text” in the Working with Code
chapter of the Photon Programmer's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemaccel.html on line 161
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemaccel.html on line 161