The Microsoft Windows 3.1 Software Development Kit (SDK) has replaced this function with five specialized functions, listed as follows:
Function | Description |
AppendMenu | Appends a menu item to the end of a menu. |
DeleteMenu | Deletes a menu item from a menu, destroying the menu item. |
InsertMenu | Inserts a menu item into a menu. |
ModifyMenu | Modifies a menu item in a menu. |
RemoveMenu | Removes a menu item from a menu but does not destroy the menu item. |
Applications written for Windows versions earlier than 3.0 may continue to call ChangeMenu as previously documented. Applications written for Windows 3.0 and 3.1 should call the new functions.
The following example shows a call to ChangeMenu and how it would be rewritten to call AppendMenu:
ChangeMenu(hMenu, /* handle of menu */
0, /* position parameter not used */
"&White", /* menu-item string */
IDM_PATTERN1, /* menu-item identifier */
MF_APPEND | MF_STRING | MF_CHECKED); /* flags */
AppendMenu(hMenu, /* handle of menu */
MF_STRING | MF_CHECKED, /* flags */
IDM_PATTERN1, /* menu-item identifier */
"&White"); /* menu-item string */