Dynamic Windows Function [dw_menu_append_item]
Syntax
HWND dw_menu_append_item(HMENUI menu, char *title, unsigned long id, unsigned long flags, int end, int check, HMENUI submenu)
Parameters
HMENUI menu: The handle the the existing menu.
char *title: The title text on the menu item to be added or DW_MENU_SEPARATOR.
unsigned long id: A unique menu ID from 1 to 29999, DW_MENU_AUTO or DW_MENU_POPUP.
unsigned long flags: Extended attributes to set on the menu such as DW_MIS_CHECKED.
int end: If TRUE memu is positioned at the end of the menu.
int check: If TRUE menu is "check"able.
HMENUI submenu: Handle to an existing menu to be a submenu or DW_NOMENU.
Returns
HWND Handle to the created menu item or NULL on error.
Description
Adds a menuitem or submenu to an existing menu.
Remarks
As of version 2.2 DW_MENU_AUTO and DW_MENU_POPUP can be used to automatically allocate a menu ID on OS/2 and Windows. These platforms require a unique menu ID for signals to function. IDs 1 to 29,999 are reserved for users to specify.
DW_MENU_AUTO will allocate from a pool of 30,000 IDs.
DW_MENU_POPUP will allocate from a small pool and should only be used for transient popup menus.
The other platforms do not require these ID pools, but using DW_MENU_AUTO and DW_MENU_POPUP appropriately is recommended to keep your application cross platform.
Versions prior to 2.2 require you specify a unique ID for every menu item.