Sets the control type for menu items.

Syntax

bool AM_SetControlType(
  MENU_HANDLE menu,
  int id,
  int control,
  bool clearItem
);

Parameters

menu
[in] Menu handle
id
[in] Item ID of menu item.
control
[in] Specify the type of control to be set for the menu item with one of the following values.
ValueDescription
AM_NO_CONTROLNo control is added.
AM_CHECK_BOXDisplays a check box in front of the display string.
AM_RADIO_BTNDisplays a radio button in front of the display string.
AM_LIST_MARKDisplays ▼ after the display string. The string is displayed with underline.
AM_JUMP_MARKDisplays ▶ in front of the display string.
AM_CLEAR_ICONDisplays [CLR] icon in front of the display string.
AM_ENT_ICONDisplays [ENT] icon in front of the display string.
AM_SCAN_ICONDisplays [SCAN] icon in front of the display string.
AM_F1_ICONDisplays [F1] icon in front of the display string.
AM_F2_ICONDisplays [F2] icon in front of the display string.
AM_F3_ICONDisplays [F3] icon in front of the display string.
AM_Q1_ICONDisplays [Q1] icon in front of the display string.
AM_Q2_ICONDisplays [F2] icon in front of the display string.
AM_BS_ICONDisplays [BS] icon in front of the display string.
AM_1_ICONDisplays [1] icon in front of the display string.
AM_2_ICONDisplays [2] icon in front of the display string.
AM_3_ICONDisplays [3] icon in front of the display string.
AM_4_ICONDisplays [4] icon in front of the display string.
AM_5_ICONDisplays [5] icon in front of the display string.
AM_6_ICONDisplays [6] icon in front of the display string.
AM_7_ICONDisplays [7] icon in front of the display string.
AM_8_ICONDisplays [8] icon in front of the display string.
AM_9_ICONDisplays [9] icon in front of the display string.
AM_0_ICONDisplays [0] icon in front of the display string.
AM_ASTER_ICONDisplays [*] icon in front of the display string.

Note:

The following values cannot be specified.
AM_TEXT_EDIT
AM_SHIFT_MODE
AM_SHIFT_CANDIDATE
AM_BMPFILE
clearItem
[in] Specify true to clear the original display before updating it, false otherwise.

Return value

Returns true if the function succeeds, false otherwise.

Remarks

Change the control of the menu item specified by id to the control specified by control and update the display.

If the current control type of the menu item specified by id is one of the following, this function will fail and return false.
AM_TEXT_EDIT
AM_SHIFT_MODE
AM_SHIFT_CANDIDATE
AM_BMPFILE

Requirements

Header file:
lib.h
AdvancedMenu.h : Ver.1.3.0 and later
Library file:
libAdvancedMenu.a : Ver.1.3.0 and later
libSTARTUPOPH5000.a

Last updated: 2020/10/27