MenuItem

MenuItemSetCargo

Store an application data pointer on the item

Syntax

Signature
xBool         MenuItemSetCargo( MenuItem *item, void *cargo );

Arguments

item the menu item to change.

cargo the application data pointer, or NULL to clear it.

Return value

T on success, or F if the object is NULL.

Description

The application manages the lifetime of the data. A menu item callback receives the item and can retrieve the pointer with `MenuItemGetCargo()`.

See also