Specify the range by item IDs and set the enabled attribute of the menu item.

Syntax

bool AM_SetEnabledRange(
  MENU_HANDLE menu,
  int IdOfStartLine,
  int IdOfEndLine,
  bool enable
);

Parameters

menu
[in] Menu handle
IdOfStartLine
[in] Item ID of the first menu item in the range to be set.
IdOfEndLine
[in] Item ID of the last menu item in the range to be set.
enable
[in] Specify true to enable the enabled attribute, false otherwise.

Return value

Returns true if the function succeeds, false otherwise.

Remarks

In the array of AM_MenuItem structures that define the menu, find the menu item whose item ID matches IdOfStartLine or IdOfEndLine, change the enabled attribute of the menu items in that range and update their display.

Note that the menu item is not selected based on the magnitude of the item ID value.

Requirements

Header file:
lib.h
AdvancedMenu.h
Library file:
libAdvancedMenu.a
libSTARTUPOPH5000.a

Last updated: 2020/10/09