Menu::Add

Description

Add an menu item at the end of the menu(internal menu)


Add an menu item at the end of the menu(Resource menu)

Syntax

BOOL Add( LPCSTR lpcszText, Function fnHandler, UINT nFlags = MF_STRING, int nMenuID = 0 )

BOOL Add( LPCSTR lpcszText, int nCmdID, UINT nFlags = MF_STRING )

Parameters

lpcszText
fnHandler
the handler function for the newly inserted item
nFlags
flag to identify the item type, could be one of the following MF_STRING ,MF_ENABLED ,MF_GRAYED ,MF_DISABLED ,MF_UNCHECKED ,MF_CHECKED ,MF_SEPARATOR
nMenuID
optional command ID, if non zero internal command ID assignment is overwritten

lpcszText
nCmdID
the command ID of the menu item
nFlags
flag to identify the item type, could be one of the following MF_STRING ,MF_ENABLED ,MF_GRAYED ,MF_DISABLED ,MF_UNCHECKED ,MF_CHECKED ,MF_SEPARATOR

Return

returns true if successful else false.


returns true if successful else false.

Examples

Remark

See Also

header to Include

Control.h