Menu in a Dialog
Posted: Sat Feb 27, 2010 7:41 pm
How add a menu for a dialog ?
Someone can help me Thanks
Someone can help me Thanks
www.FiveTechSoft.com
https://fivetechsoft.com/forums/
Code: Select all
MenuItem "&Nacimiento" action ::nacimiento( 0 ) ACCELERATOR 0, VK_F5
Code: Select all
MenuItem "&Nacimiento" action ::nacimiento( 0 ) ACCELERATOR ACC_NORMAL, VK_F5
Code: Select all
#Include "FiveWin.Ch"
STATIC oWnd
FUNCTION Main()
LOCAL cTitle := "Teste de <F5>"
DEFINE WINDOW oWnd TITLE cTitle ;
MENU BuildMenu( ) MENUINFO 3 MDI
ACTIVATE WINDOW oWnd
RETURN NIL
FUNCTION BuildMenu()
LOCAL oMenu, oMenu1, oMenu2, oMenu3
MENU oMenu
MENUITEM oMenu1 PROMPT "&Guardar - <F2> " ;
ACTION Grabar() ;
ACCELERATOR 0, VK_F2 ;
MESSAGE "Guarda los dados"
MENUITEM Omenu2 PROMPT "&Clientes - <F5> "
MENU
MENUITEM oMenu2 PROMPT "&Clientes - <F5> " ;
ACTION Clientes() ;
ACCELERATOR 0, VK_F5 ; // funciona bien.
MESSAGE "Grabar Clientes"
ENDMENU
MENUITEM oMenu3 PROMPT "&Salida <Alt+S> " ;
ACTION( oWnd:End() ) ;
MESSAGE "Salida"
ENDMENU
RETURN( oMenu)
FUNCTION Grabar()
? [GRABAR]
RETURN NIL
FUNCTION Clientes()
? [CLIENTES]
RETURN NIL