guiMenuCreate (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

NX-400

Firmware version:

1.00.00


This function creates a new menu.

 

Each menu can contain up to 8 items, which are either sub menus or menu items that triggers the menu clicked event when clicked..

gui_menu

 

Input:

tag : DINT

The tag value to store.

 

Output:

menu : SYSHANDLE

The handle to the new menu.

 

Returns: INT

0

- Success.

-1

- Interface is not open (see guiOpen).

-2

- Not enough memory / resources.

-11

- The GUI API is not supported.

 

Declaration:

FUNCTION guiMenuCreate : INT;
VAR_INPUT
  tag     : DINT;
  menu    : ACCESS SYSHANDLE;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc   : INT;
  menu : SYSHANDLE;
END_VAR;
 
BEGIN
  ...
  // Create a new menu.
  rc := guiMenuCreate(menu := menu, tag:=41);
  ...
END;
END_PROGRAM;