Help Center

Modifyfunction

Changes an existing menu item.

Windowsfunctiondoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

FUNCTION Modify (BYVAL hMenu AS HMENU, BYVAL uPosition AS UINT, BYVAL uFlags AS UINT, BYVAL uIDNewItem AS UINT_PTR, BYVAL pNewItem AS WSTRING PTR) AS BOOLEAN

Parameters

NameDescription
hMenuA handle to the menu to be changed.
uPositionThe menu item to be changed, as determined by the uFlags parameter.
uFlagsControls the interpretation of the uPosition parameter and the content, appearance, and behavior of the menu item. This parameter must include one of the following required values:
MF_BYCOMMAND: Indicates that the uPosition parameter gives the identifier of the menu item. The MF_BYCOMMAND flag is the default if neither the MF_BYCOMMAND nor MF_BYPOSITION flag is specified.
MF_BYPOSITION: Indicates that the uPosition parameter gives the zero-based relative position of the menu item. The parameter must also include at least one of the following values (see below).
uIDNewItemThe identifier of the modified menu item or, if the uFlags parameter has the MF_POPUP flag set, a handle to the drop-down menu or submenu.
pNewItemThe contents of the changed menu item. The interpretation of this parameter depends on whether the uFlags parameter includes the MF_BITMAP, MF_OWNERDRAW, or MF_STRING flag.

Description

Changes an existing menu item. This function is used to specify the content, appearance, and behavior of the menu item.

Reference

  • Documented in Windows/WIndows Controls/CMenu Class.md
  • Topic: About Menus