Perfect Enrico. Perfecto Enrico. Funciono de 1000. Gracias.
// BUILDX.BAT modificado:
Code: Select all | Expand
%hdir%\bin\harbour %1 /a /m /n /gc3 /w3 /es2 /i%fwh%\include;%hdir%\include /w0 -wb- /p %2 %3 > comp.log 2> warnings.log
Code: Select all | Expand
// C:\FWH..\SAMPLES\TUTOR04.PRG Modificado por Joao Santos/Sao Paulo/Brasil.
// Para David Barrio de Argentina. 16/11/2022
// We are going to build a PullDown menu and we are going to assign it
// to our main Window
// This example is the typical way of start building a FiveWin program
#include "FiveWin.ch"
STATIC oWnd
// MEMVAR ERONI // ASIM FUNCIONA ERONI - FiveWin Brasil.
FUNCTION Main()
LOCAL oIco, oBar, oBmp
// PRIVATE ERONI // ASSIM FUNCIONA ERONI
PUBLIC ERONI // ASSIM NAO FUNCIONA ERONI, USANDO /ES2 Entende?
hb_gcAll( .F. )
ERONI := [ENRICO ES EL MAXIMO] // Space( 30 )
// TUTOR04.prg( 25 ) Warning W0001 Ambiguous reference: 'ERONI'
? ERONI
// No cargar la aplicacion dos veces.
IF ISEXERUNNING( CFILENAME( hb_argv( 0 ) ) )
MsgInfo( "Tutor04.exe Já Está Rodando Nesta Máquina", "Tutor04.exe" )
SHOWWINDOW( FINDWINDOW( 0, "TUTOR04" ), 9 ) // Nombre tu .EXE
SETFOREGROUNDWINDOW( FINDWINDOW( 0, "TUTOR04" ) )
LIBERA_TUDO()
RETURN NIL
ENDIF
DEFINE ICON oIco FILE "..\icons\fax.ico"
DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 ;
TITLE "FiveWin sample" ;
MENU BuildMenu() ;
COLOR "B/W" ;
ICON oIco
DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\new.bmp" FLAT ;
ACTION MsgInfo( "New" ) ;
TOOLTIP "Creates a new document"
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\open.bmp" FLAT ;
ACTION MsgInfo( cGetFile( "*.*", "Select a document to open" ) ) ;
TOOLTIP "Opens a document" WHEN .F.
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT ;
ACTION MsgInfo( Time() ) TOOLTIP "Saves this document"
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
ACTION MsgInfo( "Prints this document" ) TOOLTIP "Print this document" GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\prop.bmp" FLAT ;
ACTION PrinterSetup() TOOLTIP "Setup the printer"
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\HelpInd.bmp" FLAT ;
ACTION MsgInfo( Version() ) TOOLTIP "A multiple lines" + ;
Chr( 13 ) + Chr( 10 ) + "tooltip!" GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Help.bmp" FLAT ;
ACTION MsgInfo( "fivewin power!" ) TOOLTIP "fivewin power!"
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
ACTION( oWnd:End(), LIBERA_TUDO() ) TOOLTIP "Exit this app" GROUP
DEFINE MESSAGE OF oWnd ;
PROMPT FWVERSION + " " + FWCOPYRIGHT ;
NOINSET CENTERED KEYBOARD DATE CLOCK
DEFINE BITMAP oBmp FILENAME "..\bitmaps\visual.bmp"
oWnd:bPainted = {| hDC | BmpTiled( hDC, oWnd, oBmp ) }
ACTIVATE WINDOW oWnd /* ;
VALID MsgYesNo( "Do you want to quit ?" ) */
RETURN NIL
FUNCTION BuildMenu()
LOCAL oMenu
MENU oMenu
MENUITEM "Information"
MENU
MENUITEM "&About..." ;
ACTION MsgInfo( FWDESCRIPTION ) ;
FILENAME "..\bitmaps\16x16\info.bmp"
SEPARATOR
MENUITEM "&End..." ;
ACTION( oWnd:End(), LIBERA_TUDO() ) ;
FILENAME "..\bitmaps\16x16\exit.bmp"
ENDMENU
MENUITEM "&Clients"
MENU
MENUITEM "&New..." ;
ACTION ( MsgStop( "New Clients" ), ;
oWnd:Say( 5, 5, "New Clients...", "GR+/G" ) ) ;
FILENAME "..\bitmaps\16x16\faces.bmp"
MENUITEM "&Modify..." ACTION MsgInfo( "Modif. Clients" ) ;
FILENAME "..\bitmaps\edit.bmp"
MENUITEM "&Delete..." ACTION MsgAlert( "Del Clients" ) ;
FILENAME "..\bitmaps\16x16\delete.bmp"
SEPARATOR
MENUITEM "&Browse..." ACTION MsgInfo( "Browse Clients" ) ;
FILENAME "..\bitmaps\16x16\browse.bmp"
ENDMENU
MENUITEM "&Utilities"
MENU
MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
FILENAME "..\bitmaps\16x16\calc.bmp"
MENUITEM "&Internet..." ;
ACTION WinExec( "start iexplore http://www.fivetech.com", 0 ) ;
FILENAME "..\bitmaps\16x16\explorer.bmp"
ENDMENU
ENDMENU
RETURN oMenu
// --Fecha o Programa Definitivamente e Libera a Memoria RAM.
FUNCTION LIBERA_TUDO()
IF File( "TUTOR04.LOG" )
DELETEFILE( "TUTOR04.LOG" )
ENDIF
dbCommitAll()
dbUnlockAll()
dbCloseAll()
FreeResources()
RELEASE ALL
SysRefresh()
hb_gcAll( .T. )
CLEAR MEMORY
PostQuitMessage( 0 )
QUIT
RETURN NIL
STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )
LOCAL nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
LOCAL nRow := 0, nCol := 0 // , n
LOCAL nBmpWidth := oBmp:nWidth(), nBmpHeight := oBmp:nHeight()
IF oBmp:hBitmap == 0
RETURN NIL
ENDIF
WHILE nRow < nHeight
nCol = 0
WHILE nCol < nWidth
PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
nCol += nBmpWidth
END
nRow += nBmpHeight
END
RETURN NIL
// FIN / END
Super Many thanks Enrico!
Regards, saludos.