[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  ModifyMenu( hMenu, nID, nFlags, nPopHnd, xNewItem )-> <lSuccess>
------------------------------------------------------------------------------


 PARAMETER:

  <hMenu>     handle that identifies the menu to be modified

  <nID>       specifies the menu item to change

  <nFlags>   Specifies how to determine the position of the menu item :

              MF_BYCOMMAND   default, specifies that the nID parameter is
                             the menu-item identifier
              MF_BYPOSITION  Specifies that the nID parameter is the position
                             of the menu item ( first item is at position 0 )

             This parameter can be a combination of these values and one or
             or more of the listed MF_ .. values ( defined in MENU.PRG ),
             please press  Related Topics:  and select  AppendMenu  for 
             detailed informations about the flag constants

  <nNewItem>  specifies either the command identifier constant of the 
              modified menu item or, if the <nFlags> parameter is set to
              MF_POPUP, the menu handle of the pop-up menu. 

  <xNewItem>  is the content of the changed menu item. This Parameter can be
              a string, a handle to a bitmap, or a Flag depending on the
              value of the <nFlags> parameter :

              MF_STRING     Contains a prompt string
              MF_BITMAP     Contains a bitmap handle in its low-order word. 
              MF_OWNERDRAW  Contains an application-supplied 32-bit value


 RETURNS:

  <lSuccess> is TRUE if the function is successful


 DESCRIPTION:

  The ModifyMenu function changes an existing menu item. If it replaces
  a pop-up menu associated with the menu item, it destroys the old pop-up
  menu and frees the memory used by it.
  Whenever a menu changes (whether or not it is in a window that is
  displayed), the application should call DrawMenuBar.
  If you just change the attributes of an existing menu items, it is much
  faster to use CheckMenuItem or EnableMenuItem.



 SOURCE:  

  SOURCE\WINAPI\MENUS.C



See Also: AppendMenu InsertMenu DrawMenuBar CheckMenuItem EnableMenuItem
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson