#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
#include "FiveMac.ch"
static oWnd
static MenuParent
//----------------------------------------------------------------------------//
function Main()
BuildMenu()
DEFINE WINDOW oWnd TITLE "Hello world"
ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "Want to end ?" )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
MENU MenuParent
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 MenuParent
//----------------------------------------------------------------------------//
function New_Window()
local oDlg, oMenuDlg
DEFINE DIALOG oDlg
BuildMenuDlg()
ACTIVATE DIALOG oDlg ;
VALID ( MenuParent:activate(),.t. )
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
Return to FiveMac / FivePhone (iPhone, iPad)
Users browsing this forum: No registered users and 13 guests