Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- M E W E L - <b>bool pascal changemenu(hmenu hmenu, word idchgitem, char *newstring, </b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
BOOL pascal ChangeMenu(HMENU hMenu, WORD idChgItem, char *newString, 
                        WORD idNewItem, WORD flags)

  This function is a "catch-all" function for altering a menu. It is
used to append, insert, delete, or change a menu item. It is also
used to attach a pulldown menu to a menubar. If a menu has changed,
and it is currently visible, you must call DrawMenuBar() in order to
refresh the menu.

Parameters
  hMenu is the handle of the menu that we want to change.
  idChgItem specifies the menu item to change.  If the MF_BYPOSITION
   flag in specified in the flags argument, then idChgItem is considered
   to be the 0-based position of the menu item to change. If the
   MF_BYCOMMAND flag is specified, then idChgItem is considered to be the
   id of the item to change.
  newString is a pointer to a null-terminated string which will be the
   text of the menu item.
  idNewItem specifies the new menu item. If one of the 'flags' is
   MF_POPUP (ie - we are attaching a pulldown menu to a menubar), the
   idnewItem is the handle of the pulldown menu.
  flags specifies the operations to be performed on the menu. It can
   be an ORed combination of any of the following :

  MF_BYPOSITION - the idChgItem argument is considered to be the
   0-based position of the item to change.
  MF_BYCOMMAND - the idChgItem argument is considered to be the
   identifier of the menu item to change.

  MF_APPEND     - appends a new item to the end of the menu.
  MF_INSERT     - inserts a new item before the specified menu item.
  MF_DELETE     - deletes the specified menu item.
  MF_CHANGE     - changes or replaces the specified menu item.
Note - the above 4 operations should be mutually exclusive.

  MF_POPUP  - the new item is a handle to a pulldown menu which should
   be attached to an item on the menubar.
  MF_CHECKED - places a checkmark next to the item.
  MF_UNCHECKED - removes a checkmark from the item.
  MF_ENABLED - enables the item, allowing it to be selected.
  MF_DISABLED - disables the item.
  MF_SEPARATOR - places a horizontal dividing line at the specified position.
  MF_SHADOW - puts a shadow on the bottom right side of the menu.
   There are two global variables which you can access in order to
   change the change the character and attribute used to produce the
   shadow. These variables are :  BYTE chShadow   = '_'; BYTE attrShadow
   = 0x07;

  MF_HELP - used to define a menu item which will be used to invoke
   help. If this item is in the menubar (where it should be, according
   to CUA), then the item will be displayed right justified at the end
   of the menu bar. A vertical separator will be displayed to the left of
   it. The help item cannot be moved to by cursoring on the menubar;
   however, you can select it with the mouse or you can press the
   corresponding accelerator key to invoke it, When this item is
   selected, a WM_HELP message is sent to the winproc of the menu's
   parent window. wParam will contain the id of this menu item, so you
   can use the id to provide context-sensitive help.

Returns
  Nothing.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson