XLL+ Class Library (6.3)

CXlMenu::ReplaceItem

Replaces an item in a menu

void ReplaceItem(
   const TCHAR* pszOldText,
   const TCHAR* pszNewText
);
void ReplaceItem(
   int nPosition,
   const TCHAR* pszNewText
);

Parameters

pszOldText

The current text of the menu item, which may include an ampersand for a short-cut key.

This argument can contain a resource ID string. This will be replaced at run-time by a string loaded from the resource file in the current preferred language, as returned by XllGetStringLanguageID.

pszNewText

The new text of the menu item, which may include an ampersand for a short-cut key.

This argument can contain a resource ID string. This will be replaced at run-time by a string loaded from the resource file in the current preferred language, as returned by XllGetStringLanguageID.

nPosition

The index of the item in the menu. Note that the index of the first item is 1.

Remarks

Replaces the text of an item in the menu, either by name or position.

This function may only be called after Create() has been called. It will have no effect if it is called before Create().

Requirements

Header: xlmenu.h

See Also

CXlMenu Class | CXlMenu Methods