LOADMENU

Top  Previous  Next

Syntax

INT = LOADMENU(win as WINDOW, identifier)

Description

Loads a menu from resources and sets the menu bar for the dialog or window.

Parameters

win - Window to set the newly loaded menu.

identifier - Resource name or numeric identifier.

Return value

The return value is 0 if the menu could not be loaded from the resources.

Remarks

See Also: LOADRESOURCE

Example usage

LOADMENU(mywnd,"mymenu")

Example resource:

BEGIN

  POPUP "&File"

  BEGIN

      MENUITEM "&New\tCtrl+N", 25

      MENUITEM "&Open...\tCtrl+O", 26

      MENUITEM SEPARATOR

      MENUITEM "P&rint Setup...", 27

      MENUITEM SEPARATOR

      MENUITEM "Recent File", 28

      MENUITEM SEPARATOR

      MENUITEM "E&xit", 29

  END

  POPUP "&Help"

  BEGIN

      MENUITEM "&About ChartCraft...", 30

  END

END