jufer,
Recompilaste la lib con las versiones que tienes?
saludos
#include "FiveWin.ch"
#include "Splitter.ch"
static oWnd, oTree
static oMru1, oMru2, oMru3
Static cColorPan
//----------------------------------------------------------------------------//
function Main()
local oBar, oItem1, oItem2, oImageList, oSplit
local oMenuNew, oSay
Local cClrDegrIni,cClrDegrFin
Local cClrSelIni,cClrSelFin,cClrSelTxt,cClrSelBor
Local cClrMenu,cClrMenuTxt
cClrDegrFin := LightColor(60,getsysColor(2))
cClrDegrIni:= LightColor(230,cClrDegrFin)
cColorPan := LightColor(150,cClrDegrFin)
cClrMenu:= CLR_WHITE
cClrMenuTxt:= CLR_BLACK
cClrSelFin:= RGB(128,128,192)
cClrSelIni:= RGB(128,128,192)
cClrSelTxt:= CLR_BLACK
cClrSelBor:= CLR_BLACK
cClrDegrFin := LightColor(60,RGB(160,160,80))
cClrDegrIni:= LightColor(230,cClrDegrFin)
DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 MDI ;
TITLE " Ejemplo de Menus" // ; MENU BuildMenu()
DEFINE BUTTONBAR oBar SIZE 24, 27 OF oWnd 2007
MENU oMenuNew POPUP 2007
MENUITEM "New &Dialog" RESOURCE "Dialog"
MENUITEM "New &Bitmap"
MENUITEM "New &Bitmap"
MENUITEM "New &Bitmap"
SEPARATOR
MENUITEM "New &Icon" RESOURCE "Icon"
ENDMENU
DEFINE BUTTON OF oBar ;
TOOLTIP "New" NOBORDER RESOURCE "New" MENU oMenuNew
DEFINE BUTTON OF oBar ;
TOOLTIP "Open" NOBORDER RESOURCE "Open"
DEFINE BUTTON OF oBar ;
TOOLTIP "Save" NOBORDER RESOURCE "Save"
DEFINE BUTTON OF oBar GROUP ;
TOOLTIP "Exit" NOBORDER RESOURCE "Exit" ACTION oWnd:End()
SET MESSAGE OF oWnd TO "Ready" NOINSET CLOCK DATE KEYBOARD 2007
ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "Want to end ?" )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
Local cClrDegrIni,cClrDegrFin
Local cClrSelIni,cClrSelFin,cClrSelTxt,cClrSelBor
Local cClrMenu,cClrMenuTxt
Local cPrompt := " "
cClrDegrFin := LightColor(60,getsysColor(2))
cClrDegrIni:= LightColor(230,cClrDegrFin)
cColorPan := LightColor(150,cClrDegrFin)
cClrMenu:= GetSysColor(4) //RGB(224,255,255)
cClrMenuTxt:= CLR_BLACK
cClrSelFin:= RGB(255,238,194)
cClrSelIni:= RGB(255,238,194)
cClrSelTxt:= CLR_BLACK
cClrSelBor:= CLR_BLACK
MENU oMenu MENUBAR
MENUITEM "&Archivos" RESOURCE "new"
MENU
MENUITEM "&Nuevo item Mru" RESOURCE "new" ;
ACTION ( MsgGet( "Write something", "Whatever...", @cPrompt ),;
oMru1:Save( cPrompt ) )
MENUITEM "&Open" RESOURCE "Open"
MENUITEM "&New" RESOURCE "new"
MENUITEM "&Child" RESOURCE "new" ;
ACTION ( child1() )
MENUITEM "&New" RESOURCE "new itemmm" DISABLED;
MRU oMru1 ;
FILENAME ".\TestMru.ini" ; // .INI to manipulate. '\.' for local
SECTION "MRU-Customer" ; // The name of the INI section
ACTION MsgInfo( cMruItem ) ; // cMruItem is automatically provided
MESSAGE "Show this item..." ; // The message for all of them
SIZE 10
SEPARATOR
MENUITEM "&Limpiar la Lista MRU" ACTION oMru1:Clear()
MENUITEM "&Salve como..." RESOURCE "save"
cClrDegrFin := RGB(0,128,64) //LightColor(60,getsysColor(2))
cClrDegrIni:= LightColor(230,cClrDegrFin)
cClrMenu:= RGB(147,220,171)
cClrMenuTxt:= CLR_BLACK
cClrSelIni:= RGB(149,202,255)
cClrSelFin:= RGB(149,202,255)
cClrSelTxt:= CLR_BLACK
cClrSelBor:= CLR_BLACK
MENU
MENUITEM "&Nuevo item" RESOURCE "new"
MENUITEM "&Open" RESOURCE "Open"
MENUITEM "&New hdgjh sdagjhgsda" RESOURCE "new"
SEPARATOR
MENUITEM "&Nuevo proceso"
MENUITEM "&Abri"
MENUITEM "&Nuevo" CHECK
MENUITEM "&Open"
SEPARATOR
MENUITEM "&Salve como..." RESOURCE "save"
ENDMENU
SEPARATOR
MENUITEM "&Salir..." ACTION oWnd:End() RESOURCE "Exit"
ENDMENU
MENUITEM "&Editar"
cClrDegrFin := RGB(96,149,174)
cClrDegrIni := LightColor(230,cClrDegrFin)
cClrMenu := RGB(147,220,171)
cClrMenuTxt := CLR_BLACK
cClrSelIni := RGB(255,238,194)
cClrSelFin := RGB(255,238,294)
cClrSelTxt := CLR_BLACK
cClrSelBor := CLR_BLACK
MENU
MENUITEM "&Nuevo" CHECK
MENUITEM "&Open"
MENUITEM "&1" RESOURCE "save" DISABLED
MENUITEM "&2" WHEN .F.
MENUITEM "&3"
MENUITEM "&4"
MENUITEM "&5"
SEPARATOR
MENUITEM "&Salve como..." RESOURCE "save"
ENDMENU
MENUITEM "&Modifcar"
cClrDegrFin := RGB(96,149,174)
cClrDegrIni := RGB(96,149,174)
cClrMenu := CLR_YELLOW
cClrMenuTxt := CLR_BLACK
cClrSelIni := RGB(255,238,194)
cClrSelFin := RGB(255,238,294)
cClrSelTxt := CLR_BLACK
cClrSelBor := CLR_BLACK
MENU
MENUITEM "&Nuevo proceso"
MENUITEM "&Abri"
MENUITEM "&Nuevo" CHECK
MENUITEM "&Open"
SEPARATOR
MENUITEM "&Nuevo proceso"
MENUITEM "&Abri"
MENUITEM "&Nuevo" CHECK
MENUITEM "&Open"
SEPARATOR
MENUITEM "&Salve como..." RESOURCE "save"
ENDMENU
oMenu:AddHelp( "FiveWin Resources Editor", "FiveTech 1993-2000" )
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function Child1()
local oWndChild, oDlg, oBtn
local cName := "Testing..."
Local cAlias := "A"+ALLTRIM(cTempFile())
LOCAl oBar
DEFINE WINDOW oWndChild MDI; // OF oWnd ;
MENU BuildMenu() ;
DEFINE BUTTONBAR oBar OF oWndChild SIZE 24,26 3D
DEFINE BUTTON OF oBar TOOLTIP "Salir";
MESSAGE "Ventana de MDI" ACTION oWndChild:End()
// oWndChild:bKeyDown := {|nkey,nFlag| IIF(nKey == 27, oWndChild:End(), .T.)}
ACTIVATE WINDOW oWndChild ;
valiD(msgyesno("¨Salimos?"))
return nil
//----------------------------------------------------------------------------//
#include "FiveWin.ch"
#include "Splitter.ch"
static oWnd, oTree
static oMru1, oMru2, oMru3
Static cColorPan
//----------------------------------------------------------------------------//
function Main()
local oBar, oItem1, oItem2, oImageList, oSplit
local oMenuNew, oSay
Local cClrDegrIni,cClrDegrFin
Local cClrSelIni,cClrSelFin,cClrSelTxt,cClrSelBor
Local cClrMenu,cClrMenuTxt
cClrDegrFin := LightColor(60,getsysColor(2))
cClrDegrIni:= LightColor(230,cClrDegrFin)
cColorPan := LightColor(150,cClrDegrFin)
cClrMenu:= CLR_WHITE
cClrMenuTxt:= CLR_BLACK
cClrSelFin:= RGB(128,128,192)
cClrSelIni:= RGB(128,128,192)
cClrSelTxt:= CLR_BLACK
cClrSelBor:= CLR_BLACK
cClrDegrFin := LightColor(60,RGB(160,160,80))
cClrDegrIni:= LightColor(230,cClrDegrFin)
DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 MDI ;
TITLE " Ejemplo de Menus" MENU BuildMenu()
DEFINE BUTTONBAR oBar SIZE 24, 27 OF oWnd 2007
MENU oMenuNew POPUP 2007
MENUITEM "New &Dialog" RESOURCE "Dialog"
MENUITEM "New &Bitmap"
MENUITEM "New &Bitmap"
MENUITEM "New &Bitmap"
SEPARATOR
MENUITEM "New &Icon" RESOURCE "Icon"
ENDMENU
DEFINE BUTTON OF oBar ;
TOOLTIP "New" NOBORDER RESOURCE "New" MENU oMenuNew
DEFINE BUTTON OF oBar ;
TOOLTIP "Open" NOBORDER RESOURCE "Open"
DEFINE BUTTON OF oBar ;
TOOLTIP "Save" NOBORDER RESOURCE "Save"
DEFINE BUTTON OF oBar GROUP ;
TOOLTIP "Exit" NOBORDER RESOURCE "Exit" ACTION oWnd:End()
SET MESSAGE OF oWnd TO "Ready" NOINSET CLOCK DATE KEYBOARD 2007
ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "Want to end ?" )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
Local cClrDegrIni,cClrDegrFin
Local cClrSelIni,cClrSelFin,cClrSelTxt,cClrSelBor
Local cClrMenu,cClrMenuTxt
Local cPrompt := " "
cClrDegrFin := LightColor(60,getsysColor(2))
cClrDegrIni:= LightColor(230,cClrDegrFin)
cColorPan := LightColor(150,cClrDegrFin)
cClrMenu:= GetSysColor(4) //RGB(224,255,255)
cClrMenuTxt:= CLR_BLACK
cClrSelFin:= RGB(255,238,194)
cClrSelIni:= RGB(255,238,194)
cClrSelTxt:= CLR_BLACK
cClrSelBor:= CLR_BLACK
MENU oMenu 2007
MENUITEM "&Archivos" RESOURCE "new"
MENU
MENUITEM "&Nuevo item Mru" RESOURCE "new" ;
ACTION ( MsgGet( "Write something", "Whatever...", @cPrompt ),;
oMru1:Save( cPrompt ) )
MENUITEM "&Open" RESOURCE "Open"
MENUITEM "&New" RESOURCE "new"
MENUITEM "&Child" RESOURCE "new" ;
ACTION ( child1() )
MENUITEM "&New" RESOURCE "new itemmm" DISABLED;
MRU oMru1 ;
FILENAME ".\TestMru.ini" ; // .INI to manipulate. '\.' for local
SECTION "MRU-Customer" ; // The name of the INI section
ACTION MsgInfo( cMruItem ) ; // cMruItem is automatically provided
MESSAGE "Show this item..." ; // The message for all of them
SIZE 10
SEPARATOR
MENUITEM "&Limpiar la Lista MRU" ACTION oMru1:Clear()
MENUITEM "&Salve como..." RESOURCE "save"
cClrDegrFin := RGB(0,128,64) //LightColor(60,getsysColor(2))
cClrDegrIni:= LightColor(230,cClrDegrFin)
cClrMenu:= RGB(147,220,171)
cClrMenuTxt:= CLR_BLACK
cClrSelIni:= RGB(149,202,255)
cClrSelFin:= RGB(149,202,255)
cClrSelTxt:= CLR_BLACK
cClrSelBor:= CLR_BLACK
MENU
MENUITEM "&Nuevo item" RESOURCE "new"
MENUITEM "&Open" RESOURCE "Open"
MENUITEM "&New hdgjh sdagjhgsda" RESOURCE "new"
SEPARATOR
MENUITEM "&Nuevo proceso"
MENUITEM "&Abri"
MENUITEM "&Nuevo" CHECK
MENUITEM "&Open"
SEPARATOR
MENUITEM "&Salve como..." RESOURCE "save"
ENDMENU
SEPARATOR
MENUITEM "&Salir..." ACTION oWnd:End() RESOURCE "Exit"
ENDMENU
MENUITEM "&Editar"
cClrDegrFin := RGB(96,149,174)
cClrDegrIni := LightColor(230,cClrDegrFin)
cClrMenu := RGB(147,220,171)
cClrMenuTxt := CLR_BLACK
cClrSelIni := RGB(255,238,194)
cClrSelFin := RGB(255,238,294)
cClrSelTxt := CLR_BLACK
cClrSelBor := CLR_BLACK
MENU
MENUITEM "&Nuevo" CHECK
MENUITEM "&Open"
MENUITEM "&1" RESOURCE "save" DISABLED
MENUITEM "&2" WHEN .F.
MENUITEM "&3"
MENUITEM "&4"
MENUITEM "&5"
SEPARATOR
MENUITEM "&Salve como..." RESOURCE "save"
ENDMENU
MENUITEM "&Modifcar"
cClrDegrFin := RGB(96,149,174)
cClrDegrIni := RGB(96,149,174)
cClrMenu := CLR_YELLOW
cClrMenuTxt := CLR_BLACK
cClrSelIni := RGB(255,238,194)
cClrSelFin := RGB(255,238,294)
cClrSelTxt := CLR_BLACK
cClrSelBor := CLR_BLACK
MENU
MENUITEM "&Nuevo proceso"
MENUITEM "&Abri"
MENUITEM "&Nuevo" CHECK
MENUITEM "&Open"
SEPARATOR
MENUITEM "&Nuevo proceso"
MENUITEM "&Abri"
MENUITEM "&Nuevo" CHECK
MENUITEM "&Open"
SEPARATOR
MENUITEM "&Salve como..." RESOURCE "save"
ENDMENU
oMenu:AddHelp( "FiveWin Resources Editor", "FiveTech 1993-2000" )
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function Child1()
local oWndChild, oDlg, oBtn
local cName := "Testing..."
Local cAlias := "A"+ALLTRIM(cTempFile())
LOCAl oBar
DEFINE WINDOW oWndChild MDI; // OF oWnd ;
MENU BuildMenu() ;
DEFINE BUTTONBAR oBar OF oWndChild SIZE 24,26 3D
DEFINE BUTTON OF oBar TOOLTIP "Salir";
MESSAGE "Ventana de MDI" ACTION oWndChild:End()
// oWndChild:bKeyDown := {|nkey,nFlag| IIF(nKey == 27, oWndChild:End(), .T.)}
ACTIVATE WINDOW oWndChild ;
valiD(msgyesno("¨Salimos?"))
return nil
//----------------------------------------------------------------------------//
Return to All products support
Users browsing this forum: No registered users and 6 guests