Generates a list resource according to the menu items, options, start position of list area and number of its rows, and returns a list handle.

Syntax

LIST_HANDLE AL_CreateList(
  const AM_MenuItem *menuTable,
  const pAM_Option option,
  int list_ypos,
  int list_lines
);

Parameters

menuTable
[in] To specify menu items, set the pointer to an array of AM_MenuItem structures that defines the menu items. Otherwise, set NULL.
option
[in] To specify options, set the pointer to an AM_Option structure. Otherwise, set NULL.
list_ypos
[in] Specify Y coordinate of the list area with a line number starting from 0. Or specify the Y coordinates in pixel with AM_PIX macro. For example, AM_PIX(100) specifies 100 in pixel coordinates.
list_lines
[in] Number of lines in the list area。

Return value

Returns a list handle of generated list resource if the function succeeds, NULL otherwise.

Remarks

Generates a menu resource according to the menu items and options specified in the parameters, generates a list resource containing the menu resource inside, and then returns a list handle that represents the list resource.

Immediately after the list resource is generated by this function, no list item is registered in the list resource. Use AL_AddListItem function or AL_AddListItemEx function to add list items.


The list display screen is divided into a list area for displaying list items and areas for displaying menu items. The list area is specified by list_ypos and list_lines.
The figure below is an example of the list display screen. The central part is the list area, and the other displays are menu items specified by menuTable.
When calling the list display functions, specify the list handle returned by this function.

To manipulate the menu items on the list display screen with the menu display functions, use the menu handle returned by AL_GetMenuHandle function.

If the return value of this function is not NULL, be sure to call AL_ReleaseList function to release the list resource.

Requirements

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

Last updated: 2021/02/06