Erro na compilação

Re: Erro na compilação

Postby wmormar » Tue Nov 17, 2009 1:50 pm

jufer,

Recompilaste la lib con las versiones que tienes?

saludos
William, Morales
Saludos

méxico.sureste
User avatar
wmormar
 
Posts: 1074
Joined: Fri Oct 07, 2005 10:41 pm
Location: México

Re: Erro na compilação

Postby jufer » Tue Nov 17, 2009 6:58 pm

Hola William,

Muchas gracias por grande ayuda. Fuie espectacular.

Recompile las lib Tsbrow910 e tsbutt910 com meo proyecto.

Pero hay um pequeno error: Error:
Unresolved external '_HB_FUN_OLEUNINITIALIZE' referenced from C:\FIVETECH\XHARBOUR\LIB\TSBROW910.LIB|TSBROWSE

Puedes ayudar-me?

Saludos,

Jufer
jufer
 
Posts: 50
Joined: Wed Nov 16, 2005 7:10 pm
Location: Portugal

Re: Erro na compilação

Postby jufer » Thu Dec 03, 2009 11:22 pm

Estou a tentar compilar um exemplo de menu e está dando um erro:

Warning BASE/1004 Message not found: TMENU:L2007 Arguments: () (Quit)
Warning BASE/1004 Message not found: TMENU:L2007 Arguments: ()

Error at ...: TMDIFRAME:DRAWITEM(1133) in Module: .\source\classes\WINDOW.PRG
Called from : TMENU:MSGNOTFOUND(205) in Module: source\rtl\tobject.prg
Called from : TMENU:L2007(0) in Module: source\rtl\tobject.prg
Called from : TMDIFRAME:DRAWITEM(1133) in Module: .\source\classes\WINDOW.PRG
Called from : TMDIFRAME:HANDLEEVENT(0) in Module:
Called from : _FWH(3347) in Module: .\source\classes\WINDOW.PRG
Called from : SHOWWINDOW(0) in Module:
Called from : TMDIFRAME:ACTIVATE(949) in Module: .\source\classes\WINDOW.PRG
Called from : MAIN(67) in Module: C:\FIVETECH\MENUSAT\PRG\TESTMENU.PRG

Não sei como resolver este problema por isso peço a alguém que me ensine como resolver.

Muito obrigado

Jufer
jufer
 
Posts: 50
Joined: Wed Nov 16, 2005 7:10 pm
Location: Portugal

Re: Erro na compilação

Postby Antonio Linares » Sat Dec 05, 2009 7:46 am

Jufer,

> Estou a tentar compilar um exemplo de menu e está dando um erro

Puedes poner aqui el código fuente para que lo probemos ? gracias
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Erro na compilação

Postby jufer » Sun Dec 06, 2009 9:04 pm

Como pediste junto o código de TESTMENU.PRG, é um exeemplo de Arturo Tomayo:

#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 _3D

MENU oMenuNew POPUP ;
COLORMENU cClrMenu,cClrMenuTxt ;
COLORBMP cClrDegrFin,cClrDegrIni;
COLORSELECT cClrSelIni,cClrSelFin,cClrSelTxt ;
COLORSEPARATOR cClrSelBor

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

ACTIVATE WINDOW oWnd ;
ON INIT ( _colorMenu(ownd:hwnd,cColorPan,.t.) ) ;
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;
COLORMENU cColorPan,cClrMenuTxt ;
COLORBMP cClrDegrFin,cClrDegrIni;
COLORSELECT cClrDegrIni,cClrDegrFin,cClrSelTxt;
COLORSEPARATOR cClrDegrFin

MENUITEM "&Archivos" RESOURCE "new"

MENU ;
COLORMENU cClrMenu,cClrMenuTxt;
COLORBMP cClrDegrFin,cClrDegrIni;
COLORSELECT cClrSelIni,cClrSelFin,cClrSelTxt;
COLORSEPARATOR cClrSelBor

MENUITEM "&Nuevo item Mru" RESOURCE "new" ;
ACTION ( MsgGet( "Write something", "Whatever...", @cPrompt ),;
oMru1:Save( cPrompt ) )

MENUITEM "&Open" RESOURCE "Open" ;
ACTION ( _colorSUbMenu(ownd:hwnd,getsysColor(2)) )

MENUITEM "&New" RESOURCE "new" ;
ACTION ( _colorMenu(ownd:hwnd,RGB(163,194,245),.f.) )

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 ;
COLORMENU cClrMenu,cClrMenuTxt;
COLORBMP cClrDegrFin,cClrDegrIni;
COLORSELECT cClrSelIni,cClrSelFin,cClrSelTxt;
COLORSEPARATOR cClrSelBor

MENUITEM "&Nuevo item" RESOURCE "new" ;
ACTION ( _colorMenu(ownd:hwnd,RGB(163,194,245),.f.) ) //WHEN .F.
MENUITEM "&Open" RESOURCE "Open" ;
ACTION ( _colorSUbMenu(ownd:hwnd,getsysColor(2)) )

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 ;
COLORMENU cClrMenu,cClrMenuTxt;
COLORBMP cClrDegrFin,cClrDegrIni;
COLORSELECT cClrSelIni,cClrSelFin,cClrSelTxt;
COLORSEPARATOR cClrSelBor
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 ;
COLORMENU cClrMenu,cClrMenuTxt;
COLORBMP cClrDegrFin,cClrDegrIni;
COLORSELECT cClrSelIni,cClrSelFin,cClrSelTxt;
COLORSEPARATOR cClrSelBor
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 ;
ON INIT ( _colorMenu(owndChild:hwnd,cColorPan,.t.) );
valiD(msgyesno("¨Salimos?"))


return nil

//----------------------------------------------------------------------------//
procedure AppSys // Xbase++ requirement

return

//----------------------------------------------------------------------------//

Muchas gracias

Saludos

Jufer FWH9.10
jufer
 
Posts: 50
Joined: Wed Nov 16, 2005 7:10 pm
Location: Portugal

Re: Erro na compilação

Postby Antonio Linares » Sun Dec 06, 2009 9:19 pm

Jufer,

No tienes un ejemplo que use el menu estandard de FWH ? gracias
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Erro na compilação

Postby jufer » Sun Dec 06, 2009 9:58 pm

Não tenho um exemplo standard de FWH. Podes enviar-me??
Não posso usar este exemplo do TESTMENU.PRG??


Saludos

Jufer

FWH9.10
jufer
 
Posts: 50
Joined: Wed Nov 16, 2005 7:10 pm
Location: Portugal

Re: Erro na compilação

Postby Antonio Linares » Sun Dec 06, 2009 10:22 pm

Jufer,

Aqui tienes ese ejemplo modificado para usar la claúsula 2007 de los menus en FWH:
Code: Select all  Expand view

#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

//----------------------------------------------------------------------------//
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Erro na compilação

Postby jufer » Sun Dec 06, 2009 10:41 pm

Está dando um erro:

C:\FIVETECH\MENUSAT\PRG\TESTMENU.PRG(35) Error E0022 Invalid lvalue: 'Numeric'

Saludos

Jufer

FWH9.10
jufer
 
Posts: 50
Joined: Wed Nov 16, 2005 7:10 pm
Location: Portugal

Re: Erro na compilação

Postby Antonio Linares » Sun Dec 06, 2009 10:45 pm

Jufer,

Comprueba que estés usando menu.ch de FWH y no otro distinto.

Aqui funciona bien y se ve así:
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Erro na compilação

Postby jufer » Sun Dec 06, 2009 10:53 pm

Gracias por contestarme.

Coloquei:

#include "MENU.CH" (dá o mesmo erro)

"MENUS.CH" não existe em \FWH\include


Saludos

Jufer
jufer
 
Posts: 50
Joined: Wed Nov 16, 2005 7:10 pm
Location: Portugal

Re: Erro na compilação

Postby jufer » Sun Dec 06, 2009 10:58 pm

Perdoname.


Agora está a dar um warning:

C:\FIVETECH\MENUSAT\PRG\TESTMENU.PRG(86) Warning W0001 Ambiguous reference: 'MENUBAR'


Saludos

Jufer
jufer
 
Posts: 50
Joined: Wed Nov 16, 2005 7:10 pm
Location: Portugal

Re: Erro na compilação

Postby Antonio Linares » Sun Dec 06, 2009 11:08 pm

Jufer,

Faltaban unos cambios en el ejemplo. Ahora esta correcto:
Code: Select all  Expand view

#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

//----------------------------------------------------------------------------//
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Erro na compilação

Postby jufer » Sun Dec 06, 2009 11:18 pm

Agora compila correctamente e sem erro, simplesmente quando executa abre e fecha o programa sem fixar (mostrar) o display.

Saludos

Jufer
jufer
 
Posts: 50
Joined: Wed Nov 16, 2005 7:10 pm
Location: Portugal

Re: Erro na compilação

Postby Antonio Linares » Sun Dec 06, 2009 11:27 pm

Jufer,

Usa FWH\samples\buildx.bat para construirlo. Aqui se construye el EXE bien y funciona correctamente:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

PreviousNext

Return to All products support

Who is online

Users browsing this forum: No registered users and 2 guests