[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

Direct changes to a menu strip attached to a window may be made only after
the menu strip has been removed from the window.  Use the clearmenustrip()
function to remove the menu strip.  It may be added back to the window
after the changes are complete.

Major changes include such things as adding or removing menus, items and
sub-items; changing text or image data; and changing the placement of the
data.  These changes require the system to completely re-layout the menus.

An additional function, resetmenustrip(), is available to let the
application make small changes to the menus without the overhead of
setmenustrip().  only two things in the menu strip may be changed before a
call to ResetMenuStrip(), they are: changing the checked flag to turn
checkmarks on or off, and changing the itemenabled flag to enable/disable
menus, items or sub-items.

    BOOL ResetMenuStrip( struct Window *window, struct Menu *menu );

resetmenustrip() is called in place of setmenustrip(), and may only be
called on menus that were previously initialized with a call to
SetMenuStrip().  As with SetMenuStrip(), the menu strip must be removed
from the window before calling ResetMenuStrip().  Note that the window
used in the ResetMenuStrip() call does not have to be the same window to
which the menu was previously attached.  The window, however, must be on a
screen of the same mode to prevent the need for recalculating the layout
of the menu.

If the application wishes to attach a different menu strip to a window
that already has an existing menu strip, the application must call
clearmenustrip() before calling setmenustrip() with the new menu strip.

The flow of events for menu operations should be:

     1. openwindowtaglist().

     2. setmenustrip().

     3. Zero or more iterations of clearmenustrip() and
        setmenustrip()/resetmenustrip().

     4. clearmenustrip().

     5. closewindow().