Hello Antonio,
I was playing around with the menu again, but can't get it to work. I can set a new menu with a new window or diolog, but nothing happens when I click on a menuitem. I have created a little sample.
#include "FiveMac.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
BuildMenu()
DEFINE WINDOW oWnd TITLE "Hello world"
ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "Want to end ?" )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "Files" && in menu this gives 'testmenu'
MENU
MENUITEM "New..."
MENUITEM "Open..." ACTION New_Window()
SEPARATOR
MENUITEM "Exit..." ACTION oWnd:End()
ENDMENU
MENUITEM "Help"
MENU
MENUITEM "Wiki..."
MENUITEM "About..." ACTION MsgAbout( "(C) FiveTech Software 2012", "FiveMac" )
ENDMENU
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function New_Window()
local oDlg, oMenuDlg
DEFINE DIALOG oDlg
BuildMenuDlg()
ACTIVATE DIALOG oDlg
return nil
//----------------------------------------------------------------------------//
function BuildMenuDlg()
local oMenuDlg
MENU oMenuDlg
MENUITEM 'Dialog'
MENU
MENUITEM "help" ACTION MsgAbout( "Do we see this", "Test" )
ENDMENU
MENUITEM 'Test me'
MENU
MENUITEM "Click on me!" ACTION MsgInfo('show me')
ENDMENU
ENDMENU
return oMenuDlg
Also the first MenuItem is always the name of the app, even if i write something different on that place.