[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

     4. ClearMenuStrip().

     5. CloseWindow().