PopUpMenu

PopUpGetAccel

Find the first item whose accelerator matches a key

Syntax

Signature
int         PopUpGetAccel( const PopUpMenu *popUp, int key );

Arguments

popUp the pop-up menu.

key the character key code. Use KEY_UNICODE() to supply a Unicode code point as a key code.

Return value

The one-based position of the first matching item, or 0 if there is no match or the object is NULL.

Description

The accelerator is the character after the first `&` in the caption. Matching ignores case and includes disabled items. Use `PopUpSelect()` to attempt selection.

See also