]]>PAUL SIMM wrote:Is there any way I can change the error message "Lost Connection to MySql server during query" to only log the error to a text file end return false to the calling fintion. At the moment the error is a MsgInfo and the process which is automatic with a Timer blocks the aplication.
This code do'snt do this
oCon:Execute(cQwery)
if oCon:nError != 0
MSGWAIT("Error executando query","Line 10961")
oCon:Close()
RETURN .F.
endif
I used to work with Eagle I could define what to do when an MySql error occured with this funcion.
FUNCTION MyMsgError(cArg1,cArg2 )
MSGWAIT(cArg1,cArg2+" Web2Reco")
YMENSCEN(cArg1+ " "+cArg2) //log error
RETURN NIL
******************************************************************************
]]>PAUL SIMM wrote:Is there any way I can change the error message "Lost Connection to MySql server during query" to only log the error to a text file end return false to the calling fintion. At the moment the error is a MsgInfo and the process which is automatic with a Timer blocks the aplication.
This code do'snt do this
oCon:Execute(cQwery)
if oCon:nError != 0
MSGWAIT("Error executando query","Line 10961")
oCon:Close()
RETURN .F.
endif
I used to work with Eagle I could define what to do when an MySql error occured with this funcion.
FUNCTION MyMsgError(cArg1,cArg2 )
MSGWAIT(cArg1,cArg2+" Web2Reco")
YMENSCEN(cArg1+ " "+cArg2) //log error
RETURN NIL
******************************************************************************
Code: Select all | Expand
#include "fivewin.ch"
function main
CreateAndRunPrinterScript()
CreateAndRunPrinterInfoScript()
return nil
//----------------------------------------------------------------------------//
FUNCTION CreateAndRunPrinterScript()
LOCAL cScript, cOutputFile := ".\psfiles\get_printers.ps1"
LOCAL cResultFile := ".\psfiles\printers_output.txt"
LOCAL aPrinters := ""
// PowerShell-Befehle als Text zusammenstellen
cScript := '$printers = Get-ChildItem -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Printers"' + CRLF
cScript += '$output = @()' + CRLF
cScript += 'foreach ($printer in $printers) {' + CRLF
cScript += ' $printerName = $printer.PSChildName' + CRLF
cScript += ' $output += $printerName' + CRLF
cScript += '}' + CRLF
cScript += '$output | Out-File -FilePath "' + cResultFile + '" -Encoding utf8' + CRLF
// PowerShell-Skript in eine Datei schreiben
MEMOWRIT(cOutputFile, cScript)
// PowerShell-Skript ausführen
WAITRUN("powershell.exe -ExecutionPolicy Bypass -File " + cOutputFile)
// Ergebnis anzeigen
IF FILE(cResultFile)
aPrinters := MEMOREAD(cResultFile)
msgInfo( aPrinters )
ELSE
? "Keine Ausgabe gefunden."
ENDIF
RETURN NIL
FUNCTION CreateAndRunPrinterInfoScript()
LOCAL cScript, cOutputFile := ".\psfiles\get_printer_info.ps1"
LOCAL cResultFile := ".\psfiles\printer_info_output.csv"
// PowerShell-Skript zusammenstellen
cScript := 'Get-Printer | Select-Object Name, DriverName, PortName, ShareName, PrinterStatus, Default | ' + ;
'Export-Csv -Path "' + cResultFile + '" -NoTypeInformation -Encoding UTF8' + CRLF
// PowerShell-Skript in eine Datei schreiben
MEMOWRIT(cOutputFile, cScript)
// PowerShell-Skript ausführen
WAITRUN("powershell.exe -ExecutionPolicy Bypass -File " + cOutputFile)
// Ergebnis anzeigen
IF FILE(cResultFile)
msginfo( MEMOREAD(cResultFile) )
ELSE
? "Keine Druckerinformationen gefunden."
ENDIF
RETURN NIL
Code: Select all | Expand
#include "fivewin.ch"
function main
CreateAndRunPrinterScript()
CreateAndRunPrinterInfoScript()
return nil
//----------------------------------------------------------------------------//
FUNCTION CreateAndRunPrinterScript()
LOCAL cScript, cOutputFile := ".\psfiles\get_printers.ps1"
LOCAL cResultFile := ".\psfiles\printers_output.txt"
LOCAL aPrinters := ""
// PowerShell-Befehle als Text zusammenstellen
cScript := '$printers = Get-ChildItem -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Printers"' + CRLF
cScript += '$output = @()' + CRLF
cScript += 'foreach ($printer in $printers) {' + CRLF
cScript += ' $printerName = $printer.PSChildName' + CRLF
cScript += ' $output += $printerName' + CRLF
cScript += '}' + CRLF
cScript += '$output | Out-File -FilePath "' + cResultFile + '" -Encoding utf8' + CRLF
// PowerShell-Skript in eine Datei schreiben
MEMOWRIT(cOutputFile, cScript)
// PowerShell-Skript ausführen
WAITRUN("powershell.exe -ExecutionPolicy Bypass -File " + cOutputFile)
// Ergebnis anzeigen
IF FILE(cResultFile)
aPrinters := MEMOREAD(cResultFile)
msgInfo( aPrinters )
ELSE
? "Keine Ausgabe gefunden."
ENDIF
RETURN NIL
FUNCTION CreateAndRunPrinterInfoScript()
LOCAL cScript, cOutputFile := ".\psfiles\get_printer_info.ps1"
LOCAL cResultFile := ".\psfiles\printer_info_output.csv"
// PowerShell-Skript zusammenstellen
cScript := 'Get-Printer | Select-Object Name, DriverName, PortName, ShareName, PrinterStatus, Default | ' + ;
'Export-Csv -Path "' + cResultFile + '" -NoTypeInformation -Encoding UTF8' + CRLF
// PowerShell-Skript in eine Datei schreiben
MEMOWRIT(cOutputFile, cScript)
// PowerShell-Skript ausführen
WAITRUN("powershell.exe -ExecutionPolicy Bypass -File " + cOutputFile)
// Ergebnis anzeigen
IF FILE(cResultFile)
msginfo( MEMOREAD(cResultFile) )
ELSE
? "Keine Druckerinformationen gefunden."
ENDIF
RETURN NIL
Code: Select all | Expand
LOCAL cScript, cOutputFile := ".\psfiles\get_printers.ps1"
LOCAL cResultFile := ".\psfiles\printers_output.txt"
LOCAL cScript, cOutputFile := ".\psfiles\get_printer_info.ps1"
LOCAL cResultFile := ".\psfiles\printer_info_output.csv"
Code: Select all | Expand
LOCAL cScript, cOutputFile := ".\psfiles\get_printers.ps1"
LOCAL cResultFile := ".\psfiles\printers_output.txt"
LOCAL cScript, cOutputFile := ".\psfiles\get_printer_info.ps1"
LOCAL cResultFile := ".\psfiles\printer_info_output.csv"
Code: Select all | Expand
#include "resource.h"
IDD_CARTOLERIA_DIALOG DIALOGEX 0, 0, 400, 300
STYLE WS_CAPTION | WS_SYSMENU
CAPTION "Registry"
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Operational Headquarters",IDC_STATIC,10,10,380,150
LTEXT "Code:",IDC_STATIC,20,30,40,10
EDITTEXT IDC_CODE,70,30,50,14,ES_AUTOHSCROLL
LTEXT "Name:",IDC_STATIC,20,50,60,10
EDITTEXT IDC_NAME,70,50,200,14,ES_AUTOHSCROLL
LTEXT "Address:",IDC_STATIC,20,70,40,10
EDITTEXT IDC_ADDRESS,70,70,200,14,ES_AUTOHSCROLL
LTEXT "ZIP Code:",IDC_STATIC,20,90,40,10
EDITTEXT IDC_ZIP_CODE,70,90,50,14,ES_AUTOHSCROLL
LTEXT "City:",IDC_STATIC,130,90,40,10
EDITTEXT IDC_CITY,170,90,100,14,ES_AUTOHSCROLL
LTEXT "Country:",IDC_STATIC,20,110,40,10
COMBOBOX IDC_COUNTRY,70,110,100,14,CBS_DROPDOWNLIST | WS_VSCROLL
LTEXT "Phone:",IDC_STATIC,20,140,50,10
EDITTEXT IDC_PHONE,70,140,100,14,ES_AUTOHSCROLL
LTEXT "Mobile:",IDC_STATIC,180,140,40,10
EDITTEXT IDC_MOBILE,220,140,100,14,ES_AUTOHSCROLL
LTEXT "Email:",IDC_STATIC,20,160,50,10
EDITTEXT IDC_EMAIL,70,160,150,14,ES_AUTOHSCROLL
LTEXT "VAT Number:",IDC_STATIC,20,180,50,10
EDITTEXT IDC_VAT_NUMBER,70,180,100,14,ES_AUTOHSCROLL
PUSHBUTTON "Add Address...",IDC_BTN_ADD_ADDRESS,250,100,120,14
PUSHBUTTON "Attach...",IDC_BTN_ATTACH,250,200,120,14
PUSHBUTTON "Documents",IDC_BTN_DOCUMENTS,250,220,120,14
PUSHBUTTON "Payments",IDC_BTN_PAYMENTS,250,240,120,14
END
Code: Select all | Expand
#ifndef RESOURCE_H
#define RESOURCE_H
// Dialog ID
#define IDD_CARTOLERIA_DIALOG 101
// Control IDs
#define IDC_CODE 1001
#define IDC_NAME 1002
#define IDC_ADDRESS 1003
#define IDC_ZIP_CODE 1004
#define IDC_CITY 1005
#define IDC_COUNTRY 1006
#define IDC_PHONE 1007
#define IDC_MOBILE 1008
#define IDC_EMAIL 1009
#define IDC_VAT_NUMBER 1010
#define IDC_BTN_ADD_ADDRESS 1101
#define IDC_BTN_ATTACH 1102
#define IDC_BTN_DOCUMENTS 1103
#define IDC_BTN_PAYMENTS 1104
#endif // RESOURCE_H
Code: Select all | Expand
#include "resource.h"
IDD_CARTOLERIA_DIALOG DIALOGEX 0, 0, 400, 300
STYLE WS_CAPTION | WS_SYSMENU
CAPTION "Registry"
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Operational Headquarters",IDC_STATIC,10,10,380,150
LTEXT "Code:",IDC_STATIC,20,30,40,10
EDITTEXT IDC_CODE,70,30,50,14,ES_AUTOHSCROLL
LTEXT "Name:",IDC_STATIC,20,50,60,10
EDITTEXT IDC_NAME,70,50,200,14,ES_AUTOHSCROLL
LTEXT "Address:",IDC_STATIC,20,70,40,10
EDITTEXT IDC_ADDRESS,70,70,200,14,ES_AUTOHSCROLL
LTEXT "ZIP Code:",IDC_STATIC,20,90,40,10
EDITTEXT IDC_ZIP_CODE,70,90,50,14,ES_AUTOHSCROLL
LTEXT "City:",IDC_STATIC,130,90,40,10
EDITTEXT IDC_CITY,170,90,100,14,ES_AUTOHSCROLL
LTEXT "Country:",IDC_STATIC,20,110,40,10
COMBOBOX IDC_COUNTRY,70,110,100,14,CBS_DROPDOWNLIST | WS_VSCROLL
LTEXT "Phone:",IDC_STATIC,20,140,50,10
EDITTEXT IDC_PHONE,70,140,100,14,ES_AUTOHSCROLL
LTEXT "Mobile:",IDC_STATIC,180,140,40,10
EDITTEXT IDC_MOBILE,220,140,100,14,ES_AUTOHSCROLL
LTEXT "Email:",IDC_STATIC,20,160,50,10
EDITTEXT IDC_EMAIL,70,160,150,14,ES_AUTOHSCROLL
LTEXT "VAT Number:",IDC_STATIC,20,180,50,10
EDITTEXT IDC_VAT_NUMBER,70,180,100,14,ES_AUTOHSCROLL
PUSHBUTTON "Add Address...",IDC_BTN_ADD_ADDRESS,250,100,120,14
PUSHBUTTON "Attach...",IDC_BTN_ATTACH,250,200,120,14
PUSHBUTTON "Documents",IDC_BTN_DOCUMENTS,250,220,120,14
PUSHBUTTON "Payments",IDC_BTN_PAYMENTS,250,240,120,14
END
Code: Select all | Expand
#ifndef RESOURCE_H
#define RESOURCE_H
// Dialog ID
#define IDD_CARTOLERIA_DIALOG 101
// Control IDs
#define IDC_CODE 1001
#define IDC_NAME 1002
#define IDC_ADDRESS 1003
#define IDC_ZIP_CODE 1004
#define IDC_CITY 1005
#define IDC_COUNTRY 1006
#define IDC_PHONE 1007
#define IDC_MOBILE 1008
#define IDC_EMAIL 1009
#define IDC_VAT_NUMBER 1010
#define IDC_BTN_ADD_ADDRESS 1101
#define IDC_BTN_ATTACH 1102
#define IDC_BTN_DOCUMENTS 1103
#define IDC_BTN_PAYMENTS 1104
#endif // RESOURCE_H
Code: Select all | Expand
#include "FiveWin.ch"
#include "resource.h"
FUNCTION Main()
LOCAL oDlg
LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)
DEFINE DIALOG oDlg RESOURCE IDD_CARTOLERIA_DIALOG
REDEFINE GET oGetCode VAR cCode ID IDC_CODE OF oDlg
REDEFINE GET oGetName VAR cName ID IDC_NAME OF oDlg
REDEFINE GET oGetAddress VAR cAddress ID IDC_ADDRESS OF oDlg
REDEFINE GET oGetZipCode VAR cZipCode ID IDC_ZIP_CODE OF oDlg
REDEFINE GET oGetCity VAR cCity ID IDC_CITY OF oDlg
REDEFINE COMBOBOX oCbxCountry VAR cCountry ID IDC_COUNTRY OF oDlg
REDEFINE GET oGetPhone VAR cPhone ID IDC_PHONE OF oDlg
REDEFINE GET oGetMobile VAR cMobile ID IDC_MOBILE OF oDlg
REDEFINE GET oGetEmail VAR cEmail ID IDC_EMAIL OF oDlg
REDEFINE GET oGetVAT VAR cVAT ID IDC_VAT_NUMBER OF oDlg
REDEFINE BUTTON oBtnAddAddress ID IDC_BTN_ADD_ADDRESS OF oDlg ACTION MsgInfo("Add Address clicked")
REDEFINE BUTTON oBtnAttach ID IDC_BTN_ATTACH OF oDlg ACTION MsgInfo("Attach clicked")
REDEFINE BUTTON oBtnDocuments ID IDC_BTN_DOCUMENTS OF oDlg ACTION MsgInfo("Documents clicked")
REDEFINE BUTTON oBtnPayments ID IDC_BTN_PAYMENTS OF oDlg ACTION MsgInfo("Payments clicked")
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
Code: Select all | Expand
#include "FiveWin.ch"
#include "resource.h"
FUNCTION Main()
LOCAL oDlg
LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)
DEFINE DIALOG oDlg RESOURCE IDD_CARTOLERIA_DIALOG
REDEFINE GET oGetCode VAR cCode ID IDC_CODE OF oDlg
REDEFINE GET oGetName VAR cName ID IDC_NAME OF oDlg
REDEFINE GET oGetAddress VAR cAddress ID IDC_ADDRESS OF oDlg
REDEFINE GET oGetZipCode VAR cZipCode ID IDC_ZIP_CODE OF oDlg
REDEFINE GET oGetCity VAR cCity ID IDC_CITY OF oDlg
REDEFINE COMBOBOX oCbxCountry VAR cCountry ID IDC_COUNTRY OF oDlg
REDEFINE GET oGetPhone VAR cPhone ID IDC_PHONE OF oDlg
REDEFINE GET oGetMobile VAR cMobile ID IDC_MOBILE OF oDlg
REDEFINE GET oGetEmail VAR cEmail ID IDC_EMAIL OF oDlg
REDEFINE GET oGetVAT VAR cVAT ID IDC_VAT_NUMBER OF oDlg
REDEFINE BUTTON oBtnAddAddress ID IDC_BTN_ADD_ADDRESS OF oDlg ACTION MsgInfo("Add Address clicked")
REDEFINE BUTTON oBtnAttach ID IDC_BTN_ATTACH OF oDlg ACTION MsgInfo("Attach clicked")
REDEFINE BUTTON oBtnDocuments ID IDC_BTN_DOCUMENTS OF oDlg ACTION MsgInfo("Documents clicked")
REDEFINE BUTTON oBtnPayments ID IDC_BTN_PAYMENTS OF oDlg ACTION MsgInfo("Payments clicked")
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
Code: Select all | Expand
#include "FiveWin.ch"
#include "resource.h"
FUNCTION Main()
LOCAL oDlg
LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)
DEFINE DIALOG oDlg TITLE "Cartoleria Mazzini" FROM 0, 0 TO 25, 70 PIXEL
@ 1, 1 SAY "Code:" OF oDlg
@ 1, 10 GET oGetCode VAR cCode OF oDlg
@ 2, 1 SAY "Name:" OF oDlg
@ 2, 10 GET oGetName VAR cName OF oDlg
@ 3, 1 SAY "Address:" OF oDlg
@ 3, 10 GET oGetAddress VAR cAddress OF oDlg
@ 4, 1 SAY "ZIP Code:" OF oDlg
@ 4, 10 GET oGetZipCode VAR cZipCode OF oDlg
@ 5, 1 SAY "City:" OF oDlg
@ 5, 10 GET oGetCity VAR cCity OF oDlg
@ 6, 1 SAY "Country:" OF oDlg
@ 6, 10 COMBOBOX oCbxCountry VAR cCountry ITEMS {"Italy", "San Marino", "Other"} OF oDlg
@ 7, 1 SAY "Phone:" OF oDlg
@ 7, 10 GET oGetPhone VAR cPhone OF oDlg
@ 8, 1 SAY "Mobile:" OF oDlg
@ 8, 10 GET oGetMobile VAR cMobile OF oDlg
@ 9, 1 SAY "Email:" OF oDlg
@ 9, 10 GET oGetEmail VAR cEmail OF oDlg
@ 10, 1 SAY "VAT Number:" OF oDlg
@ 10, 10 GET oGetVAT VAR cVAT OF oDlg
@ 12, 10 BUTTON oBtnAddAddress PROMPT "Add Address" ACTION MsgInfo("Add Address clicked") OF oDlg
@ 12, 25 BUTTON oBtnAttach PROMPT "Attach" ACTION MsgInfo("Attach clicked") OF oDlg
@ 13, 10 BUTTON oBtnDocuments PROMPT "Documents" ACTION MsgInfo("Documents clicked") OF oDlg
@ 13, 25 BUTTON oBtnPayments PROMPT "Payments" ACTION MsgInfo("Payments clicked") OF oDlg
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
Code: Select all | Expand
#include "FiveWin.ch"
#include "resource.h"
FUNCTION Main()
LOCAL oDlg
LOCAL oGetCode, oGetName, oGetAddress, oGetZipCode, oGetCity
LOCAL oCbxCountry, oGetPhone, oGetMobile, oGetEmail, oGetVAT
LOCAL oBtnAddAddress, oBtnAttach, oBtnDocuments, oBtnPayments
LOCAL cCode := Space(10), cName := Space(30), cAddress := Space(50)
LOCAL cZipCode := Space(10), cCity := Space(30), cCountry := Space(20)
LOCAL cPhone := Space(15), cMobile := Space(15), cEmail := Space(40), cVAT := Space(15)
DEFINE DIALOG oDlg TITLE "Cartoleria Mazzini" FROM 0, 0 TO 25, 70 PIXEL
@ 1, 1 SAY "Code:" OF oDlg
@ 1, 10 GET oGetCode VAR cCode OF oDlg
@ 2, 1 SAY "Name:" OF oDlg
@ 2, 10 GET oGetName VAR cName OF oDlg
@ 3, 1 SAY "Address:" OF oDlg
@ 3, 10 GET oGetAddress VAR cAddress OF oDlg
@ 4, 1 SAY "ZIP Code:" OF oDlg
@ 4, 10 GET oGetZipCode VAR cZipCode OF oDlg
@ 5, 1 SAY "City:" OF oDlg
@ 5, 10 GET oGetCity VAR cCity OF oDlg
@ 6, 1 SAY "Country:" OF oDlg
@ 6, 10 COMBOBOX oCbxCountry VAR cCountry ITEMS {"Italy", "San Marino", "Other"} OF oDlg
@ 7, 1 SAY "Phone:" OF oDlg
@ 7, 10 GET oGetPhone VAR cPhone OF oDlg
@ 8, 1 SAY "Mobile:" OF oDlg
@ 8, 10 GET oGetMobile VAR cMobile OF oDlg
@ 9, 1 SAY "Email:" OF oDlg
@ 9, 10 GET oGetEmail VAR cEmail OF oDlg
@ 10, 1 SAY "VAT Number:" OF oDlg
@ 10, 10 GET oGetVAT VAR cVAT OF oDlg
@ 12, 10 BUTTON oBtnAddAddress PROMPT "Add Address" ACTION MsgInfo("Add Address clicked") OF oDlg
@ 12, 25 BUTTON oBtnAttach PROMPT "Attach" ACTION MsgInfo("Attach clicked") OF oDlg
@ 13, 10 BUTTON oBtnDocuments PROMPT "Documents" ACTION MsgInfo("Documents clicked") OF oDlg
@ 13, 25 BUTTON oBtnPayments PROMPT "Payments" ACTION MsgInfo("Payments clicked") OF oDlg
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, cTest := Space( 10 )
DEFINE DIALOG oDlg TITLE "Test"
@ 2, 2 GET cTest OF oDlg
ACTIVATE DIALOG oDlg CENTERED ;
ON CLICK XBrowser( oDlg )
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, cTest := Space( 10 )
DEFINE DIALOG oDlg TITLE "Test"
@ 2, 2 GET cTest OF oDlg
ACTIVATE DIALOG oDlg CENTERED ;
ON CLICK XBrowser( oDlg )
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, cTest := Space( 10 )
DEFINE DIALOG oDlg TITLE "Test"
@ 2, 2 GET oGet Var cTest OF oDlg
ACTIVATE DIALOG oDlg CENTERED ;
ON CLICK XBrowser( oGet )
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, cTest := Space( 10 )
DEFINE DIALOG oDlg TITLE "Test"
@ 2, 2 GET oGet Var cTest OF oDlg
ACTIVATE DIALOG oDlg CENTERED ;
ON CLICK XBrowser( oGet )
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oGet, cTest := Space( 10 )
DEFINE DIALOG oDlg TITLE "Test"
@ 2, 2 GET oGet VAR cTest OF oDlg
ACTIVATE DIALOG oDlg CENTERED ;
ON CLICK XBrowser( oGet )
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oGet, cTest := Space( 10 )
DEFINE DIALOG oDlg TITLE "Test"
@ 2, 2 GET oGet VAR cTest OF oDlg
ACTIVATE DIALOG oDlg CENTERED ;
ON CLICK XBrowser( oGet )
return nil
Code: Select all | Expand
oSheet:Range( "A1:C1" ):Value := { 1, 2, 3 } //WORKS.
oSheet:Range( "A1:C2" ):Value := { {1,2,3},{4,5,6} } // FAILS, though works with VB <<<<<<<<<<<<<<< this problem
this problem has been resolved?Code: Select all | Expand
oSheet:Range( "A1:C1" ):Value := { 1, 2, 3 } //WORKS.
oSheet:Range( "A1:C2" ):Value := { {1,2,3},{4,5,6} } // FAILS, though works with VB <<<<<<<<<<<<<<< this problem
this problem has been resolved?Code: Select all | Expand
WITH OBJECT oBrw
:AddBitmap( { "SOR_TUP","SOR_TDW" } )
WITH OBJECT oBrw:aCols[1]
:nHeadBmpNo := 1
:nHeadBmpAlign := AL_LEFT
END
Code: Select all | Expand
WITH OBJECT oBrw
:AddBitmap( { "SOR_TUP","SOR_TDW" } )
WITH OBJECT oBrw:aCols[1]
:nHeadBmpNo := 1
:nHeadBmpAlign := AL_LEFT
END
Code: Select all | Expand
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
function Main()
local oChatgpt := TOpenAI():New()
oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
MsgInfo( oChatgpt:GetValue() )
oChatgpt:End()
return nil
//----------------------------------------------------------------------------//
CLASS TOpenAI
DATA cKey INIT ""
DATA cModel INIT "gpt-4o-mini"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD SendImageURL( cImageUrl )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TOpenAI
if Empty( cKey )
::cKey = GetEnv( "OPENAI_API_KEY" )
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.openai.com/v1/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TOpenAI
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TOpenAI
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD SendImageURL( cImageUrl ) CLASS TOpenAI
local aHeaders, cJson, hRequest := { => }, hMessage := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hRequest, "model", ::cModel )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What's in this image?" }, ;
{ "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )
hRequest[ "messages" ] = { hMessage }
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
Code: Select all | Expand
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
function Main()
local oChatgpt := TOpenAI():New()
oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
MsgInfo( oChatgpt:GetValue() )
oChatgpt:End()
return nil
//----------------------------------------------------------------------------//
CLASS TOpenAI
DATA cKey INIT ""
DATA cModel INIT "gpt-4o-mini"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD SendImageURL( cImageUrl )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TOpenAI
if Empty( cKey )
::cKey = GetEnv( "OPENAI_API_KEY" )
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.openai.com/v1/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TOpenAI
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TOpenAI
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD SendImageURL( cImageUrl ) CLASS TOpenAI
local aHeaders, cJson, hRequest := { => }, hMessage := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hRequest, "model", ::cModel )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What's in this image?" }, ;
{ "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )
hRequest[ "messages" ] = { hMessage }
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
Code: Select all | Expand
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
function Main()
local oChatgpt := TOpenAI():New()
// oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
oChatgpt:SendImage( "../bitmaps/logo/fivepowergm5.jpg" )
MsgInfo( oChatgpt:GetValue() )
oChatgpt:End()
return nil
//----------------------------------------------------------------------------//
CLASS TOpenAI
DATA cKey INIT ""
DATA cModel INIT "gpt-4o-mini"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD SendImage( cImageFileName )
METHOD SendImageURL( cImageUrl )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TOpenAI
if Empty( cKey )
::cKey = GetEnv( "OPENAI_API_KEY" )
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.openai.com/v1/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TOpenAI
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TOpenAI
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD SendImage( cImageFileName ) CLASS TOpenAI
local aHeaders, cJson, cBase64Image, hMessage := { => }
if ! File( cImageFileName )
MsgAlert( "Image " + cImageFileName + " not found" )
return nil
endif
cBase64Image := hb_base64Encode( memoRead( cImageFileName ) )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, "https://api.openai.com/v1/chat/completions" )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What is in this image?" }, ;
{ "type" => "image_url", ;
"image_url" => { "url" => "data:image/jpeg;base64," + cBase64Image } } } )
cJson := hb_jsonEncode( { "model" => ::cModel, ;
"messages" => { hMessage } } )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
METHOD SendImageURL( cImageUrl ) CLASS TOpenAI
local aHeaders, cJson, hRequest := { => }, hMessage := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hRequest, "model", ::cModel )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What's in this image?" }, ;
{ "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )
hRequest[ "messages" ] = { hMessage }
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
Code: Select all | Expand
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
function Main()
local oChatgpt := TOpenAI():New()
// oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
oChatgpt:SendImage( "../bitmaps/logo/fivepowergm5.jpg" )
MsgInfo( oChatgpt:GetValue() )
oChatgpt:End()
return nil
//----------------------------------------------------------------------------//
CLASS TOpenAI
DATA cKey INIT ""
DATA cModel INIT "gpt-4o-mini"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD SendImage( cImageFileName )
METHOD SendImageURL( cImageUrl )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TOpenAI
if Empty( cKey )
::cKey = GetEnv( "OPENAI_API_KEY" )
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.openai.com/v1/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TOpenAI
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TOpenAI
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD SendImage( cImageFileName ) CLASS TOpenAI
local aHeaders, cJson, cBase64Image, hMessage := { => }
if ! File( cImageFileName )
MsgAlert( "Image " + cImageFileName + " not found" )
return nil
endif
cBase64Image := hb_base64Encode( memoRead( cImageFileName ) )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, "https://api.openai.com/v1/chat/completions" )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What is in this image?" }, ;
{ "type" => "image_url", ;
"image_url" => { "url" => "data:image/jpeg;base64," + cBase64Image } } } )
cJson := hb_jsonEncode( { "model" => ::cModel, ;
"messages" => { hMessage } } )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
METHOD SendImageURL( cImageUrl ) CLASS TOpenAI
local aHeaders, cJson, hRequest := { => }, hMessage := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hRequest, "model", ::cModel )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What's in this image?" }, ;
{ "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )
hRequest[ "messages" ] = { hMessage }
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
Code: Select all | Expand
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
function Main()
local oChatgpt := TOpenAI():New()
// oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
// oChatgpt:SendImage( "../bitmaps/logo/fivepowergm5.jpg" )
oChatgpt:Send( "What is the capital of France ?" )
MsgInfo( oChatgpt:GetValue() )
oChatgpt:End()
return nil
//----------------------------------------------------------------------------//
CLASS TOpenAI
DATA cKey INIT ""
DATA cModel INIT "gpt-4o-mini"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD Send( cPrompt )
METHOD SendImage( cImageFileName )
METHOD SendImageURL( cImageUrl )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TOpenAI
if Empty( cKey )
::cKey = GetEnv( "OPENAI_API_KEY" )
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.openai.com/v1/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TOpenAI
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TOpenAI
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD Send( cPrompt ) CLASS TOpenAI
LOCAL aHeaders, cJson, hRequest := { => }, hMessage := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt(::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders)
curl_easy_setopt(::hCurl, HB_CURLOPT_USERNAME, '')
curl_easy_setopt(::hCurl, HB_CURLOPT_DL_BUFF_SETUP)
curl_easy_setopt(::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F.)
hb_HSet( hRequest, "model", ::cModel )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", cPrompt )
hRequest[ "messages" ] = { hMessage }
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
METHOD SendImage( cImageFileName ) CLASS TOpenAI
local aHeaders, cJson, cBase64Image, hMessage := { => }
if ! File( cImageFileName )
MsgAlert( "Image " + cImageFileName + " not found" )
return nil
endif
cBase64Image := hb_base64Encode( memoRead( cImageFileName ) )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, "https://api.openai.com/v1/chat/completions" )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What is in this image?" }, ;
{ "type" => "image_url", ;
"image_url" => { "url" => "data:image/jpeg;base64," + cBase64Image } } } )
cJson := hb_jsonEncode( { "model" => ::cModel, ;
"messages" => { hMessage } } )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse = "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
METHOD SendImageURL( cImageUrl ) CLASS TOpenAI
local aHeaders, cJson, hRequest := { => }, hMessage := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hRequest, "model", ::cModel )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What's in this image?" }, ;
{ "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )
hRequest[ "messages" ] = { hMessage }
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse = "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
Code: Select all | Expand
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
function Main()
local oChatgpt := TOpenAI():New()
// oChatgpt:SendImageURL( "https://forums.fivetechsupport.com/styles/prosilver/imageset/site_logo.gif" )
// oChatgpt:SendImage( "../bitmaps/logo/fivepowergm5.jpg" )
oChatgpt:Send( "What is the capital of France ?" )
MsgInfo( oChatgpt:GetValue() )
oChatgpt:End()
return nil
//----------------------------------------------------------------------------//
CLASS TOpenAI
DATA cKey INIT ""
DATA cModel INIT "gpt-4o-mini"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD Send( cPrompt )
METHOD SendImage( cImageFileName )
METHOD SendImageURL( cImageUrl )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TOpenAI
if Empty( cKey )
::cKey = GetEnv( "OPENAI_API_KEY" )
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.openai.com/v1/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TOpenAI
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TOpenAI
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD Send( cPrompt ) CLASS TOpenAI
LOCAL aHeaders, cJson, hRequest := { => }, hMessage := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt(::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders)
curl_easy_setopt(::hCurl, HB_CURLOPT_USERNAME, '')
curl_easy_setopt(::hCurl, HB_CURLOPT_DL_BUFF_SETUP)
curl_easy_setopt(::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F.)
hb_HSet( hRequest, "model", ::cModel )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", cPrompt )
hRequest[ "messages" ] = { hMessage }
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
METHOD SendImage( cImageFileName ) CLASS TOpenAI
local aHeaders, cJson, cBase64Image, hMessage := { => }
if ! File( cImageFileName )
MsgAlert( "Image " + cImageFileName + " not found" )
return nil
endif
cBase64Image := hb_base64Encode( memoRead( cImageFileName ) )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, "https://api.openai.com/v1/chat/completions" )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What is in this image?" }, ;
{ "type" => "image_url", ;
"image_url" => { "url" => "data:image/jpeg;base64," + cBase64Image } } } )
cJson := hb_jsonEncode( { "model" => ::cModel, ;
"messages" => { hMessage } } )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse = "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
METHOD SendImageURL( cImageUrl ) CLASS TOpenAI
local aHeaders, cJson, hRequest := { => }, hMessage := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, "" )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hb_HSet( hRequest, "model", ::cModel )
hb_HSet( hMessage, "role", "user" )
hb_HSet( hMessage, "content", { ;
{ "type" => "text", "text" => "What's in this image?" }, ;
{ "type" => "image_url", "image_url" => { "url" => cImageUrl } } } )
hRequest[ "messages" ] = { hMessage }
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse = "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
We can use ollama from Harbour ]]>Yes, it is possible to use Ollama on the Jetson Nano Orin. Ollama is an open-source tool that allows you to run large language models (LLMs) locally on Jetson devices, including the Jetson Nano Orin.
To install Ollama on your Jetson Nano Orin, you can follow these steps:
1. **Preparation**:
- Ensure you have JetPack 6.0 installed on your device.
- Download the SD card image from the official NVIDIA website.
2. **Native Installation**:
- Use the official Ollama installer:
```bash
curl -fsSL https://ollama.com/install.sh | sh
```
- This will create a service to run `ollama serve` at startup, allowing you to use the `ollama` command immediately.
3. **Using Docker Containers**:
- You can run Ollama inside a Docker container to avoid changes to your existing system:
```bash
docker run --runtime nvidia --rm --network=host -v ~/ollama:/ollama -e OLLAMA_MODELS=/ollama dustynv/ollama:r36.2.0
```
By following these steps, you can fully utilize the capabilities of your Jetson Nano Orin to run large language models efficiently.
We can use ollama from Harbour ]]>Yes, it is possible to use Ollama on the Jetson Nano Orin. Ollama is an open-source tool that allows you to run large language models (LLMs) locally on Jetson devices, including the Jetson Nano Orin.
To install Ollama on your Jetson Nano Orin, you can follow these steps:
1. **Preparation**:
- Ensure you have JetPack 6.0 installed on your device.
- Download the SD card image from the official NVIDIA website.
2. **Native Installation**:
- Use the official Ollama installer:
```bash
curl -fsSL https://ollama.com/install.sh | sh
```
- This will create a service to run `ollama serve` at startup, allowing you to use the `ollama` command immediately.
3. **Using Docker Containers**:
- You can run Ollama inside a Docker container to avoid changes to your existing system:
```bash
docker run --runtime nvidia --rm --network=host -v ~/ollama:/ollama -e OLLAMA_MODELS=/ollama dustynv/ollama:r36.2.0
```
By following these steps, you can fully utilize the capabilities of your Jetson Nano Orin to run large language models efficiently.
Code: Select all | Expand
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_INIT
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_CLEANUP
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_SETOPT
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_PERFORM
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_GETINFO
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_DL_BUFF_GET
Code: Select all | Expand
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_INIT
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_CLEANUP
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_SETOPT
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_PERFORM
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_GETINFO
openai1.obj : error LNK2001: símbolo externo não resolvido _HB_FUN_CURL_EASY_DL_BUFF_GET
Code: Select all | Expand
@ 10, nCol SAY xLabel VAR cFilter OF xDlg PIXEL ;
SIZE 500, nRowSize FONT oFont COLOR CLR_BLACK, CLR_WHITE TRANSPARENT BORDER
xLabel:l3D := .F.
Code: Select all | Expand
@ 10, nCol SAY xLabel VAR cFilter OF xDlg PIXEL ;
SIZE 500, nRowSize FONT oFont COLOR CLR_BLACK, CLR_WHITE TRANSPARENT BORDER
xLabel:l3D := .F.
Code: Select all | Expand
#include "FiveWin.ch"
// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )
// Hauptprogramm
FUNCTION Main()
LOCAL oDlg, oGrid
LOCAL oBtnOk, oBtnCancel
// Dialogfenster erstellen
DEFINE DIALOG oDlg ;
TITLE "FiveWin Bootstrap Test" ;
SIZE 800, 600 ;
TRUEPIXEL ;
STYLE WS_THICKFRAME
oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )
// Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
oGrid := FWGrid():New( 12, 10 )
// Buttons hinzufügen
oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )
oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )
// Grid-System dem Dialog zuweisen
oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }
// Dialogfenster anzeigen
ACTIVATE DIALOG oDlg ;
CENTERED
RETURN NIL
// Grid-System
CLASS FWGrid
DATA aControls
DATA nColumns
DATA nGutter
METHOD New( nColumns, nGutter )
METHOD AddControl( oControl, nRow, nCol, nColSpan )
METHOD Resize( nWidth, nHeight )
ENDCLASS
METHOD New( nColumns, nGutter ) CLASS FWGrid
::aControls := {}
::nColumns := nColumns
::nGutter := nGutter
RETURN Self
METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
RETURN Self
METHOD Resize( nWidth, nHeight ) CLASS FWGrid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
ENDIF
NEXT
RETURN Self
// Vordefinierte Klassen
CLASS FWButton
DATA oButton
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
METHOD SetColor( nTextColor, nBgColor )
ENDCLASS
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
RETURN Self
METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
::oButton:SetColor( nTextColor, nBgColor )
RETURN Self
Code: Select all | Expand
CLASS TWindow
// ... (vorhandene Daten und Methoden)
// Neue Eigenschaften für das Grid-System
DATA nColumns AS NUMERIC INIT 12 // Anzahl der Spalten im Grid
DATA nGutter AS NUMERIC INIT 5 // Abstand zwischen den Steuerelementen
DATA oGrid AS ARRAY INIT {} // Array zur Speicherung der Steuerelemente im Grid
// Neue Methoden für das Grid-System
METHOD AddToGrid( oControl, nRow, nCol, nColSpan )
METHOD ResizeControls( nWidth, nHeight )
METHOD _NCOLUMNS( nNewValue ) SETGET
// ... (restliche vorhandene Methoden)
ENDCLASS
//----------------------------------------------------------------------------//
METHOD AddToGrid( oControl, nRow, nCol, nColSpan ) CLASS TWindow
// Fügt ein Steuerelement zum Grid hinzu
IF !EMPTY( ::oGrid )
AAdd( ::oGrid, { oControl, nRow, nCol, nColSpan } )
ENDIF
RETURN Self
//----------------------------------------------------------------------------//
METHOD ResizeControls( nWidth, nHeight ) CLASS TWindow
// Berechnet die Größe und Position der Steuerelemente basierend auf dem Grid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
IF !EMPTY( ::oGrid )
FOR EACH aControl IN ::oGrid
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
ENDIF
NEXT
ENDIF
RETURN Self
//----------------------------------------------------------------------------//
METHOD _NCOLUMNS( nNewValue ) CLASS TWindow
IF PCount() > 0
::nColumns := nNewValue
ENDIF
RETURN ::nColumns
Code: Select all | Expand
FUNCTION Main()
LOCAL oDlg
LOCAL oSayName, oGetName
LOCAL oSayAge, oGetAge
LOCAL oBtnOk, oBtnCancel
// Create the dialog
oDlg := TDialog():New(,,,, "FiveWin Bootstrap Test",,, .F., 262144,,,,, .F.,,,, 800, 600, .F.,, "oDlg", nil, .T., )
// Initialize grid system
oDlg:nColumns := 12
oDlg:nGutter := 5
oDlg:oGrid := {}
// SAY (Label) for Name
oSayName := TSay():New( 0, 0, "Name:", oDlg )
oDlg:AddToGrid( oSayName, 2, 1, 2 )
// GET (Input field) for Name
oGetName := TGet():New( 0, 0, 100, 32, "", oDlg )
oDlg:AddToGrid( oGetName, 2, 3, 4 )
// SAY (Label) for Age
oSayAge := TSay():New( 0, 0, "Alter:", oDlg )
oDlg:AddToGrid( oSayAge, 3, 1, 2 )
// GET (Input field) for Age
oGetAge := TGet():New( 0, 0, 100, 32, "", oDlg )
oDlg:AddToGrid( oGetAge, 3, 3, 4 )
// Buttons
oBtnOk := TButton():New( 0, 0, "&Ok", oDlg, { || MsgInfo("Ok clicked!") }, 100, 32 )
oDlg:AddToGrid( oBtnOk, 4, 1, 3 )
oBtnCancel := TButton():New( 0, 0, "&Cancel", oDlg, { || oDlg:End() }, 100, 32 )
oDlg:AddToGrid( oBtnCancel, 4, 4, 3 )
// Assign grid system to the dialog
oDlg:bResized := { || oDlg:ResizeControls( oDlg:nWidth(), oDlg:nHeight() ) }
// Show the dialog
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
Code: Select all | Expand
#include "FiveWin.ch"
// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )
// Hauptprogramm
FUNCTION Main()
LOCAL oDlg, oGrid
LOCAL oBtnOk, oBtnCancel
// Dialogfenster erstellen
DEFINE DIALOG oDlg ;
TITLE "FiveWin Bootstrap Test" ;
SIZE 800, 600 ;
TRUEPIXEL ;
STYLE WS_THICKFRAME
oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )
// Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
oGrid := FWGrid():New( 12, 10 )
// Buttons hinzufügen
oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )
oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )
// Grid-System dem Dialog zuweisen
oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }
// Dialogfenster anzeigen
ACTIVATE DIALOG oDlg ;
CENTERED
RETURN NIL
// Grid-System
CLASS FWGrid
DATA aControls
DATA nColumns
DATA nGutter
METHOD New( nColumns, nGutter )
METHOD AddControl( oControl, nRow, nCol, nColSpan )
METHOD Resize( nWidth, nHeight )
ENDCLASS
METHOD New( nColumns, nGutter ) CLASS FWGrid
::aControls := {}
::nColumns := nColumns
::nGutter := nGutter
RETURN Self
METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
RETURN Self
METHOD Resize( nWidth, nHeight ) CLASS FWGrid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
ENDIF
NEXT
RETURN Self
// Vordefinierte Klassen
CLASS FWButton
DATA oButton
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
METHOD SetColor( nTextColor, nBgColor )
ENDCLASS
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
RETURN Self
METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
::oButton:SetColor( nTextColor, nBgColor )
RETURN Self
Code: Select all | Expand
CLASS TWindow
// ... (vorhandene Daten und Methoden)
// Neue Eigenschaften für das Grid-System
DATA nColumns AS NUMERIC INIT 12 // Anzahl der Spalten im Grid
DATA nGutter AS NUMERIC INIT 5 // Abstand zwischen den Steuerelementen
DATA oGrid AS ARRAY INIT {} // Array zur Speicherung der Steuerelemente im Grid
// Neue Methoden für das Grid-System
METHOD AddToGrid( oControl, nRow, nCol, nColSpan )
METHOD ResizeControls( nWidth, nHeight )
METHOD _NCOLUMNS( nNewValue ) SETGET
// ... (restliche vorhandene Methoden)
ENDCLASS
//----------------------------------------------------------------------------//
METHOD AddToGrid( oControl, nRow, nCol, nColSpan ) CLASS TWindow
// Fügt ein Steuerelement zum Grid hinzu
IF !EMPTY( ::oGrid )
AAdd( ::oGrid, { oControl, nRow, nCol, nColSpan } )
ENDIF
RETURN Self
//----------------------------------------------------------------------------//
METHOD ResizeControls( nWidth, nHeight ) CLASS TWindow
// Berechnet die Größe und Position der Steuerelemente basierend auf dem Grid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
IF !EMPTY( ::oGrid )
FOR EACH aControl IN ::oGrid
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
ENDIF
NEXT
ENDIF
RETURN Self
//----------------------------------------------------------------------------//
METHOD _NCOLUMNS( nNewValue ) CLASS TWindow
IF PCount() > 0
::nColumns := nNewValue
ENDIF
RETURN ::nColumns
Code: Select all | Expand
FUNCTION Main()
LOCAL oDlg
LOCAL oSayName, oGetName
LOCAL oSayAge, oGetAge
LOCAL oBtnOk, oBtnCancel
// Create the dialog
oDlg := TDialog():New(,,,, "FiveWin Bootstrap Test",,, .F., 262144,,,,, .F.,,,, 800, 600, .F.,, "oDlg", nil, .T., )
// Initialize grid system
oDlg:nColumns := 12
oDlg:nGutter := 5
oDlg:oGrid := {}
// SAY (Label) for Name
oSayName := TSay():New( 0, 0, "Name:", oDlg )
oDlg:AddToGrid( oSayName, 2, 1, 2 )
// GET (Input field) for Name
oGetName := TGet():New( 0, 0, 100, 32, "", oDlg )
oDlg:AddToGrid( oGetName, 2, 3, 4 )
// SAY (Label) for Age
oSayAge := TSay():New( 0, 0, "Alter:", oDlg )
oDlg:AddToGrid( oSayAge, 3, 1, 2 )
// GET (Input field) for Age
oGetAge := TGet():New( 0, 0, 100, 32, "", oDlg )
oDlg:AddToGrid( oGetAge, 3, 3, 4 )
// Buttons
oBtnOk := TButton():New( 0, 0, "&Ok", oDlg, { || MsgInfo("Ok clicked!") }, 100, 32 )
oDlg:AddToGrid( oBtnOk, 4, 1, 3 )
oBtnCancel := TButton():New( 0, 0, "&Cancel", oDlg, { || oDlg:End() }, 100, 32 )
oDlg:AddToGrid( oBtnCancel, 4, 4, 3 )
// Assign grid system to the dialog
oDlg:bResized := { || oDlg:ResizeControls( oDlg:nWidth(), oDlg:nHeight() ) }
// Show the dialog
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
Code: Select all | Expand
#include "FiveWin.ch"
// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )
// Hauptprogramm
FUNCTION Main()
LOCAL oDlg, oGrid
LOCAL oBtnOk, oBtnCancel
// Dialogfenster erstellen
DEFINE DIALOG oDlg ;
TITLE "FiveWin Bootstrap Test" ;
SIZE 800, 600 ;
TRUEPIXEL ;
STYLE WS_THICKFRAME
oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )
// Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
oGrid := FWGrid():New( 12, 10 )
// Buttons hinzufügen
oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )
oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )
// Grid-System dem Dialog zuweisen
oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }
// Dialogfenster anzeigen
ACTIVATE DIALOG oDlg ;
CENTERED
RETURN NIL
// Grid-System
CLASS FWGrid
DATA aControls
DATA nColumns
DATA nGutter
METHOD New( nColumns, nGutter )
METHOD AddControl( oControl, nRow, nCol, nColSpan )
METHOD Resize( nWidth, nHeight )
ENDCLASS
METHOD New( nColumns, nGutter ) CLASS FWGrid
::aControls := {}
::nColumns := nColumns
::nGutter := nGutter
RETURN Self
METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
RETURN Self
METHOD Resize( nWidth, nHeight ) CLASS FWGrid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
LOCAL nPrevY := ::nGutter // Startposition für die erste Zeile
LOCAL nBreakpoint := 400 // Schwellenwert für das Stapeln der Schalter
// Wenn die Fensterbreite kleiner als der Breakpoint ist, stapeln wir die Schalter vertikal
IF nWidth < nBreakpoint
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nWidth - 2 * ::nGutter // Volle Breite minus Gutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter // Linksbündig
nY := nPrevY // Verwende die vorherige Y-Position
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Aktualisiere die Y-Position für das nächste Steuerelement
ENDIF
NEXT
ELSE
// Normales Grid-Layout (Schalter nebeneinander)
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter // Alle Schalter in derselben Zeile
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
ENDIF
NEXT
ENDIF
RETURN Self
// Vordefinierte Klassen
CLASS FWButton
DATA oButton
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
METHOD SetColor( nTextColor, nBgColor )
ENDCLASS
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
RETURN Self
METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
::oButton:SetColor( nTextColor, nBgColor )
RETURN Self
Code: Select all | Expand
#include "FiveWin.ch"
// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )
// Hauptprogramm
FUNCTION Main()
LOCAL oDlg, oGrid
LOCAL oBtnOk, oBtnCancel
// Dialogfenster erstellen
DEFINE DIALOG oDlg ;
TITLE "FiveWin Bootstrap Test" ;
SIZE 800, 600 ;
TRUEPIXEL ;
STYLE WS_THICKFRAME
oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )
// Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
oGrid := FWGrid():New( 12, 10 )
// Buttons hinzufügen
oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )
oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )
// Grid-System dem Dialog zuweisen
oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }
// Dialogfenster anzeigen
ACTIVATE DIALOG oDlg ;
CENTERED
RETURN NIL
// Grid-System
CLASS FWGrid
DATA aControls
DATA nColumns
DATA nGutter
METHOD New( nColumns, nGutter )
METHOD AddControl( oControl, nRow, nCol, nColSpan )
METHOD Resize( nWidth, nHeight )
ENDCLASS
METHOD New( nColumns, nGutter ) CLASS FWGrid
::aControls := {}
::nColumns := nColumns
::nGutter := nGutter
RETURN Self
METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
RETURN Self
METHOD Resize( nWidth, nHeight ) CLASS FWGrid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
LOCAL nPrevY := ::nGutter // Startposition für die erste Zeile
LOCAL nBreakpoint := 400 // Schwellenwert für das Stapeln der Schalter
// Wenn die Fensterbreite kleiner als der Breakpoint ist, stapeln wir die Schalter vertikal
IF nWidth < nBreakpoint
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nWidth - 2 * ::nGutter // Volle Breite minus Gutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter // Linksbündig
nY := nPrevY // Verwende die vorherige Y-Position
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Aktualisiere die Y-Position für das nächste Steuerelement
ENDIF
NEXT
ELSE
// Normales Grid-Layout (Schalter nebeneinander)
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter // Alle Schalter in derselben Zeile
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
ENDIF
NEXT
ENDIF
RETURN Self
// Vordefinierte Klassen
CLASS FWButton
DATA oButton
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
METHOD SetColor( nTextColor, nBgColor )
ENDCLASS
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
RETURN Self
METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
::oButton:SetColor( nTextColor, nBgColor )
RETURN Self
Code: Select all | Expand
#include "FiveWin.ch"
#ifdef __XHARBOUR__
/* Hash item functions */
#xtranslate hb_Hash( [<x,...>] ) => Hash( <x> )
#xtranslate hb_HHasKey( [<x,...>] ) => HHasKey( <x> )
#xtranslate hb_HPos( [<x,...>] ) => HGetPos( <x> )
#xtranslate hb_HGet( [<x,...>] ) => HGet( <x> )
#xtranslate hb_HSet( [<x,...>] ) => HSet( <x> )
#xtranslate hb_HDel( [<x,...>] ) => HDel( <x> )
#xtranslate hb_HKeyAt( [<x,...>] ) => HGetKeyAt( <x> )
#xtranslate hb_HValueAt( [<x,...>] ) => HGetValueAt( <x> )
#xtranslate hb_HValueAt( [<x,...>] ) => HSetValueAt( <x> )
#xtranslate hb_HPairAt( [<x,...>] ) => HGetPairAt( <x> )
#xtranslate hb_HDelAt( [<x,...>] ) => HDelAt( <x> )
#xtranslate hb_HKeys( [<x,...>] ) => HGetKeys( <x> )
#xtranslate hb_HValues( [<x,...>] ) => HGetValues( <x> )
#xtranslate hb_HFill( [<x,...>] ) => HFill( <x> )
#xtranslate hb_HClone( [<x,...>] ) => HClone( <x> )
#xtranslate hb_HCopy( [<x,...>] ) => HCopy( <x> )
#xtranslate hb_HMerge( [<x,...>] ) => HMerge( <x> )
#xtranslate hb_HEval( [<x,...>] ) => HEval( <x> )
#xtranslate hb_HScan( [<x,...>] ) => HScan( <x> )
#xtranslate hb_HSetCaseMatch( [<x,...>] ) => HSetCaseMatch( <x> )
#xtranslate hb_HCaseMatch( [<x,...>] ) => HGetCaseMatch( <x> )
#xtranslate hb_HSetAutoAdd( [<x,...>] ) => HSetAutoAdd( <x> )
#xtranslate hb_HAutoAdd( [<x,...>] ) => HGetAutoAdd( <x> )
#xtranslate hb_HAllocate( [<x,...>] ) => HAllocate( <x> )
#xtranslate hb_HDefault( [<x,...>] ) => HDefault( <x> )
#else
/* Hash item functions */
#xtranslate Hash( [<x,...>] ) => hb_Hash( <x> )
#xtranslate HHasKey( [<x,...>] ) => hb_HHasKey( <x> )
#xtranslate HGetPos( [<x,...>] ) => hb_HPos( <x> )
#xtranslate HGet( [<x,...>] ) => hb_HGet( <x> )
#xtranslate HSet( [<x,...>] ) => hb_HSet( <x> )
#xtranslate HDel( [<x,...>] ) => hb_HDel( <x> )
#xtranslate HGetKeyAt( [<x,...>] ) => hb_HKeyAt( <x> )
#xtranslate HGetValueAt( [<x,...>] ) => hb_HValueAt( <x> )
#xtranslate HSetValueAt( [<x,...>] ) => hb_HValueAt( <x> )
#xtranslate HGetPairAt( [<x,...>] ) => hb_HPairAt( <x> )
#xtranslate HDelAt( [<x,...>] ) => hb_HDelAt( <x> )
#xtranslate HGetKeys( [<x,...>] ) => hb_HKeys( <x> )
#xtranslate HGetValues( [<x,...>] ) => hb_HValues( <x> )
#xtranslate HFill( [<x,...>] ) => hb_HFill( <x> )
#xtranslate HClone( [<x,...>] ) => hb_HClone( <x> )
#xtranslate HCopy( [<x,...>] ) => hb_HCopy( <x> )
#xtranslate HMerge( [<x,...>] ) => hb_HMerge( <x> )
#xtranslate HEval( [<x,...>] ) => hb_HEval( <x> )
#xtranslate HScan( [<x,...>] ) => hb_HScan( <x> )
#xtranslate HSetCaseMatch( [<x,...>] ) => hb_HSetCaseMatch( <x> )
#xtranslate HGetCaseMatch( [<x,...>] ) => hb_HCaseMatch( <x> )
#xtranslate HSetAutoAdd( [<x,...>] ) => hb_HSetAutoAdd( <x> )
#xtranslate HGetAutoAdd( [<x,...>] ) => hb_HAutoAdd( <x> )
#xtranslate HAllocate( [<x,...>] ) => hb_HAllocate( <x> )
#xtranslate HDefault( [<x,...>] ) => hb_HDefault( <x> )
#xtranslate HSetPartition( [<x,...>] ) =>
/* Associative hash array functions */
#xtranslate haAGetKeyAt( [<x,...>] ) => hb_HKeyAt( <x> )
#xtranslate haAGetValueAt( [<x,...>] ) => hb_HValueAt( <x> )
#xtranslate haADelAt( [<x,...>] ) => hb_HDelAt( <x> )
#xtranslate haAGetPos( [<x,...>] ) => hb_HPos( <x> )
#xtranslate haAGetRealPos( <x>, <y> ) => iif( HB_ISNUMERIC( <y> ) .AND. <y> >= 1 .AND. ;
Int( <y> ) <= Len( <x> ), Int( <y> ), 0 )
#xtranslate HGetVaaPos( <x> ) => {| h | ;;
LOCAL a := Array( Len( h ), v ;;
FOR EACH v IN a ;;
v := v:__enumIndex() ;;
NEXT ;;
RETURN a ; }:eval( <x> )
#xtranslate HGetAACompatibility( <x> ) => hb_HKeepOrder( <x> )
#xtranslate HSetAACompatibility( [<x,...>] ) => {| h | ;;
hb_HKeepOrder( h ) ;;
RETURN .T. ; }:eval( <x> )
#endif
// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )
#DEFINE DARK_GET_BG RGB( 80, 80, 80 )
#DEFINE DARK_GET_FG RGB( 255, 255, 255 )
// Hauptprogramm
static oDlg
FUNCTION Main()
LOCAL oGrid
LOCAL oBtnOk, oBtnCancel
LOCAL oSayTitle, oSayName, oGetName, oSayEmail, oGetEmail
LOCAL cName := "", cEmail := ""
// Dialogfenster erstellen
DEFINE DIALOG oDlg ;
TITLE "FiveWin Bootstrap Test" ;
SIZE 800, 600 ;
TRUEPIXEL ;
STYLE WS_THICKFRAME
oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )
// Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
oGrid := FWGrid():New( 12, 10 )
// Titel SAY (responsiv)
oSayTitle := TSay():New( 10, 10, { || "Bootstrap grid like system" }, oDlg )
oSayTitle:SetColor( DARK_TEXT, DARK_BACKGROUND )
oSayTitle:SetFont( TFont():New( "Arial", 0, 24 ) ) // Große Schriftgröße für den Titel
oGrid:AddControl( oSayTitle, 1, 1, 12 ) // Titel über die gesamte Breite
// SAY und GET für Name
oSayName := TSay():New( 50, 10, { || "Name:" }, oDlg )
oSayName:SetColor( DARK_TEXT, DARK_BACKGROUND )
oSayName:SetFont( TFont():New( "Arial", 0, 18 ) )
oGrid:AddControl( oSayName, 2, 1, 2 )
// Name-Get rein über TGet():New()
oGetName := TGet():New( 50, 100, { || cName }, oDlg )
oGetName:SetSize( 200, 32 )
oGetName:SetColor( DARK_GET_FG, DARK_GET_BG )
oGrid:AddControl( oGetName, 2, 3, 6 )
// SAY und GET für E-Mail
oSayEmail := TSay():New( 90, 10, { || "E-Mail:" }, oDlg )
oSayEmail:SetColor( DARK_TEXT, DARK_BACKGROUND )
oSayEmail:SetFont( TFont():New( "Arial", 0, 18 ) )
oGrid:AddControl( oSayEmail, 3, 1, 2 )
// E-Mail-Get (Korrektur: { || cEmail } statt { || cName }, andere Zeile)
oGetEmail := TGet():New( 90, 100, { || cEmail }, oDlg )
oGetEmail:SetSize( 200, 32 )
oGetEmail:SetColor( DARK_GET_FG, DARK_GET_BG )
oGrid:AddControl( oGetEmail, 3, 3, 6 )
// Buttons hinzufügen
oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 4, 1, 3 )
oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnOk:oButton, 4, 1, 3 )
oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 4, 4, 3 )
oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnCancel:oButton, 4, 4, 3 )
// Grid-System dem Dialog zuweisen
oDlg:bResized := ( { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) } )
// Dialogfenster anzeigen
ACTIVATE DIALOG oDlg ;
CENTERED
RETURN NIL
// Grid-System
CLASS FWGrid
DATA aControls
DATA nColumns
DATA nGutter
METHOD New( nColumns, nGutter )
METHOD AddControl( oControl, nRow, nCol, nColSpan )
METHOD Resize( nWidth, nHeight )
ENDCLASS
METHOD New( nColumns, nGutter ) CLASS FWGrid
::aControls := {}
::nColumns := nColumns
::nGutter := nGutter
RETURN Self
METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
RETURN Self
METHOD Resize( nWidth, nHeight ) CLASS FWGrid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
LOCAL nPrevY := ::nGutter // Startposition für die erste Zeile
LOCAL nBreakpoint := 600 // Schwellenwert für das Stapeln der Controls
LOCAL hRows := Hash() // Initialisiere hRows als Hash
LOCAL nRowKey, aRowControls
LOCAL aKeys
// Wenn die Fensterbreite kleiner als der Breakpoint ist, stapeln wir die Controls vertikal
IF nWidth < nBreakpoint
// Hilfsarray: wir gruppieren Controls nach Row
// Schritt 1: alle Controls entsprechend ihrer nRow einsortieren
FOR EACH aControl IN ::aControls
IF !HB_HHasKey( hRows, aControl[2] )
hRows[ aControl[2] ] := {} // Initialisiere eine leere Array-Liste für jede Zeile
ENDIF
AAdd( hRows[ aControl[2] ], aControl )
NEXT
// Schritt 2: pro Row einen "Block" untereinander anzeigen
aKeys := HB_HKeys( hRows )
ASort( aKeys ) // sortierte Reihenfolge
FOR EACH nRowKey IN aKeys // jetzt garantiert Row 1,2,3,...
aRowControls := hRows[ nRowKey ]
// Sortiere die Controls innerhalb jeder Zeile nach ihrer Spaltenposition (nCol)
ASort( aRowControls,,, { |a, b| a[3] < b[3] } )
FOR EACH aControl IN aRowControls
NEXT
FOR EACH aControl IN aRowControls
nControlWidth := nWidth - 2 * ::nGutter // Volle Breite minus Gutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter // Linksbündig
// Titel: Schriftgröße drastisch verkleinern
IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] == 1
aControl[1]:SetFont( TFont():New( "Arial", 0, 16 ) ) // Kleinere Schriftgröße
aControl[1]:SetPos( nPrevY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Nächste Zeile
ENDIF
// SAY: Schriftgröße drastisch verkleinern
IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] != 1
aControl[1]:SetFont( TFont():New( "Arial", 0, 12 ) ) // Kleinere Schriftgröße
aControl[1]:SetPos( nPrevY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Nächste Zeile für GET
ENDIF
// GET: In der darunterliegenden Zeile
IF aControl[1]:ClassName() == "TGET"
// aControl[1]:SetPos( nPrevY, nX )
aControl[1]:nTop := nPrevY
aControl[1]:nLeft := nX
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Nächste Zeile für das nächste SAY
ENDIF
// Buttons: Untereinander, Cancel linksbündig
IF aControl[1]:ClassName() == "TBUTTON"
aControl[1]:SetPos( nPrevY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Nächste Zeile für den nächsten Button
ENDIF
// Erzwinge eine Aktualisierung des Controls
aControl[1]:Refresh()
NEXT
NEXT
ELSE
// Normales Grid-Layout (SAY und GET nebeneinander, Buttons nebeneinander)
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)
// Titel: Schriftgröße zurücksetzen
IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] == 1
aControl[1]:SetFont( TFont():New( "Arial", 0, 26 ) ) // Große Schriftgröße
ENDIF
// SAY: Schriftgröße zurücksetzen
IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] != 1
aControl[1]:SetFont( TFont():New( "Arial", 0, 18 ) ) // Normale Schriftgröße
ENDIF
IF aControl[1]:ClassName() == "TGET"
aControl[1]:nTop := nY
aControl[1]:nLeft := nX
ELSE
aControl[1]:SetPos( nY, nX )
ENDIF
aControl[1]:SetSize( nControlWidth, nControlHeight )
aControl[1]:Refresh()
ENDIF
NEXT
ENDIF
RETURN Self
// Vordefinierte Klassen
CLASS FWButton
DATA oButton
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
METHOD SetColor( nTextColor, nBgColor )
ENDCLASS
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
RETURN Self
METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
::oButton:SetColor( nTextColor, nBgColor )
RETURN Self
Code: Select all | Expand
#include "FiveWin.ch"
#ifdef __XHARBOUR__
/* Hash item functions */
#xtranslate hb_Hash( [<x,...>] ) => Hash( <x> )
#xtranslate hb_HHasKey( [<x,...>] ) => HHasKey( <x> )
#xtranslate hb_HPos( [<x,...>] ) => HGetPos( <x> )
#xtranslate hb_HGet( [<x,...>] ) => HGet( <x> )
#xtranslate hb_HSet( [<x,...>] ) => HSet( <x> )
#xtranslate hb_HDel( [<x,...>] ) => HDel( <x> )
#xtranslate hb_HKeyAt( [<x,...>] ) => HGetKeyAt( <x> )
#xtranslate hb_HValueAt( [<x,...>] ) => HGetValueAt( <x> )
#xtranslate hb_HValueAt( [<x,...>] ) => HSetValueAt( <x> )
#xtranslate hb_HPairAt( [<x,...>] ) => HGetPairAt( <x> )
#xtranslate hb_HDelAt( [<x,...>] ) => HDelAt( <x> )
#xtranslate hb_HKeys( [<x,...>] ) => HGetKeys( <x> )
#xtranslate hb_HValues( [<x,...>] ) => HGetValues( <x> )
#xtranslate hb_HFill( [<x,...>] ) => HFill( <x> )
#xtranslate hb_HClone( [<x,...>] ) => HClone( <x> )
#xtranslate hb_HCopy( [<x,...>] ) => HCopy( <x> )
#xtranslate hb_HMerge( [<x,...>] ) => HMerge( <x> )
#xtranslate hb_HEval( [<x,...>] ) => HEval( <x> )
#xtranslate hb_HScan( [<x,...>] ) => HScan( <x> )
#xtranslate hb_HSetCaseMatch( [<x,...>] ) => HSetCaseMatch( <x> )
#xtranslate hb_HCaseMatch( [<x,...>] ) => HGetCaseMatch( <x> )
#xtranslate hb_HSetAutoAdd( [<x,...>] ) => HSetAutoAdd( <x> )
#xtranslate hb_HAutoAdd( [<x,...>] ) => HGetAutoAdd( <x> )
#xtranslate hb_HAllocate( [<x,...>] ) => HAllocate( <x> )
#xtranslate hb_HDefault( [<x,...>] ) => HDefault( <x> )
#else
/* Hash item functions */
#xtranslate Hash( [<x,...>] ) => hb_Hash( <x> )
#xtranslate HHasKey( [<x,...>] ) => hb_HHasKey( <x> )
#xtranslate HGetPos( [<x,...>] ) => hb_HPos( <x> )
#xtranslate HGet( [<x,...>] ) => hb_HGet( <x> )
#xtranslate HSet( [<x,...>] ) => hb_HSet( <x> )
#xtranslate HDel( [<x,...>] ) => hb_HDel( <x> )
#xtranslate HGetKeyAt( [<x,...>] ) => hb_HKeyAt( <x> )
#xtranslate HGetValueAt( [<x,...>] ) => hb_HValueAt( <x> )
#xtranslate HSetValueAt( [<x,...>] ) => hb_HValueAt( <x> )
#xtranslate HGetPairAt( [<x,...>] ) => hb_HPairAt( <x> )
#xtranslate HDelAt( [<x,...>] ) => hb_HDelAt( <x> )
#xtranslate HGetKeys( [<x,...>] ) => hb_HKeys( <x> )
#xtranslate HGetValues( [<x,...>] ) => hb_HValues( <x> )
#xtranslate HFill( [<x,...>] ) => hb_HFill( <x> )
#xtranslate HClone( [<x,...>] ) => hb_HClone( <x> )
#xtranslate HCopy( [<x,...>] ) => hb_HCopy( <x> )
#xtranslate HMerge( [<x,...>] ) => hb_HMerge( <x> )
#xtranslate HEval( [<x,...>] ) => hb_HEval( <x> )
#xtranslate HScan( [<x,...>] ) => hb_HScan( <x> )
#xtranslate HSetCaseMatch( [<x,...>] ) => hb_HSetCaseMatch( <x> )
#xtranslate HGetCaseMatch( [<x,...>] ) => hb_HCaseMatch( <x> )
#xtranslate HSetAutoAdd( [<x,...>] ) => hb_HSetAutoAdd( <x> )
#xtranslate HGetAutoAdd( [<x,...>] ) => hb_HAutoAdd( <x> )
#xtranslate HAllocate( [<x,...>] ) => hb_HAllocate( <x> )
#xtranslate HDefault( [<x,...>] ) => hb_HDefault( <x> )
#xtranslate HSetPartition( [<x,...>] ) =>
/* Associative hash array functions */
#xtranslate haAGetKeyAt( [<x,...>] ) => hb_HKeyAt( <x> )
#xtranslate haAGetValueAt( [<x,...>] ) => hb_HValueAt( <x> )
#xtranslate haADelAt( [<x,...>] ) => hb_HDelAt( <x> )
#xtranslate haAGetPos( [<x,...>] ) => hb_HPos( <x> )
#xtranslate haAGetRealPos( <x>, <y> ) => iif( HB_ISNUMERIC( <y> ) .AND. <y> >= 1 .AND. ;
Int( <y> ) <= Len( <x> ), Int( <y> ), 0 )
#xtranslate HGetVaaPos( <x> ) => {| h | ;;
LOCAL a := Array( Len( h ), v ;;
FOR EACH v IN a ;;
v := v:__enumIndex() ;;
NEXT ;;
RETURN a ; }:eval( <x> )
#xtranslate HGetAACompatibility( <x> ) => hb_HKeepOrder( <x> )
#xtranslate HSetAACompatibility( [<x,...>] ) => {| h | ;;
hb_HKeepOrder( h ) ;;
RETURN .T. ; }:eval( <x> )
#endif
// Farben für Dark Mode
#DEFINE DARK_BACKGROUND RGB( 40, 40, 40 )
#DEFINE DARK_TEXT RGB( 255, 255, 255 )
#DEFINE DARK_BUTTON_BG RGB( 60, 60, 60 )
#DEFINE DARK_BUTTON_FG RGB( 255, 255, 255 )
#DEFINE DARK_GET_BG RGB( 80, 80, 80 )
#DEFINE DARK_GET_FG RGB( 255, 255, 255 )
// Hauptprogramm
static oDlg
FUNCTION Main()
LOCAL oGrid
LOCAL oBtnOk, oBtnCancel
LOCAL oSayTitle, oSayName, oGetName, oSayEmail, oGetEmail
LOCAL cName := "", cEmail := ""
// Dialogfenster erstellen
DEFINE DIALOG oDlg ;
TITLE "FiveWin Bootstrap Test" ;
SIZE 800, 600 ;
TRUEPIXEL ;
STYLE WS_THICKFRAME
oDlg:SetColor( DARK_TEXT, DARK_BACKGROUND )
// Grid-System erstellen (12 Spalten, 10 Pixel Abstand)
oGrid := FWGrid():New( 12, 10 )
// Titel SAY (responsiv)
oSayTitle := TSay():New( 10, 10, { || "Bootstrap grid like system" }, oDlg )
oSayTitle:SetColor( DARK_TEXT, DARK_BACKGROUND )
oSayTitle:SetFont( TFont():New( "Arial", 0, 24 ) ) // Große Schriftgröße für den Titel
oGrid:AddControl( oSayTitle, 1, 1, 12 ) // Titel über die gesamte Breite
// SAY und GET für Name
oSayName := TSay():New( 50, 10, { || "Name:" }, oDlg )
oSayName:SetColor( DARK_TEXT, DARK_BACKGROUND )
oSayName:SetFont( TFont():New( "Arial", 0, 18 ) )
oGrid:AddControl( oSayName, 2, 1, 2 )
// Name-Get rein über TGet():New()
oGetName := TGet():New( 50, 100, { || cName }, oDlg )
oGetName:SetSize( 200, 32 )
oGetName:SetColor( DARK_GET_FG, DARK_GET_BG )
oGrid:AddControl( oGetName, 2, 3, 6 )
// SAY und GET für E-Mail
oSayEmail := TSay():New( 90, 10, { || "E-Mail:" }, oDlg )
oSayEmail:SetColor( DARK_TEXT, DARK_BACKGROUND )
oSayEmail:SetFont( TFont():New( "Arial", 0, 18 ) )
oGrid:AddControl( oSayEmail, 3, 1, 2 )
// E-Mail-Get (Korrektur: { || cEmail } statt { || cName }, andere Zeile)
oGetEmail := TGet():New( 90, 100, { || cEmail }, oDlg )
oGetEmail:SetSize( 200, 32 )
oGetEmail:SetColor( DARK_GET_FG, DARK_GET_BG )
oGrid:AddControl( oGetEmail, 3, 3, 6 )
// Buttons hinzufügen
oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 4, 1, 3 )
oBtnOk:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnOk:oButton, 4, 1, 3 )
oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 4, 4, 3 )
oBtnCancel:SetColor( DARK_BUTTON_FG, DARK_BUTTON_BG )
oGrid:AddControl( oBtnCancel:oButton, 4, 4, 3 )
// Grid-System dem Dialog zuweisen
oDlg:bResized := ( { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) } )
// Dialogfenster anzeigen
ACTIVATE DIALOG oDlg ;
CENTERED
RETURN NIL
// Grid-System
CLASS FWGrid
DATA aControls
DATA nColumns
DATA nGutter
METHOD New( nColumns, nGutter )
METHOD AddControl( oControl, nRow, nCol, nColSpan )
METHOD Resize( nWidth, nHeight )
ENDCLASS
METHOD New( nColumns, nGutter ) CLASS FWGrid
::aControls := {}
::nColumns := nColumns
::nGutter := nGutter
RETURN Self
METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
RETURN Self
METHOD Resize( nWidth, nHeight ) CLASS FWGrid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
LOCAL nPrevY := ::nGutter // Startposition für die erste Zeile
LOCAL nBreakpoint := 600 // Schwellenwert für das Stapeln der Controls
LOCAL hRows := Hash() // Initialisiere hRows als Hash
LOCAL nRowKey, aRowControls
LOCAL aKeys
// Wenn die Fensterbreite kleiner als der Breakpoint ist, stapeln wir die Controls vertikal
IF nWidth < nBreakpoint
// Hilfsarray: wir gruppieren Controls nach Row
// Schritt 1: alle Controls entsprechend ihrer nRow einsortieren
FOR EACH aControl IN ::aControls
IF !HB_HHasKey( hRows, aControl[2] )
hRows[ aControl[2] ] := {} // Initialisiere eine leere Array-Liste für jede Zeile
ENDIF
AAdd( hRows[ aControl[2] ], aControl )
NEXT
// Schritt 2: pro Row einen "Block" untereinander anzeigen
aKeys := HB_HKeys( hRows )
ASort( aKeys ) // sortierte Reihenfolge
FOR EACH nRowKey IN aKeys // jetzt garantiert Row 1,2,3,...
aRowControls := hRows[ nRowKey ]
// Sortiere die Controls innerhalb jeder Zeile nach ihrer Spaltenposition (nCol)
ASort( aRowControls,,, { |a, b| a[3] < b[3] } )
FOR EACH aControl IN aRowControls
NEXT
FOR EACH aControl IN aRowControls
nControlWidth := nWidth - 2 * ::nGutter // Volle Breite minus Gutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter // Linksbündig
// Titel: Schriftgröße drastisch verkleinern
IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] == 1
aControl[1]:SetFont( TFont():New( "Arial", 0, 16 ) ) // Kleinere Schriftgröße
aControl[1]:SetPos( nPrevY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Nächste Zeile
ENDIF
// SAY: Schriftgröße drastisch verkleinern
IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] != 1
aControl[1]:SetFont( TFont():New( "Arial", 0, 12 ) ) // Kleinere Schriftgröße
aControl[1]:SetPos( nPrevY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Nächste Zeile für GET
ENDIF
// GET: In der darunterliegenden Zeile
IF aControl[1]:ClassName() == "TGET"
// aControl[1]:SetPos( nPrevY, nX )
aControl[1]:nTop := nPrevY
aControl[1]:nLeft := nX
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Nächste Zeile für das nächste SAY
ENDIF
// Buttons: Untereinander, Cancel linksbündig
IF aControl[1]:ClassName() == "TBUTTON"
aControl[1]:SetPos( nPrevY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
nPrevY += nControlHeight + ::nGutter // Nächste Zeile für den nächsten Button
ENDIF
// Erzwinge eine Aktualisierung des Controls
aControl[1]:Refresh()
NEXT
NEXT
ELSE
// Normales Grid-Layout (SAY und GET nebeneinander, Buttons nebeneinander)
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32 // Standardhöhe
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)
// Titel: Schriftgröße zurücksetzen
IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] == 1
aControl[1]:SetFont( TFont():New( "Arial", 0, 26 ) ) // Große Schriftgröße
ENDIF
// SAY: Schriftgröße zurücksetzen
IF aControl[1]:ClassName() == "TSAY" .AND. aControl[2] != 1
aControl[1]:SetFont( TFont():New( "Arial", 0, 18 ) ) // Normale Schriftgröße
ENDIF
IF aControl[1]:ClassName() == "TGET"
aControl[1]:nTop := nY
aControl[1]:nLeft := nX
ELSE
aControl[1]:SetPos( nY, nX )
ENDIF
aControl[1]:SetSize( nControlWidth, nControlHeight )
aControl[1]:Refresh()
ENDIF
NEXT
ENDIF
RETURN Self
// Vordefinierte Klassen
CLASS FWButton
DATA oButton
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
METHOD SetColor( nTextColor, nBgColor )
ENDCLASS
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
RETURN Self
METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
::oButton:SetColor( nTextColor, nBgColor )
RETURN Self
Code: Select all | Expand
#include "FiveWin.ch"
#DEFINE DARK_THEME {;
"background" => RGB( 40, 40, 40 ),;
"text" => RGB( 255, 255, 255 ),;
"button_bg" => RGB( 60, 60, 60 ),;
"button_fg" => RGB( 255, 255, 255 );
}
#DEFINE LIGHT_THEME {;
"background" => RGB( 255, 255, 255 ),;
"text" => RGB( 0, 0, 0 ),;
"button_bg" => RGB( 240, 240, 240 ),;
"button_fg" => RGB( 0, 0, 0 );
}
FUNCTION Main()
LOCAL oDlg, oGrid
LOCAL oBtnOk, oBtnCancel, oBtnToggleTheme
DEFINE DIALOG oDlg ;
TITLE "FiveWin Bootstrap Test" ;
SIZE 800, 600 ;
TRUEPIXEL ;
STYLE WS_THICKFRAME
oGrid := FWGrid():New( 12, 10, oDlg )
oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )
oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )
oBtnToggleTheme := FWButton():New( "Toggle Theme", { || oGrid:ToggleTheme() }, oDlg, 2, 1, 3 )
oGrid:AddControl( oBtnToggleTheme:oButton, 2, 1, 3 )
oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }
// Aplicar el tema oscuro por defecto
oGrid:SetTheme( LIGHT_THEME )
oGrid:ToggleTheme()
ACTIVATE DIALOG oDlg ;
CENTERED
RETURN NIL
CLASS FWGrid
DATA aControls
DATA nColumns
DATA nGutter
DATA oDlg
METHOD New( nColumns, nGutter, oDlg )
METHOD AddControl( oControl, nRow, nCol, nColSpan )
METHOD Resize( nWidth, nHeight )
METHOD SetTheme( aTheme )
METHOD ToggleTheme()
ENDCLASS
METHOD New( nColumns, nGutter, oDlg ) CLASS FWGrid
::aControls := {}
::nColumns := nColumns
::nGutter := nGutter
::oDlg := oDlg
RETURN Self
METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
RETURN Self
METHOD Resize( nWidth, nHeight ) CLASS FWGrid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
ENDIF
NEXT
RETURN Self
METHOD SetTheme( aTheme ) CLASS FWGrid
LOCAL aControl
// Cambiar el color de fondo de la ventana
::oDlg:SetColor( aTheme["text"], aTheme["background"] )
// Aplicar el tema a todos los controles
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
IF aControl[1]:ClassName() == "TBUTTON" // Si es un botón
aControl[1]:SetColor( aTheme["button_fg"], aTheme["button_bg"] )
ENDIF
// Aquí puedes agregar más condiciones para otros tipos de controles
ENDIF
NEXT
::oDlg:Refresh()
RETURN Self
METHOD ToggleTheme() CLASS FWGrid
STATIC lDarkTheme := .T.
IF lDarkTheme
::SetTheme( LIGHT_THEME )
ELSE
::SetTheme( DARK_THEME )
ENDIF
lDarkTheme := !lDarkTheme
RETURN Self
CLASS FWButton
DATA oButton
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
METHOD SetColor( nTextColor, nBgColor )
METHOD SetTheme( aTheme )
ENDCLASS
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
RETURN Self
METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
::oButton:SetColor( nTextColor, nBgColor )
RETURN Self
METHOD SetTheme( aTheme ) CLASS FWButton
::SetColor( aTheme["button_fg"], aTheme["button_bg"] )
RETURN Self
Code: Select all | Expand
#include "FiveWin.ch"
#DEFINE DARK_THEME {;
"background" => RGB( 40, 40, 40 ),;
"text" => RGB( 255, 255, 255 ),;
"button_bg" => RGB( 60, 60, 60 ),;
"button_fg" => RGB( 255, 255, 255 );
}
#DEFINE LIGHT_THEME {;
"background" => RGB( 255, 255, 255 ),;
"text" => RGB( 0, 0, 0 ),;
"button_bg" => RGB( 240, 240, 240 ),;
"button_fg" => RGB( 0, 0, 0 );
}
FUNCTION Main()
LOCAL oDlg, oGrid
LOCAL oBtnOk, oBtnCancel, oBtnToggleTheme
DEFINE DIALOG oDlg ;
TITLE "FiveWin Bootstrap Test" ;
SIZE 800, 600 ;
TRUEPIXEL ;
STYLE WS_THICKFRAME
oGrid := FWGrid():New( 12, 10, oDlg )
oBtnOk := FWButton():New( "&Ok", { || MsgInfo("Ok clicked!") }, oDlg, 1, 1, 3 )
oGrid:AddControl( oBtnOk:oButton, 1, 1, 3 )
oBtnCancel := FWButton():New( "&Cancel", { || oDlg:End() }, oDlg, 1, 4, 3 )
oGrid:AddControl( oBtnCancel:oButton, 1, 4, 3 )
oBtnToggleTheme := FWButton():New( "Toggle Theme", { || oGrid:ToggleTheme() }, oDlg, 2, 1, 3 )
oGrid:AddControl( oBtnToggleTheme:oButton, 2, 1, 3 )
oDlg:bResized := { || oGrid:Resize( oDlg:nWidth(), oDlg:nHeight() ) }
// Aplicar el tema oscuro por defecto
oGrid:SetTheme( LIGHT_THEME )
oGrid:ToggleTheme()
ACTIVATE DIALOG oDlg ;
CENTERED
RETURN NIL
CLASS FWGrid
DATA aControls
DATA nColumns
DATA nGutter
DATA oDlg
METHOD New( nColumns, nGutter, oDlg )
METHOD AddControl( oControl, nRow, nCol, nColSpan )
METHOD Resize( nWidth, nHeight )
METHOD SetTheme( aTheme )
METHOD ToggleTheme()
ENDCLASS
METHOD New( nColumns, nGutter, oDlg ) CLASS FWGrid
::aControls := {}
::nColumns := nColumns
::nGutter := nGutter
::oDlg := oDlg
RETURN Self
METHOD AddControl( oControl, nRow, nCol, nColSpan ) CLASS FWGrid
AAdd( ::aControls, { oControl, nRow, nCol, nColSpan } )
RETURN Self
METHOD Resize( nWidth, nHeight ) CLASS FWGrid
LOCAL nColWidth := (nWidth - (::nColumns + 1) * ::nGutter) / ::nColumns
LOCAL nControlWidth, nControlHeight, nX, nY
LOCAL aControl
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
nControlWidth := nColWidth * aControl[4] + (aControl[4] - 1) * ::nGutter
nControlHeight := 32
nX := ::nGutter + (aControl[3] - 1) * (nColWidth + ::nGutter)
nY := ::nGutter + (aControl[2] - 1) * (nControlHeight + ::nGutter)
aControl[1]:SetPos( nY, nX )
aControl[1]:SetSize( nControlWidth, nControlHeight )
ENDIF
NEXT
RETURN Self
METHOD SetTheme( aTheme ) CLASS FWGrid
LOCAL aControl
// Cambiar el color de fondo de la ventana
::oDlg:SetColor( aTheme["text"], aTheme["background"] )
// Aplicar el tema a todos los controles
FOR EACH aControl IN ::aControls
IF aControl[1] != NIL
IF aControl[1]:ClassName() == "TBUTTON" // Si es un botón
aControl[1]:SetColor( aTheme["button_fg"], aTheme["button_bg"] )
ENDIF
// Aquí puedes agregar más condiciones para otros tipos de controles
ENDIF
NEXT
::oDlg:Refresh()
RETURN Self
METHOD ToggleTheme() CLASS FWGrid
STATIC lDarkTheme := .T.
IF lDarkTheme
::SetTheme( LIGHT_THEME )
ELSE
::SetTheme( DARK_THEME )
ENDIF
lDarkTheme := !lDarkTheme
RETURN Self
CLASS FWButton
DATA oButton
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan )
METHOD SetColor( nTextColor, nBgColor )
METHOD SetTheme( aTheme )
ENDCLASS
METHOD New( cCaption, bAction, oWnd, nRow, nCol, nColSpan ) CLASS FWButton
::oButton := TButton():New( 0, 0, cCaption, oWnd, bAction, 100, 32 )
RETURN Self
METHOD SetColor( nTextColor, nBgColor ) CLASS FWButton
::oButton:SetColor( nTextColor, nBgColor )
RETURN Self
METHOD SetTheme( aTheme ) CLASS FWButton
::SetColor( aTheme["button_fg"], aTheme["button_bg"] )
RETURN Self
Code: Select all | Expand
#include "FiveWin.ch"
REQUEST DBFCDX
function Main()
local aFiles := Directory( "c:\fwh\source\classes\*.prg" )
local oChat := TDeepSeek():New(), aFile
local cPrompt := "document this code, explaining what this Class is about," + ;
" listing all the DATAs and METHODs," + ;
" and providing a brief description of each of them. Code:"
DbCreate( "classes.dbf", { { "name", "C", 15, 0 }, { "docs", "M", 10, 0 } }, "DBFCDX" )
USE classes
for each aFile in aFiles
MsgRun( "documenting " + aFile[ 1 ],;
"please wait...", { || oChat:Send( cPrompt + ;
hb_memoRead( "c:\fwh\source\classes\" + aFile[ 1 ] ) ) } )
DbAppend()
classes->name := aFile[ 1 ]
classes->docs := oChat:GetValue()
next
GO TOP
XBrowse()
return nil
]]>Code: Select all | Expand
#include "FiveWin.ch"
REQUEST DBFCDX
function Main()
local aFiles := Directory( "c:\fwh\source\classes\*.prg" )
local oChat := TDeepSeek():New(), aFile
local cPrompt := "document this code, explaining what this Class is about," + ;
" listing all the DATAs and METHODs," + ;
" and providing a brief description of each of them. Code:"
DbCreate( "classes.dbf", { { "name", "C", 15, 0 }, { "docs", "M", 10, 0 } }, "DBFCDX" )
USE classes
for each aFile in aFiles
MsgRun( "documenting " + aFile[ 1 ],;
"please wait...", { || oChat:Send( cPrompt + ;
hb_memoRead( "c:\fwh\source\classes\" + aFile[ 1 ] ) ) } )
DbAppend()
classes->name := aFile[ 1 ]
classes->docs := oChat:GetValue()
next
GO TOP
XBrowse()
return nil
]]>]]>Antonio Linares wrote: Thu Jan 16, 2025 5:48 pm agentdoc.prgCode: Select all | Expand
#include "FiveWin.ch" REQUEST DBFCDX function Main() local aFiles := Directory( "c:\fwh\source\classes\*.prg" ) local oChat := TDeepSeek():New(), aFile local cPrompt := "document this code, explaining what this Class is about," + ; " listing all the DATAs and METHODs," + ; " and providing a brief description of each of them. Code:" DbCreate( "classes.dbf", { { "name", "C", 15, 0 }, { "docs", "M", 10, 0 } }, "DBFCDX" ) USE classes for each aFile in aFiles MsgRun( "documenting " + aFile[ 1 ],; "please wait...", { || oChat:Send( cPrompt + ; hb_memoRead( "c:\fwh\source\classes\" + aFile[ 1 ] ) ) } ) DbAppend() classes->name := aFile[ 1 ] classes->docs := oChat:GetValue() next GO TOP XBrowse() return nil
]]>Antonio Linares wrote: Thu Jan 16, 2025 5:48 pm agentdoc.prgCode: Select all | Expand
#include "FiveWin.ch" REQUEST DBFCDX function Main() local aFiles := Directory( "c:\fwh\source\classes\*.prg" ) local oChat := TDeepSeek():New(), aFile local cPrompt := "document this code, explaining what this Class is about," + ; " listing all the DATAs and METHODs," + ; " and providing a brief description of each of them. Code:" DbCreate( "classes.dbf", { { "name", "C", 15, 0 }, { "docs", "M", 10, 0 } }, "DBFCDX" ) USE classes for each aFile in aFiles MsgRun( "documenting " + aFile[ 1 ],; "please wait...", { || oChat:Send( cPrompt + ; hb_memoRead( "c:\fwh\source\classes\" + aFile[ 1 ] ) ) } ) DbAppend() classes->name := aFile[ 1 ] classes->docs := oChat:GetValue() next GO TOP XBrowse() return nil
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour\bin\win\msvc64\hbmk2 test64.hbp -comp=msvc64
@endlocal
test.exe
Code: Select all | Expand
-gui
-Ic:\fwh64\include
test.prg
-Lc:\fwh64\lib
-lFiveH64
-lFiveHC64
-lgdiplus
-lole32
-lOleDlg
-lversion
-lucrt
-luxtheme
-ldflag=/NODEFAULTLIB:libucrt
-ldflag=/NODEFAULTLIB:msvcrt
xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc
-ldflag=/NODEFAULTLIB:msvcrt
test.rc
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oBmpTiled, oWnd, oMsgBar
DEFINE BITMAP oBmpTiled RESOURCE "background"
DEFINE WINDOW oWnd MENU BuildMenu() TITLE "My app"
BuildBar( oWnd )
DEFINE MSGBAR oMsgBar OF oWnd PROMPT "My app" NOINSET
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON PAINT DrawTiled( hDC, oWnd, oBmpTiled )
oBmpTiled:End()
return nil
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&Files"
ENDMENU
return oMenu
function BuildBar( oWnd )
local oBar
DEFINE BUTTONBAR oBar OF oWnd 3D SIZE 70, 70
return nil
Code: Select all | Expand
background BITMAP c:\fwh64\bitmaps\backgrnd\iosbg.bmp
Code: Select all | Expand
C:\cmplar_mv_64>go64
C:\cmplar_mv_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Harbour 3.2.0dev (r2407221137)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling '.\PRG\test.prg'...
Lines 5054, Functions/Procedures 3
Generating C source output to 'C:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\test.c'... Done.
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
test.c
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2061: error de sintaxis: identificador '__attribute__'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2143: error de sintaxis: falta ')' delante de 'constante'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2143: error de sintaxis: falta ')' delante de 'constante'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(84): warning C4431: falta el especificador de tipo - se presupone int. Nota: C no admite default-int
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(84): warning C4218: se ha utilizado una extensión no estándar: se debe especificar al menos una clase de almacenamiento o un tipo
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2146: error de sintaxis: falta ')' delante del identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2061: error de sintaxis: identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ','
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2146: error de sintaxis: falta ')' delante del identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2061: error de sintaxis: identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(64): warning C4431: falta el especificador de tipo - se presupone int. Nota: C no admite default-int
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(64): error C2054: se esperaba '(' a continuación de '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2057: se esperaba una expresión constante
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2466: no se puede asignar una matriz de tamaño constante 0
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2082: nueva definición del parámetro formal '__cpuid'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(66): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2057: se esperaba una expresión constante
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2466: no se puede asignar una matriz de tamaño constante 0
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2082: nueva definición del parámetro formal '__cpuidex'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(69): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(71): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(71): error C2082: nueva definición del parámetro formal '__emul'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(73): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(75): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(75): error C2082: nueva definición del parámetro formal '__emulu'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(76): error C2082: nueva definición del parámetro formal '__getcallerseflags'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(77): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(78): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(78): error C2082: nueva definición del parámetro formal '__halt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(79): error C2082: nueva definición del parámetro formal '__inbyte'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(80): error C2082: nueva definición del parámetro formal '__inbytestring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(81): error C2085: '__incfsbyte': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(82): error C2085: '__incfsdword': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(83): error C2085: '__incfsword': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(84): error C2082: nueva definición del parámetro formal '__indword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(85): error C2082: nueva definición del parámetro formal '__indwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(86): error C2082: nueva definición del parámetro formal '__invlpg'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(87): error C2082: nueva definición del parámetro formal '__inword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(88): error C2082: nueva definición del parámetro formal '__inwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(89): error C2082: nueva definición del parámetro formal '__lidt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(90): error C2082: nueva definición del parámetro formal '__ll_lshift'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(91): error C2082: nueva definición del parámetro formal '__ll_rshift'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(92): error C2082: nueva definición del parámetro formal '__lzcnt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(93): error C2082: nueva definición del parámetro formal '__lzcnt16'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(94): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(95): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(95): error C2082: nueva definición del parámetro formal '__movsb'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(96): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(97): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(97): error C2082: nueva definición del parámetro formal '__movsd'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(98): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(99): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(99): error C2082: nueva definición del parámetro formal '__movsw'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(100): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(101): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(101): error C2082: nueva definición del parámetro formal '__nop'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(102): error C2082: nueva definición del parámetro formal '__nvreg_restore_fence'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(103): error C2082: nueva definición del parámetro formal '__nvreg_save_fence'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(104): error C2082: nueva definición del parámetro formal '__outbyte'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(105): error C2082: nueva definición del parámetro formal '__outbytestring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(106): error C2082: nueva definición del parámetro formal '__outdword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(107): error C2082: nueva definición del parámetro formal '__outdwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(108): error C2082: nueva definición del parámetro formal '__outword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(109): error C2082: nueva definición del parámetro formal '__outwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(110): error C2082: nueva definición del parámetro formal '__readcr0'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(111): error C2082: nueva definición del parámetro formal '__readcr2'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(112): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(113): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(113): error C2082: nueva definición del parámetro formal '__readcr3'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(114): error C2082: nueva definición del parámetro formal '__readcr4'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(115): error C2082: nueva definición del parámetro formal '__readcr8'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(116): error C2082: nueva definición del parámetro formal '__readdr'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(125): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(126): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(126): error C2082: nueva definición del parámetro formal '__readmsr'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(127): error C2082: nueva definición del parámetro formal '__readpmc'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(128): error C2082: nueva definición del parámetro formal '__segmentlimit'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(129): error C2082: nueva definición del parámetro formal '__sidt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(131): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(133): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(133): error C2082: nueva definición del parámetro formal '__stosb'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(134): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(135): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(135): error C2082: nueva definición del parámetro formal '__stosd'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(136): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(137): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(137): error C2082: nueva definición del parámetro formal '__stosw'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(138): error C2082: nueva definición del parámetro formal '__svm_clgi'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(139): error C2082: nueva definición del parámetro formal '__svm_invlpga'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(140): error C2082: nueva definición del parámetro formal '__svm_skinit'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(140): fatal error C1003: el recuento de errores supera 100; se detiene la compilación
hbmk2[test64]: Error: Running C/C++ compiler. 2
cl.exe -nologo -c -O1 -Ic:\bcc770_64\INCLUDE\windows\crtl -Ic:\bcc770_64\INCLUDE\windows\sdk -W4 -wd4127 -FoC:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\ -Ic:\har_msvc22_64\include -Ic:\fwh64_2409\include -Ic:\har_msvc22_64\contrib\xhb -Ic:\har_msvc22_64\contrib\hbct -Ic:\har_msvc22_64\contrib\hbtip -Ic:\har_msvc22_64\contrib\hbfship -Ic:\har_msvc22_64\contrib\hbxpp -Ic:\har_msvc22_64\contrib\hbwin -Ic:\har_msvc22_64\contrib\hbmzip -Ic:\har_msvc22_64\contrib\hbfoxpro C:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\test.c
"test.exe" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
C:\cmplar_mv_64>
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour\bin\win\msvc64\hbmk2 test64.hbp -comp=msvc64
@endlocal
test.exe
Code: Select all | Expand
-gui
-Ic:\fwh64\include
test.prg
-Lc:\fwh64\lib
-lFiveH64
-lFiveHC64
-lgdiplus
-lole32
-lOleDlg
-lversion
-lucrt
-luxtheme
-ldflag=/NODEFAULTLIB:libucrt
-ldflag=/NODEFAULTLIB:msvcrt
xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc
-ldflag=/NODEFAULTLIB:msvcrt
test.rc
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oBmpTiled, oWnd, oMsgBar
DEFINE BITMAP oBmpTiled RESOURCE "background"
DEFINE WINDOW oWnd MENU BuildMenu() TITLE "My app"
BuildBar( oWnd )
DEFINE MSGBAR oMsgBar OF oWnd PROMPT "My app" NOINSET
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON PAINT DrawTiled( hDC, oWnd, oBmpTiled )
oBmpTiled:End()
return nil
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&Files"
ENDMENU
return oMenu
function BuildBar( oWnd )
local oBar
DEFINE BUTTONBAR oBar OF oWnd 3D SIZE 70, 70
return nil
Code: Select all | Expand
background BITMAP c:\fwh64\bitmaps\backgrnd\iosbg.bmp
Code: Select all | Expand
C:\cmplar_mv_64>go64
C:\cmplar_mv_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Harbour 3.2.0dev (r2407221137)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling '.\PRG\test.prg'...
Lines 5054, Functions/Procedures 3
Generating C source output to 'C:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\test.c'... Done.
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
test.c
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2061: error de sintaxis: identificador '__attribute__'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2143: error de sintaxis: falta ')' delante de 'constante'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(57): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2143: error de sintaxis: falta ')' delante de 'constante'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(59): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(84): warning C4431: falta el especificador de tipo - se presupone int. Nota: C no admite default-int
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(84): warning C4218: se ha utilizado una extensión no estándar: se debe especificar al menos una clase de almacenamiento o un tipo
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2146: error de sintaxis: falta ')' delante del identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2061: error de sintaxis: identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ','
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(87): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2146: error de sintaxis: falta ')' delante del identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2061: error de sintaxis: identificador '__jmpb'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2059: error de sintaxis: ';'
c:\bcc770_64\INCLUDE\windows\crtl\setjmp.h(88): error C2059: error de sintaxis: ')'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(64): warning C4431: falta el especificador de tipo - se presupone int. Nota: C no admite default-int
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(64): error C2054: se esperaba '(' a continuación de '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2057: se esperaba una expresión constante
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2466: no se puede asignar una matriz de tamaño constante 0
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(65): error C2082: nueva definición del parámetro formal '__cpuid'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(66): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2057: se esperaba una expresión constante
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2466: no se puede asignar una matriz de tamaño constante 0
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(67): error C2082: nueva definición del parámetro formal '__cpuidex'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(69): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(71): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(71): error C2082: nueva definición del parámetro formal '__emul'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(73): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(75): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(75): error C2082: nueva definición del parámetro formal '__emulu'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(76): error C2082: nueva definición del parámetro formal '__getcallerseflags'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(77): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(78): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(78): error C2082: nueva definición del parámetro formal '__halt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(79): error C2082: nueva definición del parámetro formal '__inbyte'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(80): error C2082: nueva definición del parámetro formal '__inbytestring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(81): error C2085: '__incfsbyte': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(82): error C2085: '__incfsdword': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(83): error C2085: '__incfsword': no está en la lista de parámetros formales
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(84): error C2082: nueva definición del parámetro formal '__indword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(85): error C2082: nueva definición del parámetro formal '__indwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(86): error C2082: nueva definición del parámetro formal '__invlpg'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(87): error C2082: nueva definición del parámetro formal '__inword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(88): error C2082: nueva definición del parámetro formal '__inwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(89): error C2082: nueva definición del parámetro formal '__lidt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(90): error C2082: nueva definición del parámetro formal '__ll_lshift'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(91): error C2082: nueva definición del parámetro formal '__ll_rshift'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(92): error C2082: nueva definición del parámetro formal '__lzcnt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(93): error C2082: nueva definición del parámetro formal '__lzcnt16'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(94): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(95): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(95): error C2082: nueva definición del parámetro formal '__movsb'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(96): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(97): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(97): error C2082: nueva definición del parámetro formal '__movsd'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(98): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(99): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(99): error C2082: nueva definición del parámetro formal '__movsw'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(100): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(101): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(101): error C2082: nueva definición del parámetro formal '__nop'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(102): error C2082: nueva definición del parámetro formal '__nvreg_restore_fence'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(103): error C2082: nueva definición del parámetro formal '__nvreg_save_fence'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(104): error C2082: nueva definición del parámetro formal '__outbyte'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(105): error C2082: nueva definición del parámetro formal '__outbytestring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(106): error C2082: nueva definición del parámetro formal '__outdword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(107): error C2082: nueva definición del parámetro formal '__outdwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(108): error C2082: nueva definición del parámetro formal '__outword'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(109): error C2082: nueva definición del parámetro formal '__outwordstring'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(110): error C2082: nueva definición del parámetro formal '__readcr0'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(111): error C2082: nueva definición del parámetro formal '__readcr2'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(112): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(113): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(113): error C2082: nueva definición del parámetro formal '__readcr3'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(114): error C2082: nueva definición del parámetro formal '__readcr4'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(115): error C2082: nueva definición del parámetro formal '__readcr8'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(116): error C2082: nueva definición del parámetro formal '__readdr'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(125): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(126): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(126): error C2082: nueva definición del parámetro formal '__readmsr'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(127): error C2082: nueva definición del parámetro formal '__readpmc'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(128): error C2082: nueva definición del parámetro formal '__segmentlimit'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(129): error C2082: nueva definición del parámetro formal '__sidt'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(131): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(133): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(133): error C2082: nueva definición del parámetro formal '__stosb'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(134): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(135): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(135): error C2082: nueva definición del parámetro formal '__stosd'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(136): error C2082: nueva definición del parámetro formal '__inline__'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(137): error C2143: error de sintaxis: falta ';' delante de 'tipo'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(137): error C2082: nueva definición del parámetro formal '__stosw'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(138): error C2082: nueva definición del parámetro formal '__svm_clgi'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(139): error C2082: nueva definición del parámetro formal '__svm_invlpga'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(140): error C2082: nueva definición del parámetro formal '__svm_skinit'
c:\bcc770_64\INCLUDE\windows\crtl\intrin.h(140): fatal error C1003: el recuento de errores supera 100; se detiene la compilación
hbmk2[test64]: Error: Running C/C++ compiler. 2
cl.exe -nologo -c -O1 -Ic:\bcc770_64\INCLUDE\windows\crtl -Ic:\bcc770_64\INCLUDE\windows\sdk -W4 -wd4127 -FoC:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\ -Ic:\har_msvc22_64\include -Ic:\fwh64_2409\include -Ic:\har_msvc22_64\contrib\xhb -Ic:\har_msvc22_64\contrib\hbct -Ic:\har_msvc22_64\contrib\hbtip -Ic:\har_msvc22_64\contrib\hbfship -Ic:\har_msvc22_64\contrib\hbxpp -Ic:\har_msvc22_64\contrib\hbwin -Ic:\har_msvc22_64\contrib\hbmzip -Ic:\har_msvc22_64\contrib\hbfoxpro C:\Users\leandro\AppData\Local\Temp\65\hbmk_8ukx4k.dir\test.c
"test.exe" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
C:\cmplar_mv_64>
Eso ya lo había intentando varias veces, hasta cambie el nombre del prg y del rc, pensando en que era eso.]]>Tal vez se trate de un hbmk2.exe dañado (?) ó prueba a cerrar la ventana cmd y abrir una nueva: tal vez este leyendo alguna variable de entorno de alguna prueba anterior...
Eso ya lo había intentando varias veces, hasta cambie el nombre del prg y del rc, pensando en que era eso.]]>Tal vez se trate de un hbmk2.exe dañado (?) ó prueba a cerrar la ventana cmd y abrir una nueva: tal vez este leyendo alguna variable de entorno de alguna prueba anterior...
Code: Select all | Expand
FUNCTION ChangeComboBoxItem(oComboBox, oBmp01, oAziende)
LOCAL cSelectedItem := oComboBox:GetText()
LOCAL cDir01, cImagePath
IF oAziende:Seek(cSelectedItem)
cDir01 := oAziende:Dir01
cImagePath := ".\"+cDir01 + "\immagini\logo.bmp"
// Verifica se il file immagine esiste
IF File(cImagePath)
oBmp01:LoadBmp(cImagePath)
ELSE
MsgInfo("Immagine non trovata: " + cImagePath, "Errore")
ENDIF
ELSE
MsgInfo("Elemento non trovato nel database: " + cSelectedItem, "Errore")
ENDIF
RETURN NIL
Code: Select all | Expand
FUNCTION ChangeComboBoxItem(oComboBox, oBmp01, oAziende)
LOCAL cSelectedItem := oComboBox:GetText()
LOCAL cDir01, cImagePath
IF oAziende:Seek(cSelectedItem)
cDir01 := oAziende:Dir01
cImagePath := ".\"+cDir01 + "\immagini\logo.bmp"
// Verifica se il file immagine esiste
IF File(cImagePath)
oBmp01:LoadBmp(cImagePath)
ELSE
MsgInfo("Immagine non trovata: " + cImagePath, "Errore")
ENDIF
ELSE
MsgInfo("Elemento non trovato nel database: " + cSelectedItem, "Errore")
ENDIF
RETURN NIL
Yesterday, I looked at your example in the AI section. I then thought that if JSON or CSV databases are suggested for such examples, a modernized DBF could experience a revival here.
According to AI, the following improvements should be made:
Potential Improvements to the DBF Format
To make DBF more competitive in the context of AI, the following enhancements could be introduced:
Support for Larger Datasets:
Raising file size and field number limits to keep up with modern requirements.
Compression:
Integrated support for compression to save storage space.
Advanced Data Types:
Support for complex data types such as JSON, arrays, or BLOBs.
Timestamps and Logging:
Automatic logging of changes or accesses, similar to relational databases.
Encryption:
Support for native encryption to protect sensitive data.
DBF could have advantages over CSV and MySQL in the AI context, especially in scenarios like:
Smaller, local applications.
Simple data structures.
Systems with limited resources.
With some modern adaptations, DBF could be considered a lightweight and robust alternative, particularly for specialized AI applications. The format has potential if it is systematically modernized.
Yesterday, I looked at your example in the AI section. I then thought that if JSON or CSV databases are suggested for such examples, a modernized DBF could experience a revival here.
According to AI, the following improvements should be made:
Potential Improvements to the DBF Format
To make DBF more competitive in the context of AI, the following enhancements could be introduced:
Support for Larger Datasets:
Raising file size and field number limits to keep up with modern requirements.
Compression:
Integrated support for compression to save storage space.
Advanced Data Types:
Support for complex data types such as JSON, arrays, or BLOBs.
Timestamps and Logging:
Automatic logging of changes or accesses, similar to relational databases.
Encryption:
Support for native encryption to protect sensitive data.
DBF could have advantages over CSV and MySQL in the AI context, especially in scenarios like:
Smaller, local applications.
Simple data structures.
Systems with limited resources.
With some modern adaptations, DBF could be considered a lightweight and robust alternative, particularly for specialized AI applications. The format has potential if it is systematically modernized.
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oChat := TDeepSeek():New()
local dummy := FW_SetUnicode( .T. )
local cDatabase := "foros_antiguos"
local oCn := maria_Connect( "localhost," + cDatabase + ",fivetec1_antonio,1234", .T. )
local aTables, cTable
local hDatabase := { => }, cJson
if oCn == nil
MsgAlert( "Error connecting to database" )
return nil
endif
aTables = oCn:ListBaseTables()
for each cTable in aTables
hDatabase[ cTable ] = oCn:ListColumns( cTable )
next
oChat:Send( "tell me the SQL sentence to list the 10 more active users in the forums using this info," + ;
" give me the SQL sentence, no explanations. Remove the '''SQL from the beginning and the ''' from the end: " + ;
hb_jsonEncode( hDatabase ) )
XBrowser( oCn:Execute( oChat:GetValue() ) )
oChat:End()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oChat := TDeepSeek():New()
local dummy := FW_SetUnicode( .T. )
local cDatabase := "foros_antiguos"
local oCn := maria_Connect( "localhost," + cDatabase + ",fivetec1_antonio,1234", .T. )
local aTables, cTable
local hDatabase := { => }, cJson
if oCn == nil
MsgAlert( "Error connecting to database" )
return nil
endif
aTables = oCn:ListBaseTables()
for each cTable in aTables
hDatabase[ cTable ] = oCn:ListColumns( cTable )
next
oChat:Send( "tell me the SQL sentence to list the 10 more active users in the forums using this info," + ;
" give me the SQL sentence, no explanations. Remove the '''SQL from the beginning and the ''' from the end: " + ;
hb_jsonEncode( hDatabase ) )
XBrowser( oCn:Execute( oChat:GetValue() ) )
oChat:End()
return nil
Code: Select all | Expand
// Wrapper.h - Intermediate DLL in C++/CLI
#pragma once
// Exported function that the C application can call
extern "C" __declspec(dllexport) int CallDotNetFunction(int param);
// Wrapper.cpp
#include "Wrapper.h"
#using "MyNetDLL.dll"
int CallDotNetFunction(int param) {
// Call the class/method from the .NET DLL
MyNetDLL::MyClass^ instance = gcnew MyNetDLL::MyClass();
return instance->MyMethod(param);
}
Code: Select all | Expand
// C Application
#include <windows.h>
typedef int (*CallDotNetFunction)(int);
int main() {
HMODULE hDll = LoadLibrary("Wrapper.dll");
CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");
int result = func(42);
FreeLibrary(hDll);
return 0;
}
Code: Select all | Expand
// Wrapper.h - Intermediate DLL in C++/CLI
#pragma once
// Exported function that the C application can call
extern "C" __declspec(dllexport) int CallDotNetFunction(int param);
// Wrapper.cpp
#include "Wrapper.h"
#using "MyNetDLL.dll"
int CallDotNetFunction(int param) {
// Call the class/method from the .NET DLL
MyNetDLL::MyClass^ instance = gcnew MyNetDLL::MyClass();
return instance->MyMethod(param);
}
Code: Select all | Expand
// C Application
#include <windows.h>
typedef int (*CallDotNetFunction)(int);
int main() {
HMODULE hDll = LoadLibrary("Wrapper.dll");
CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");
int result = func(42);
FreeLibrary(hDll);
return 0;
}
Code: Select all | Expand
// Wrapper.h - Intermediate DLL in C++/CLI
#pragma once
// Exported function that the C application can call
extern "C" __declspec(dllexport) int CallDotNetFunction(int param);
// Wrapper.cpp
#include "Wrapper.h"
#using "MyNetDLL.dll"
int CallDotNetFunction(int param) {
// Call the class/method from the .NET DLL
MyNetDLL::MyClass^ instance = gcnew MyNetDLL::MyClass();
return instance->MyMethod(param);
}
Code: Select all | Expand
// C Application
#include <windows.h>
typedef int (*CallDotNetFunction)(int);
int main() {
HMODULE hDll = LoadLibrary("Wrapper.dll");
CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");
int result = func(42);
FreeLibrary(hDll);
return 0;
}
Code: Select all | Expand
// Wrapper.h - Intermediate DLL in C++/CLI
#pragma once
// Exported function that the C application can call
extern "C" __declspec(dllexport) int CallDotNetFunction(int param);
// Wrapper.cpp
#include "Wrapper.h"
#using "MyNetDLL.dll"
int CallDotNetFunction(int param) {
// Call the class/method from the .NET DLL
MyNetDLL::MyClass^ instance = gcnew MyNetDLL::MyClass();
return instance->MyMethod(param);
}
Code: Select all | Expand
// C Application
#include <windows.h>
typedef int (*CallDotNetFunction)(int);
int main() {
HMODULE hDll = LoadLibrary("Wrapper.dll");
CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");
int result = func(42);
FreeLibrary(hDll);
return 0;
}
Code: Select all | Expand
:bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }
Code: Select all | Expand
CASE IsRange( nKey, 32, 127 )
cFilter += Upper( Chr( nKey ) )
Code: Select all | Expand
:bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }
Code: Select all | Expand
CASE IsRange( nKey, 32, 127 )
cFilter += Upper( Chr( nKey ) )
Code: Select all | Expand
:bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }
Code: Select all | Expand
CASE IsRange( nKey, 32, 127 )
cFilter += Upper( Chr( nKey ) )
Code: Select all | Expand
:bKeyDown := { | nKey | FWBrowseKey( xDlg, xControl, nKey, ... ) }
Code: Select all | Expand
CASE IsRange( nKey, 32, 127 )
cFilter += Upper( Chr( nKey ) )
Code: Select all | Expand
// C:\FWH..\SAMPLES\TECLAS.PRG
#Include "FiveWin.Ch"
FUNCTION Main()
LOCAL oWnd
DEFINE WINDOW oWnd TITLE "Testando as Teclas - Caixa Alta e Baixa"
oWnd:bKeyDown = { | nKey | MsgInfo( "Caixa Baixa: " + Str( nKey ) ) }
oWnd:bKeyChar = { | nKey | MsgInfo( "Caixa Alta.: " + Str( nKey ) ) }
ACTIVATE WINDOW oWnd
RETURN NIL
Code: Select all | Expand
// C:\FWH..\SAMPLES\TECLAS.PRG
#Include "FiveWin.Ch"
FUNCTION Main()
LOCAL oWnd
DEFINE WINDOW oWnd TITLE "Testando as Teclas - Caixa Alta e Baixa"
oWnd:bKeyDown = { | nKey | MsgInfo( "Caixa Baixa: " + Str( nKey ) ) }
oWnd:bKeyChar = { | nKey | MsgInfo( "Caixa Alta.: " + Str( nKey ) ) }
ACTIVATE WINDOW oWnd
RETURN NIL
Code: Select all | Expand
@ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 150,400 PIXEL OF oDlg
Code: Select all | Expand
@ 10, 70 COMBOBOX nWild ITEMS { "Starting With", "Containing" } ;
ON CHANGE ( oBrw:lSeekWild := ( nWild == 2 ), ;
oBrw:Seek( If( oBrw:lSeekWild, oBrw:cSeek, "" ) ), ;
oBrw:SetFocus() ) ;
SIZE 70,400 PIXEL OF oDlg
Code: Select all | Expand
@ 10, 550 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 150,400 PIXEL OF oDlg
Code: Select all | Expand
@ 10, 70 COMBOBOX nWild ITEMS { "Starting With", "Containing" } ;
ON CHANGE ( oBrw:lSeekWild := ( nWild == 2 ), ;
oBrw:Seek( If( oBrw:lSeekWild, oBrw:cSeek, "" ) ), ;
oBrw:SetFocus() ) ;
SIZE 70,400 PIXEL OF oDlg
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oChat := TDeepSeek():New()
oChat:Send( "Using MySQL how to list all tables ? write just the simplest SQL sentence, no explanations" )
? oChat:GetValue()
oChat:End()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oChat := TDeepSeek():New()
oChat:Send( "Using MySQL how to list all tables ? write just the simplest SQL sentence, no explanations" )
? oChat:GetValue()
oChat:End()
return nil
Code: Select all | Expand
// Based on https://api-docs.deepseek.com
// Remember to register in https://deepseek.com/ and get your API key
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
CLASS TDeepSeek
DATA cKey INIT ""
DATA cModel INIT "deepseek-chat"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD Send( cPrompt )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TDeepSeek
if Empty( cKey )
::cKey = GetEnv( "DEEPSEEK_API_KEY" )
else
::cKey = cKey
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.deepseek.com/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TDeepSeek
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TDeepSeek
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
TRY
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
CATCH
uValue = uValue[ "error" ][ "message" ]
END
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD Send( cPrompt ) CLASS TDeepSeek
local aHeaders, cJson, hRequest := { => }, hMessage1 := { => }, hMessage2 := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, '' )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hRequest[ "model" ] = ::cModel
hMessage1[ "role" ] = "system"
hMessage1[ "content" ] = "You are a helpfull assistant."
hMessage2[ "role" ] = "user"
hMessage2[ "content" ] = cPrompt
hRequest[ "messages" ] = { hMessage1, hMessage2 }
hRequest[ "stream" ] = .F.
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
]]>Code: Select all | Expand
// Based on https://api-docs.deepseek.com
// Remember to register in https://deepseek.com/ and get your API key
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
CLASS TDeepSeek
DATA cKey INIT ""
DATA cModel INIT "deepseek-chat"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD Send( cPrompt )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TDeepSeek
if Empty( cKey )
::cKey = GetEnv( "DEEPSEEK_API_KEY" )
else
::cKey = cKey
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.deepseek.com/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TDeepSeek
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TDeepSeek
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
TRY
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
CATCH
uValue = uValue[ "error" ][ "message" ]
END
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD Send( cPrompt ) CLASS TDeepSeek
local aHeaders, cJson, hRequest := { => }, hMessage1 := { => }, hMessage2 := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, '' )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hRequest[ "model" ] = ::cModel
hMessage1[ "role" ] = "system"
hMessage1[ "content" ] = "You are a helpfull assistant."
hMessage2[ "role" ] = "user"
hMessage2[ "content" ] = cPrompt
hRequest[ "messages" ] = { hMessage1, hMessage2 }
hRequest[ "stream" ] = .F.
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
]]>Code: Select all | Expand
#include "fivewin.ch"
#include "hbcurl.ch"
* ========================================================================
Function Teste()
* ========================================================================
local cURL := "https://cfqasvir.it-cpi019-rt.cfapps.us10-002.hana.ondemand.com/http/PurchaseOrder/v1?CodeERP=4510160192"
local cCurl
local nError
local cResponse
cCurl := curl_easy_init()
curl_easy_setopt( cCurl, HB_CURLOPT_PROTOCOLS, HB_CURLPROTO_HTTPS)
curl_easy_setopt( cCurl, HB_CURLOPT_URL , cURL )
curl_easy_setopt( cCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( cCurl, HB_CURLOPT_HTTPHEADER , {"Content-Type: application/json"})
curl_easy_setopt( cCurl, HB_CURLOPT_CUSTOMREQUEST ,'GET' )
curl_easy_setopt( cCurl, HB_CURLOPT_SSLCERTPASSWD , "Key_fornec_Int_69133353" )
curl_easy_setopt( cCurl, HB_CURLOPT_SSLCERT , "C:\sis\fsql901\Key_fornec_Int_69133353.pem" )
curl_easy_setopt( cCurl, HB_CURLOPT_SSLKEY , "C:\sis\fsql901\Key_fornec_Int_69133353.key" )
nError := curl_easy_perform( cCurl )
if nError == HB_CURLE_OK
cResponse := curl_easy_dl_buff_get( cCurl )
else
cResponse := "Error code: " + curl_easy_strerror(nError)
endif
Msg( cResponse )
curl_easy_cleanup(cCurl)
return nil
resposta : Status 401 não autorized
Code: Select all | Expand
#include "fivewin.ch"
#include "hbcurl.ch"
* ========================================================================
Function Teste()
* ========================================================================
local cURL := "https://cfqasvir.it-cpi019-rt.cfapps.us10-002.hana.ondemand.com/http/PurchaseOrder/v1?CodeERP=4510160192"
local cCurl
local nError
local cResponse
cCurl := curl_easy_init()
curl_easy_setopt( cCurl, HB_CURLOPT_PROTOCOLS, HB_CURLPROTO_HTTPS)
curl_easy_setopt( cCurl, HB_CURLOPT_URL , cURL )
curl_easy_setopt( cCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( cCurl, HB_CURLOPT_HTTPHEADER , {"Content-Type: application/json"})
curl_easy_setopt( cCurl, HB_CURLOPT_CUSTOMREQUEST ,'GET' )
curl_easy_setopt( cCurl, HB_CURLOPT_SSLCERTPASSWD , "Key_fornec_Int_69133353" )
curl_easy_setopt( cCurl, HB_CURLOPT_SSLCERT , "C:\sis\fsql901\Key_fornec_Int_69133353.pem" )
curl_easy_setopt( cCurl, HB_CURLOPT_SSLKEY , "C:\sis\fsql901\Key_fornec_Int_69133353.key" )
nError := curl_easy_perform( cCurl )
if nError == HB_CURLE_OK
cResponse := curl_easy_dl_buff_get( cCurl )
else
cResponse := "Error code: " + curl_easy_strerror(nError)
endif
Msg( cResponse )
curl_easy_cleanup(cCurl)
return nil
resposta : Status 401 não autorized
Code: Select all | Expand
@ 70, 10 XBROWSE xControl ;
DATASOURCE Alias() ;
SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
OF xDlg ;
ON DBLCLICK ( (nRow), (nCol), (nFlags), FWBrowseENTER( xDlg, xControl ) )
WITH OBJECT xControl
:SetRdd()
:bGoTop := { || ( nSelect )->( FazBrowseTop() ) }
:bGoBottom := { || ( nSelect )->( FazBrowseBottom() ) }
:bSkip := { | n | ( nSelect )->( FazBrowseSkip( n ) ) }
//:bBof := { || Bof() }
//:bEof := { || Eof() }
//:bBookMark := { | n | iif( n == nil, RecNo(), DbGoto( n ) ) }
ENDWITH
...
STATIC FUNCTION FazBrowseSkip( nSkip )
LOCAL nSkipped := 0
IF Empty( nSkip )
RETURN 0
ENDIF
IF nSkip > 0
DO WHILE nSkipped < nSkip
SKIP
IF Eof()
SKIP -1
EXIT
ENDIF
nSkipped++
ENDDO
ELSE
DO WHILE nSkipped > nSkip
SKIP -1
IF Bof()
SKIP
EXIT
ENDIF
nSkipped--
ENDDO
ENDIF
RETURN nSkipped
Code: Select all | Expand
@ 70, 10 XBROWSE xControl ;
DATASOURCE Alias() ;
SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
OF xDlg ;
ON DBLCLICK ( (nRow), (nCol), (nFlags), FWBrowseENTER( xDlg, xControl ) )
WITH OBJECT xControl
:SetRdd()
:bGoTop := { || ( nSelect )->( FazBrowseTop() ) }
:bGoBottom := { || ( nSelect )->( FazBrowseBottom() ) }
:bSkip := { | n | ( nSelect )->( FazBrowseSkip( n ) ) }
//:bBof := { || Bof() }
//:bEof := { || Eof() }
//:bBookMark := { | n | iif( n == nil, RecNo(), DbGoto( n ) ) }
ENDWITH
...
STATIC FUNCTION FazBrowseSkip( nSkip )
LOCAL nSkipped := 0
IF Empty( nSkip )
RETURN 0
ENDIF
IF nSkip > 0
DO WHILE nSkipped < nSkip
SKIP
IF Eof()
SKIP -1
EXIT
ENDIF
nSkipped++
ENDDO
ELSE
DO WHILE nSkipped > nSkip
SKIP -1
IF Bof()
SKIP
EXIT
ENDIF
nSkipped--
ENDDO
ENDIF
RETURN nSkipped
Code: Select all | Expand
@ 70, 10 XBROWSE xControl ;
DATASOURCE Alias() ;
SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
OF xDlg ;
ON DBLCLICK ( (nRow), (nCol), (nFlags), FWBrowseENTER( xDlg, xControl ) )
XBrowse automatically generates all navigation codeblocks internally and correctly for all known datasources like arrays, hashes, dbf, ado-recordsets and all other known classes.Code: Select all | Expand
SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
Code: Select all | Expand
SIZE -24,-100 PIXEL
Code: Select all | Expand
xControl:CreateFromCode()
Code: Select all | Expand
@ 70, 10 XBROWSE xControl ;
DATASOURCE Alias() ;
SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
OF xDlg ;
ON DBLCLICK ( (nRow), (nCol), (nFlags), FWBrowseENTER( xDlg, xControl ) )
XBrowse automatically generates all navigation codeblocks internally and correctly for all known datasources like arrays, hashes, dbf, ado-recordsets and all other known classes.Code: Select all | Expand
SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
Code: Select all | Expand
SIZE -24,-100 PIXEL
Code: Select all | Expand
xControl:CreateFromCode()
Code: Select all | Expand
::bGoTop := {|| ( ::cAlias )->( DbGoTop() ) }
::bGoBottom := {|| ( ::cAlias )->( DbGoBottom() ) }
::bSkip := {| n | ( ::cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
::bBof := {|| ( ::cAlias )->( Bof() ) }
::bEof := {|| ( ::cAlias )->( Eof() ) }
::bBookMark := {| n | iif( n == nil
( ::cAlias )->( RecNo() )
( ::cAlias )->( DbGoto( n );
) ) }
::bKeyNo := {| n | iif( n == nil
( ::cAlias )->( OrdKeyNo() )
( ::cAlias )->( OrdKeyGoto( n );
) ) }
::bKeyCount := {|| ( ::cAlias )->( If( eof() .and. bof(), 0, OrdKeyCount() ) ) }
Code: Select all | Expand
::bGoTop := {|| ( ::cAlias )->( DbGoTop() ) }
::bGoBottom := {|| ( ::cAlias )->( DbGoBottom() ) }
::bSkip := {| n | ( ::cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
::bBof := {|| ( ::cAlias )->( Bof() ) }
::bEof := {|| ( ::cAlias )->( Eof() ) }
::bBookMark := {| n | iif( n == nil
( ::cAlias )->( RecNo() )
( ::cAlias )->( DbGoto( n );
) ) }
::bKeyNo := {| n | iif( n == nil
( ::cAlias )->( OrdKeyNo() )
( ::cAlias )->( OrdKeyGoto( n );
) ) }
::bKeyCount := {|| ( ::cAlias )->( If( eof() .and. bof(), 0, OrdKeyCount() ) ) }
Code: Select all | Expand
WITH OBJECT xControl
:SetRdd()
:bGoTop := {|| ( :cAlias )->( DbGoTop() ) }
:bGoBottom := {|| ( :cAlias )->( DbGoBottom() ) }
:bSkip := {| n | ( :cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
:bBof := {|| ( :cAlias )->( Bof() ) }
:bEof := {|| ( :cAlias )->( Eof() ) }
:bBookMark := {| n | iif( n == nil,;
( :cAlias )->( RecNo() ),;
( :cAlias )->( DbGoto( n );
) ) }
//:bGoTop := { || ( nSelect )->( FazBrowseTop() ) }
//:bGoBottom := { || ( nSelect )->( FazBrowseBottom() ) }
//:bSkip := { | n | ( nSelect )->( FazBrowseSkip( n ) ) }
//:bBof := { || Bof() }
//:bEof := { || Eof() }
//:bBookMark := { | n | iif( n == nil, RecNo(), DbGoto( n ) ) }
ENDWITH
With same codeblocks, it is expected same result.Code: Select all | Expand
WITH OBJECT xControl
:SetRdd()
:bGoTop := {|| ( :cAlias )->( DbGoTop() ) }
:bGoBottom := {|| ( :cAlias )->( DbGoBottom() ) }
:bSkip := {| n | ( :cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
:bBof := {|| ( :cAlias )->( Bof() ) }
:bEof := {|| ( :cAlias )->( Eof() ) }
:bBookMark := {| n | iif( n == nil,;
( :cAlias )->( RecNo() ),;
( :cAlias )->( DbGoto( n );
) ) }
//:bGoTop := { || ( nSelect )->( FazBrowseTop() ) }
//:bGoBottom := { || ( nSelect )->( FazBrowseBottom() ) }
//:bSkip := { | n | ( nSelect )->( FazBrowseSkip( n ) ) }
//:bBof := { || Bof() }
//:bEof := { || Eof() }
//:bBookMark := { | n | iif( n == nil, RecNo(), DbGoto( n ) ) }
ENDWITH
With same codeblocks, it is expected same result.Code: Select all | Expand
function MyDbfSkipper( nRecs )
local nKeyFrom := OrdKeyNo()
DBSKIP( nRecs )
if Eof()
DbGoBottom()
elseif Bof(
DbGoTop()
endif
return OrdKeyNo() - nKeyFrom
Code: Select all | Expand
function MyDbfSkipper( nRecs )
local nKeyFrom := OrdKeyNo()
DBSKIP( nRecs )
if Eof()
DbGoBottom()
elseif Bof(
DbGoTop()
endif
return OrdKeyNo() - nKeyFrom
Code: Select all | Expand
#include "hbclass.ch"
PROCEDURE Main()
LOCAL a, b, x
SetMode(30,100)
CLS
a := AnyClass():New()
b := AnyClass():New()
WITH OBJECT a
:Value := 10
x := { || :Value } // created here, seems a:Value
ENDWITH
WITH OBJECT b
? a:Value
? b:Value
? eval( x ) // executed here, results b:Value
ENDWITH
Inkey(0)
RETURN
CREATE CLASS AnyClass
VAR Value INIT 0
ENDCLASS
Code: Select all | Expand
WITH OBJECT xControl
xControl:SetRdd()
xControl:bGoTop := {|| ( xControl:cAlias )->( DbGoTop() ) }
xControl:bGoBottom := {|| ( xControl:cAlias )->( DbGoBottom() ) }
xControl:bSkip := {| n | ( xControl:cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
xControl:bBof := {|| ( xControl:cAlias )->( Bof() ) }
xControl:bEof := {|| ( xControl:cAlias )->( Eof() ) }
xControl:bBookMark := {| n | iif( n == nil,;
( xControl:cAlias )->( RecNo() ),;
( xControl:cAlias )->( DbGoto( n );
) ) }
Code: Select all | Expand
#include "hbclass.ch"
PROCEDURE Main()
LOCAL a, b, x
SetMode(30,100)
CLS
a := AnyClass():New()
b := AnyClass():New()
WITH OBJECT a
:Value := 10
x := { || :Value } // created here, seems a:Value
ENDWITH
WITH OBJECT b
? a:Value
? b:Value
? eval( x ) // executed here, results b:Value
ENDWITH
Inkey(0)
RETURN
CREATE CLASS AnyClass
VAR Value INIT 0
ENDCLASS
Code: Select all | Expand
WITH OBJECT xControl
xControl:SetRdd()
xControl:bGoTop := {|| ( xControl:cAlias )->( DbGoTop() ) }
xControl:bGoBottom := {|| ( xControl:cAlias )->( DbGoBottom() ) }
xControl:bSkip := {| n | ( xControl:cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
xControl:bBof := {|| ( xControl:cAlias )->( Bof() ) }
xControl:bEof := {|| ( xControl:cAlias )->( Eof() ) }
xControl:bBookMark := {| n | iif( n == nil,;
( xControl:cAlias )->( RecNo() ),;
( xControl:cAlias )->( DbGoto( n );
) ) }
Code: Select all | Expand
WITH OBJECT xbrowse
:bGoTop := { || :Rs:MoveFirst() } // may use wrong object, anything:Rs:MoveFirst()
ENDWITH
Code: Select all | Expand
WITH OBJECT xBrowse
:bGoTop := RS:MoveNext() // use right object, RS
ENDWITH
Code: Select all | Expand
// Code-blocks for navitation
// Caution: Use allways full name for codeblocks, WITH OBJECT may fail
DATA bGoTop,; // codeblock for going to first row
bGoBottom,; // codeblock for going to last row
bSkip,; // codeblock for skiping rows, it receives the number of rows
Code: Select all | Expand
WITH OBJECT xbrowse
:bGoTop := { || :Rs:MoveFirst() } // may use wrong object, anything:Rs:MoveFirst()
ENDWITH
Code: Select all | Expand
WITH OBJECT xBrowse
:bGoTop := RS:MoveNext() // use right object, RS
ENDWITH
Code: Select all | Expand
// Code-blocks for navitation
// Caution: Use allways full name for codeblocks, WITH OBJECT may fail
DATA bGoTop,; // codeblock for going to first row
bGoBottom,; // codeblock for going to last row
bSkip,; // codeblock for skiping rows, it receives the number of rows
Code: Select all | Expand
xControl:bSkip := {| n | ( xControl:cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
Code: Select all | Expand
METHOD Skip( n ) CLASS TXBrowse
local nStart
local nSkipped := 0
if !::lClosed
TRY
if Empty( ::aFilter )
nSkipped := Eval( ::bSkip, n, Self )
else
nStart := ::nFltRow
::GoFltRow( ::nFltRow + IfNil( n, 1 ) )
nSkipped := ::nFltRow - nStart
endif
CATCH
::nLen := 0
::lClosed := .t.
END
endif
return nSkipped
Code: Select all | Expand
hb_Default( @n, 1 )
Code: Select all | Expand
FUNCTION hb_Default( a, b )
IF valType( a ) != ValType( b )
a := b
ENDIF
RETURN Nil
Code: Select all | Expand
METHOD Skip( n ) CLASS TXBrowse
local nStart
local nSkipped := 0
if !::lClosed
TRY
hb_Default( @n, 1 )
if Empty( ::aFilter )
nSkipped := Eval( ::bSkip, n, Self )
else
nStart := ::nFltRow
::GoFltRow( ::nFltRow + n )
nSkipped := ::nFltRow - nStart
endif
CATCH
::nLen := 0
::lClosed := .t.
END
endif
return nSkipped
Code: Select all | Expand
xControl:bSkip := {| n | ( xControl:cAlias )->( DbSkipper( IfNil( n, 1 ) ) ) }
Code: Select all | Expand
METHOD Skip( n ) CLASS TXBrowse
local nStart
local nSkipped := 0
if !::lClosed
TRY
if Empty( ::aFilter )
nSkipped := Eval( ::bSkip, n, Self )
else
nStart := ::nFltRow
::GoFltRow( ::nFltRow + IfNil( n, 1 ) )
nSkipped := ::nFltRow - nStart
endif
CATCH
::nLen := 0
::lClosed := .t.
END
endif
return nSkipped
Code: Select all | Expand
hb_Default( @n, 1 )
Code: Select all | Expand
FUNCTION hb_Default( a, b )
IF valType( a ) != ValType( b )
a := b
ENDIF
RETURN Nil
Code: Select all | Expand
METHOD Skip( n ) CLASS TXBrowse
local nStart
local nSkipped := 0
if !::lClosed
TRY
hb_Default( @n, 1 )
if Empty( ::aFilter )
nSkipped := Eval( ::bSkip, n, Self )
else
nStart := ::nFltRow
::GoFltRow( ::nFltRow + n )
nSkipped := ::nFltRow - nStart
endif
CATCH
::nLen := 0
::lClosed := .t.
END
endif
return nSkipped
Looking at the code, any programmer should expect the result to be 10,0,0 and in fact the result is 10,0,0.seems that result will be 10, 10, 0
but result is 10, 0, 0
Please check again. XBrowse program does not have any such defective code.WITH OBJECT xbrowse
:bGoTop := { || :Rs:MoveFirst() } // may use wrong object, anything:Rs:MoveFirst()
ENDWITH
Code: Select all | Expand
::bGoTop := { || ::oRs:MoveFirst() }
XBrowse never fails on Skip().This is the reason why we see xbrowse fail, but do not know that anything is wrong on bSkip codeblock. (as example the Nil)
To the best of our knowledge and experience, xbrowse never fails on such issues.we see xbrowse fail
Looking at the code, any programmer should expect the result to be 10,0,0 and in fact the result is 10,0,0.seems that result will be 10, 10, 0
but result is 10, 0, 0
Please check again. XBrowse program does not have any such defective code.WITH OBJECT xbrowse
:bGoTop := { || :Rs:MoveFirst() } // may use wrong object, anything:Rs:MoveFirst()
ENDWITH
Code: Select all | Expand
::bGoTop := { || ::oRs:MoveFirst() }
XBrowse never fails on Skip().This is the reason why we see xbrowse fail, but do not know that anything is wrong on bSkip codeblock. (as example the Nil)
To the best of our knowledge and experience, xbrowse never fails on such issues.we see xbrowse fail
Code: Select all | Expand
function ColPopUp()
local oPop
MENU oPop POPUP 2007 ;
SELECT "STATES" ; // alias
COLUMNS 1, 2 ;
HEADERS "One", "Two"
ENDMENU
return oPop
]]>Code: Select all | Expand
function ColPopUp()
local oPop
MENU oPop POPUP 2007 ;
SELECT "STATES" ; // alias
COLUMNS 1, 2 ;
HEADERS "One", "Two"
ENDMENU
return oPop
]]>Code: Select all | Expand
//----------------------------------------------------------------------------//
// Author: Cristobal Navarro
// Sample demo Features MENUS, using databases and arrays
//----------------------------------------------------------------------------//
#include "FiveWin.ch"
Static oWnd
Static oFontMnu
function Main()
local oMenu
DEFINE FONT oFontMnu NAME "Segoe UI Symbol" SIZE 0, -14
DbUseArea( .T., , "Customer.dbf" )
DbUseArea( .T., , "utf8_01.dbf" )
DbUseArea( .T., , "states.dbf" )
//DbGoto( 3 )
DEFINE WINDOW oWnd TITLE "Test Menu From Databases and Arrays: " MENU MenuDatabase() ;
FROM 20, 40 TO 650, 1200 PIXEL
oWnd:bRClicked := { | nR, nC | MenuDatabase( .T., .F., nR, nC ) }
CtrlMove( oWnd )
ACTIVATE WINDOW oWnd ON INIT MenuDatabase( .F., .T., , ) MAXIMIZED
RELEASE oFontMnu
return nil
//----------------------------------------------------------------------------//
Function MenuDatabase( lPopup, lSys, nR, nC )
local oMenu
DEFAULT lPopup := .F.
DEFAULT lSys := .F.
if !lPopup
if !lSys
MENU oMenu 2013 ;
COLORMENU METRO_STEEL, CLR_WHITE ;
COLORLEFT CLR_WHITE, METRO_STEEL ;
COLORRIGHT CLR_WHITE, METRO_STEEL ;
COLORSELECT CLR_HCYAN, CLR_HCYAN, Rgb( 0, 0, 1 ) ; //CLR_WHITE, CLR_WHITE, CLR_BLUE ;
COLORSEPARATOR CLR_RED ;
COLORBOX CLR_WHITE
else
REDEFINE SYSMENU oMenu OF oWnd 2013 ;
COLORMENU METRO_STEEL, CLR_WHITE ;
COLORLEFT CLR_WHITE, METRO_STEEL ;
COLORRIGHT CLR_WHITE, METRO_STEEL ;
COLORSELECT CLR_WHITE, CLR_WHITE, CLR_BLUE ;
COLORSEPARATOR CLR_RED ;
COLORBOX CLR_WHITE
SEPARATOR
endif
else
MENU oMenu 2013 POPUP FONT oFontMnu ;
COLORMENU METRO_STEEL, CLR_WHITE ;
COLORLEFT CLR_WHITE, METRO_STEEL ;
COLORRIGHT CLR_WHITE, METRO_STEEL ;
COLORSELECT CLR_WHITE, CLR_WHITE, CLR_BLUE ;
COLORSEPARATOR CLR_RED ;
COLORBOX CLR_WHITE
endif
if lPopup
MENUITEM "Databases and Arrays Test and Font" SEPARATOR OF oMenu BOLD //ITALIC
SEPARATOR
endif
MENUITEM Alias( 1 ) // COLORMENU CLR_RED, CLR_YELLOW
MENU SELECT Alias( 1 ) LIMIT 16 COLUMNS 1, 4, 5
ENDMENU
MENUITEM Alias( 2 )
MENU SELECT Alias( 2 ) LIMIT 06 COLUMNS 1, 2, 3
ENDMENU
MENUITEM Alias( 3 )
MENU SELECT Alias( 3 ) LIMIT -1 COLUMNS 2
ENDMENU
MENUITEM Alias( 2 ) + "_EXPAND"
MENU SELECT Alias( 2 ) LIMIT 06 COLUMNS 1, 2, 3 EXPAND
ENDMENU
MENUITEM Upper( "FieldNames_" ) + Alias( 1 )
MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 2, 1, 3 //, 4
ENDMENU
MENUITEM Upper( "FieldNames_" ) + Alias( 1 ) + "_EXPAND"
MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 1, 2, 3, 4 ;
EXPAND NOFORM HEADERS "Name", "Type", "Length", "Decs"
ENDMENU
MENUITEM Upper( "FieldNames" ) + "_EXPAND_FORM_ACTIONS"
MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 1, 2, 3, 4 EXPAND ;
HEADERS "Name", "Type", "Length", "Decs" ACTION { | oI | MyAction( oI ) }
//LEFTWIDTH if( lSys, 24, 1 ) ;
//LOGOMENU "..\bitmaps\fivetechv.png" ;
ENDMENU
MENUITEM "EXIT" ACTION oWnd:End() WHEN ( !lPopup .and. !lSys )
if lPopup
ENDMENU
if nC < oWnd:nRight - 400
ACTIVATE MENU oMenu AT nR, nC OF oWnd // Limit zone for show menu
else
oMenu:End() // Release Menus created
endif
else
if lSys
SEPARATOR
MENUITEM "Reset Menu" ACTION oMenu:Reset()
ENDSYSMENU
else
ENDMENU
endif
endif
Return oMenu
//----------------------------------------------------------------------------//
Function MyAction( oI )
//oI:SetCheck(.T.)
? "Object Item: ", oI, ;
"Position into Menu Parent: ", oI:nPos, ;
"oItem cPrompt:", oI:cPrompt, ;
"oItem Id: ", oI:nId, ;
"Object Menu Parent of Item: ", oI:oMenu, ;
"Position of Menu Parent: ", oI:oMenu:nPos
? "Object Menu Principal: ", Valtype( GetaMenusAux()[ 1 ] ), GetaMenusAux()[ 1 ]:lMenuBar
? "Items of Menu Principal: ", Len( GetaMenusAux()[ 1 ]:aMenuItems )
? "Menu Parent of Menu of Item Selected", GetParentAuxMenus( oI:oMenu ), ;
"Items of this Menu: ", Len( GetParentAuxMenus( oI:oMenu ):aMenuItems ), ;
"Separators, they are also counted"
? "Len Items Menu 5: ", Len( GetaMenusAux()[ 5 ]:aMenuItems )
? "Total Menus Create: ", Len( GetaMenusAux() )
Return nil
//----------------------------------------------------------------------------//
Function CtrlMove( oDlg )
local oFontWD2
local nRow := oDlg:nBottom - 150
local nCol := oDlg:nRight - 350
local nSize := 32
local oSay
@ nRow - 64, 20 GROUP TO nRow + 54, oDlg:nRight - 460 OF oDlg PIXEL PROMPT " Notes: "
@ nRow - 64, oDlg:nRight - 450 GROUP TO nRow + 54, oDlg:nRight - 80 OF oDlg PIXEL PROMPT " Menu " + Alias( 1 ) + " Changes: "
@ nRow - 24, 80 SAY " - Press RIGHT BUTTON of Mouse for Test Menu POPUP: [ MAX -> oWnd:nRight - 400 ]" ;
PIXEL OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 550, 24
@ nRow + 12, 80 SAY " - Press over ICON Application for Test SYSMENU" PIXEL ;
OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 550, 24
@ nRow - 24, nCol - nSize - 24 SAY oSay PROMPT " Controls for movement: " + Alias( 1 ) PIXEL ;
OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 230, 22
oFontWD2 := TFont():New( 'Wingdings 3', 0, -21, .f., .f., 0, 0, 400, .f., .f., .f., 2,3, 2, 1,, 18 )
@ nRow, nCol BTNBMP PROMPT Chr( HexToDec( "72" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ; //BITMAP aBmp[ 1 ]
TOOLTIP FWString( "Top" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( ATTop() )
@ nRow, nCol + nSize * 1 + 1 BTNBMP PROMPT Chr( HexToDec( "76" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
TOOLTIP FWString( "Move Up" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( Retrocede() )
@ nRow, nCol + nSize * 2 + 2 BTNBMP PROMPT Chr( HexToDec( "77" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
TOOLTIP FWString( "Move Down" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( Avanza() )
@ nRow, nCol + nSize * 3 + 3 BTNBMP PROMPT Chr( HexToDec( "73" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
TOOLTIP FWString( "Bottom" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( ATBottom() )
oFontWD2:End()
AEval( oDlg:aControls, { |o| If( o:ClassName() == "TBTNBMP", ( o:SetColor( CLR_WHITE, METRO_OLIVE ), o:nRound := 0 ), nil ) } )
Return nil
//----------------------------------------------------------------------------//
Function Avanza( nAr )
local nRec := ( Alias( 1 ) )->( RecNo() )
local nPos := 0
local x
local oMnu := GetaMenusAux()[ 2 ]
local n
local aItems := {}
DEFAULT nAr := 1
//? oWnd:oMenu:hMenu, Len( GetaMenusAux()[ 1 ]:aMenuItems ), GetaMenusAux()[ 2 ]:aMenuItems[ 4 ]:cPrompt
//? GetaMenusAux()[ 1 ]:aMenuItems[ 1 ]:bAction:hMenu, oMnu:hMenu
if !Empty( oMnu )
if oMnu:nLimit > 0
( Alias( nAr ) )->( DbGoTo( ( oMnu:nLimit * oMnu:nPage ) + 1 ) )
if ( Alias( nAr ) )->( !Eof() )
oMnu:nPage++
aItems := oMnu:aMenuItems
x := 0
Do While ( Alias( nAr ) )->( !Eof() )
x++
if x > oMnu:nLimit
Exit
endif
For n = 1 to Len( oMnu:aCols )
aItems[ x + ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
Next n
( Alias( nAr ) )->( DbSkip() )
Enddo
endif
endif
endif
( Alias( nAr ) )->( DbGoTo( nRec ) )
Return nil
//----------------------------------------------------------------------------//
Function Retrocede( nAr )
local nRec := ( Alias( 1 ) )->( RecNo() )
local nPos := 0
local x
local oMnu := GetaMenusAux()[ 2 ]
local n
local aItems := {}
DEFAULT nAr := 1
if !Empty( oMnu )
if oMnu:nLimit > 0
( Alias( nAr ) )->( DbGoTo( ( oMnu:nLimit * ( oMnu:nPage - 2 ) ) + 1 ) )
if ( Alias( nAr ) )->( !Bof() )
oMnu:nPage--
aItems := oMnu:aMenuItems
x := 0
Do While ( Alias( nAr ) )->( !Bof() )
x++
if x > oMnu:nLimit
Exit
endif
For n = 1 to Len( oMnu:aCols )
aItems[ x + ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
Next n
( Alias( nAr ) )->( DbSkip( 1 ) )
Enddo
endif
endif
endif
( Alias( nAr ) )->( DbGoTo( nRec ) )
Return nil
//----------------------------------------------------------------------------//
Function ATTop( nAr )
local nRec := ( Alias( 1 ) )->( RecNo() )
local nPos := 0
local x
local oMnu := GetaMenusAux()[ 2 ]
local n
local aItems := {}
DEFAULT nAr := 1
if !Empty( oMnu )
if oMnu:nLimit > 0
( Alias( nAr ) )->( DbGoTop() )
if ( Alias( nAr ) )->( !Eof() )
oMnu:nPage := 1
aItems := oMnu:aMenuItems
x := 0
Do While ( Alias( nAr ) )->( !Eof() )
x++
if x > oMnu:nLimit
Exit
endif
For n = 1 to Len( oMnu:aCols )
aItems[ x + ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
Next n
( Alias( nAr ) )->( DbSkip() )
Enddo
endif
endif
endif
( Alias( nAr ) )->( DbGoTo( nRec ) )
Return nil
//----------------------------------------------------------------------------//
Function ATBottom( nAr )
local nRec := ( Alias( 1 ) )->( RecNo() )
local nPos := 0
local x
local oMnu := GetaMenusAux()[ 2 ]
local n
local aItems := {}
DEFAULT nAr := 1
if !Empty( oMnu )
if oMnu:nLimit > 0
( Alias( nAr ) )->( DbGoTo( ( Alias( 1 ) )->( LastRec() ) - oMnu:nLimit + 1 ) )
if ( Alias( nAr ) )->( !Eof() )
oMnu:nPage := if( ( ( Alias( nAr ) )->( LastRec() ) % oMnu:nLimit ) = 0, ;
( ( Alias( nAr ) )->( LastRec() ) / oMnu:nLimit ), ;
Int( ( Alias( nAr ) )->( LastRec() ) / oMnu:nLimit ) + 1 )
aItems := oMnu:aMenuItems
x := 0
Do While ( Alias( nAr ) )->( !Eof() )
x++
if x > oMnu:nLimit
Exit
endif
For n = 1 to Len( oMnu:aCols )
aItems[ x + ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
Next n
( Alias( nAr ) )->( DbSkip() )
Enddo
endif
endif
endif
( Alias( nAr ) )->( DbGoTo( nRec ) )
Return nil
//----------------------------------------------------------------------------//
Code: Select all | Expand
//----------------------------------------------------------------------------//
// Author: Cristobal Navarro
// Sample demo Features MENUS, using databases and arrays
//----------------------------------------------------------------------------//
#include "FiveWin.ch"
Static oWnd
Static oFontMnu
function Main()
local oMenu
DEFINE FONT oFontMnu NAME "Segoe UI Symbol" SIZE 0, -14
DbUseArea( .T., , "Customer.dbf" )
DbUseArea( .T., , "utf8_01.dbf" )
DbUseArea( .T., , "states.dbf" )
//DbGoto( 3 )
DEFINE WINDOW oWnd TITLE "Test Menu From Databases and Arrays: " MENU MenuDatabase() ;
FROM 20, 40 TO 650, 1200 PIXEL
oWnd:bRClicked := { | nR, nC | MenuDatabase( .T., .F., nR, nC ) }
CtrlMove( oWnd )
ACTIVATE WINDOW oWnd ON INIT MenuDatabase( .F., .T., , ) MAXIMIZED
RELEASE oFontMnu
return nil
//----------------------------------------------------------------------------//
Function MenuDatabase( lPopup, lSys, nR, nC )
local oMenu
DEFAULT lPopup := .F.
DEFAULT lSys := .F.
if !lPopup
if !lSys
MENU oMenu 2013 ;
COLORMENU METRO_STEEL, CLR_WHITE ;
COLORLEFT CLR_WHITE, METRO_STEEL ;
COLORRIGHT CLR_WHITE, METRO_STEEL ;
COLORSELECT CLR_HCYAN, CLR_HCYAN, Rgb( 0, 0, 1 ) ; //CLR_WHITE, CLR_WHITE, CLR_BLUE ;
COLORSEPARATOR CLR_RED ;
COLORBOX CLR_WHITE
else
REDEFINE SYSMENU oMenu OF oWnd 2013 ;
COLORMENU METRO_STEEL, CLR_WHITE ;
COLORLEFT CLR_WHITE, METRO_STEEL ;
COLORRIGHT CLR_WHITE, METRO_STEEL ;
COLORSELECT CLR_WHITE, CLR_WHITE, CLR_BLUE ;
COLORSEPARATOR CLR_RED ;
COLORBOX CLR_WHITE
SEPARATOR
endif
else
MENU oMenu 2013 POPUP FONT oFontMnu ;
COLORMENU METRO_STEEL, CLR_WHITE ;
COLORLEFT CLR_WHITE, METRO_STEEL ;
COLORRIGHT CLR_WHITE, METRO_STEEL ;
COLORSELECT CLR_WHITE, CLR_WHITE, CLR_BLUE ;
COLORSEPARATOR CLR_RED ;
COLORBOX CLR_WHITE
endif
if lPopup
MENUITEM "Databases and Arrays Test and Font" SEPARATOR OF oMenu BOLD //ITALIC
SEPARATOR
endif
MENUITEM Alias( 1 ) // COLORMENU CLR_RED, CLR_YELLOW
MENU SELECT Alias( 1 ) LIMIT 16 COLUMNS 1, 4, 5
ENDMENU
MENUITEM Alias( 2 )
MENU SELECT Alias( 2 ) LIMIT 06 COLUMNS 1, 2, 3
ENDMENU
MENUITEM Alias( 3 )
MENU SELECT Alias( 3 ) LIMIT -1 COLUMNS 2
ENDMENU
MENUITEM Alias( 2 ) + "_EXPAND"
MENU SELECT Alias( 2 ) LIMIT 06 COLUMNS 1, 2, 3 EXPAND
ENDMENU
MENUITEM Upper( "FieldNames_" ) + Alias( 1 )
MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 2, 1, 3 //, 4
ENDMENU
MENUITEM Upper( "FieldNames_" ) + Alias( 1 ) + "_EXPAND"
MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 1, 2, 3, 4 ;
EXPAND NOFORM HEADERS "Name", "Type", "Length", "Decs"
ENDMENU
MENUITEM Upper( "FieldNames" ) + "_EXPAND_FORM_ACTIONS"
MENU SELECT ( Alias( 1 ) )->( DbStruct() ) LIMIT -1 COLUMNS 1, 2, 3, 4 EXPAND ;
HEADERS "Name", "Type", "Length", "Decs" ACTION { | oI | MyAction( oI ) }
//LEFTWIDTH if( lSys, 24, 1 ) ;
//LOGOMENU "..\bitmaps\fivetechv.png" ;
ENDMENU
MENUITEM "EXIT" ACTION oWnd:End() WHEN ( !lPopup .and. !lSys )
if lPopup
ENDMENU
if nC < oWnd:nRight - 400
ACTIVATE MENU oMenu AT nR, nC OF oWnd // Limit zone for show menu
else
oMenu:End() // Release Menus created
endif
else
if lSys
SEPARATOR
MENUITEM "Reset Menu" ACTION oMenu:Reset()
ENDSYSMENU
else
ENDMENU
endif
endif
Return oMenu
//----------------------------------------------------------------------------//
Function MyAction( oI )
//oI:SetCheck(.T.)
? "Object Item: ", oI, ;
"Position into Menu Parent: ", oI:nPos, ;
"oItem cPrompt:", oI:cPrompt, ;
"oItem Id: ", oI:nId, ;
"Object Menu Parent of Item: ", oI:oMenu, ;
"Position of Menu Parent: ", oI:oMenu:nPos
? "Object Menu Principal: ", Valtype( GetaMenusAux()[ 1 ] ), GetaMenusAux()[ 1 ]:lMenuBar
? "Items of Menu Principal: ", Len( GetaMenusAux()[ 1 ]:aMenuItems )
? "Menu Parent of Menu of Item Selected", GetParentAuxMenus( oI:oMenu ), ;
"Items of this Menu: ", Len( GetParentAuxMenus( oI:oMenu ):aMenuItems ), ;
"Separators, they are also counted"
? "Len Items Menu 5: ", Len( GetaMenusAux()[ 5 ]:aMenuItems )
? "Total Menus Create: ", Len( GetaMenusAux() )
Return nil
//----------------------------------------------------------------------------//
Function CtrlMove( oDlg )
local oFontWD2
local nRow := oDlg:nBottom - 150
local nCol := oDlg:nRight - 350
local nSize := 32
local oSay
@ nRow - 64, 20 GROUP TO nRow + 54, oDlg:nRight - 460 OF oDlg PIXEL PROMPT " Notes: "
@ nRow - 64, oDlg:nRight - 450 GROUP TO nRow + 54, oDlg:nRight - 80 OF oDlg PIXEL PROMPT " Menu " + Alias( 1 ) + " Changes: "
@ nRow - 24, 80 SAY " - Press RIGHT BUTTON of Mouse for Test Menu POPUP: [ MAX -> oWnd:nRight - 400 ]" ;
PIXEL OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 550, 24
@ nRow + 12, 80 SAY " - Press over ICON Application for Test SYSMENU" PIXEL ;
OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 550, 24
@ nRow - 24, nCol - nSize - 24 SAY oSay PROMPT " Controls for movement: " + Alias( 1 ) PIXEL ;
OF oDlg COLOR CLR_WHITE, METRO_OLIVE FONT oFontMnu SIZE 230, 22
oFontWD2 := TFont():New( 'Wingdings 3', 0, -21, .f., .f., 0, 0, 400, .f., .f., .f., 2,3, 2, 1,, 18 )
@ nRow, nCol BTNBMP PROMPT Chr( HexToDec( "72" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ; //BITMAP aBmp[ 1 ]
TOOLTIP FWString( "Top" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( ATTop() )
@ nRow, nCol + nSize * 1 + 1 BTNBMP PROMPT Chr( HexToDec( "76" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
TOOLTIP FWString( "Move Up" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( Retrocede() )
@ nRow, nCol + nSize * 2 + 2 BTNBMP PROMPT Chr( HexToDec( "77" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
TOOLTIP FWString( "Move Down" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( Avanza() )
@ nRow, nCol + nSize * 3 + 3 BTNBMP PROMPT Chr( HexToDec( "73" ) ) SIZE nSize, nSize + 1 PIXEL OF oDlg FLAT ;
TOOLTIP FWString( "Bottom" ) + " " + Alias( 1 ) FONT oFontWD2 ACTION ( ATBottom() )
oFontWD2:End()
AEval( oDlg:aControls, { |o| If( o:ClassName() == "TBTNBMP", ( o:SetColor( CLR_WHITE, METRO_OLIVE ), o:nRound := 0 ), nil ) } )
Return nil
//----------------------------------------------------------------------------//
Function Avanza( nAr )
local nRec := ( Alias( 1 ) )->( RecNo() )
local nPos := 0
local x
local oMnu := GetaMenusAux()[ 2 ]
local n
local aItems := {}
DEFAULT nAr := 1
//? oWnd:oMenu:hMenu, Len( GetaMenusAux()[ 1 ]:aMenuItems ), GetaMenusAux()[ 2 ]:aMenuItems[ 4 ]:cPrompt
//? GetaMenusAux()[ 1 ]:aMenuItems[ 1 ]:bAction:hMenu, oMnu:hMenu
if !Empty( oMnu )
if oMnu:nLimit > 0
( Alias( nAr ) )->( DbGoTo( ( oMnu:nLimit * oMnu:nPage ) + 1 ) )
if ( Alias( nAr ) )->( !Eof() )
oMnu:nPage++
aItems := oMnu:aMenuItems
x := 0
Do While ( Alias( nAr ) )->( !Eof() )
x++
if x > oMnu:nLimit
Exit
endif
For n = 1 to Len( oMnu:aCols )
aItems[ x + ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
Next n
( Alias( nAr ) )->( DbSkip() )
Enddo
endif
endif
endif
( Alias( nAr ) )->( DbGoTo( nRec ) )
Return nil
//----------------------------------------------------------------------------//
Function Retrocede( nAr )
local nRec := ( Alias( 1 ) )->( RecNo() )
local nPos := 0
local x
local oMnu := GetaMenusAux()[ 2 ]
local n
local aItems := {}
DEFAULT nAr := 1
if !Empty( oMnu )
if oMnu:nLimit > 0
( Alias( nAr ) )->( DbGoTo( ( oMnu:nLimit * ( oMnu:nPage - 2 ) ) + 1 ) )
if ( Alias( nAr ) )->( !Bof() )
oMnu:nPage--
aItems := oMnu:aMenuItems
x := 0
Do While ( Alias( nAr ) )->( !Bof() )
x++
if x > oMnu:nLimit
Exit
endif
For n = 1 to Len( oMnu:aCols )
aItems[ x + ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
Next n
( Alias( nAr ) )->( DbSkip( 1 ) )
Enddo
endif
endif
endif
( Alias( nAr ) )->( DbGoTo( nRec ) )
Return nil
//----------------------------------------------------------------------------//
Function ATTop( nAr )
local nRec := ( Alias( 1 ) )->( RecNo() )
local nPos := 0
local x
local oMnu := GetaMenusAux()[ 2 ]
local n
local aItems := {}
DEFAULT nAr := 1
if !Empty( oMnu )
if oMnu:nLimit > 0
( Alias( nAr ) )->( DbGoTop() )
if ( Alias( nAr ) )->( !Eof() )
oMnu:nPage := 1
aItems := oMnu:aMenuItems
x := 0
Do While ( Alias( nAr ) )->( !Eof() )
x++
if x > oMnu:nLimit
Exit
endif
For n = 1 to Len( oMnu:aCols )
aItems[ x + ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
Next n
( Alias( nAr ) )->( DbSkip() )
Enddo
endif
endif
endif
( Alias( nAr ) )->( DbGoTo( nRec ) )
Return nil
//----------------------------------------------------------------------------//
Function ATBottom( nAr )
local nRec := ( Alias( 1 ) )->( RecNo() )
local nPos := 0
local x
local oMnu := GetaMenusAux()[ 2 ]
local n
local aItems := {}
DEFAULT nAr := 1
if !Empty( oMnu )
if oMnu:nLimit > 0
( Alias( nAr ) )->( DbGoTo( ( Alias( 1 ) )->( LastRec() ) - oMnu:nLimit + 1 ) )
if ( Alias( nAr ) )->( !Eof() )
oMnu:nPage := if( ( ( Alias( nAr ) )->( LastRec() ) % oMnu:nLimit ) = 0, ;
( ( Alias( nAr ) )->( LastRec() ) / oMnu:nLimit ), ;
Int( ( Alias( nAr ) )->( LastRec() ) / oMnu:nLimit ) + 1 )
aItems := oMnu:aMenuItems
x := 0
Do While ( Alias( nAr ) )->( !Eof() )
x++
if x > oMnu:nLimit
Exit
endif
For n = 1 to Len( oMnu:aCols )
aItems[ x + ( 2 * n ) + oMnu:nLimit * ( n - 1 ) ]:SetPrompt( ( Alias( nAr ) )->( FieldGet( oMnu:aCols[ n ] ) ) )
Next n
( Alias( nAr ) )->( DbSkip() )
Enddo
endif
endif
endif
( Alias( nAr ) )->( DbGoTo( nRec ) )
Return nil
//----------------------------------------------------------------------------//
Code: Select all | Expand
fld:={1,2}
MENU oPop POPUP 2015 COLUMNS fld ;
MENUITEM oCl PROMPT {"one", "two"}
ENDMENU
Code: Select all | Expand
fld:={1,2}
MENU oPop POPUP 2015 COLUMNS fld ;
MENUITEM oCl PROMPT {"one", "two"}
ENDMENU
Code: Select all | Expand
//----------------------------------------------------------------------------//
#include "Fivewin.ch"
//----------------------------------------------------------------------------//
Function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Test Menu MultiColumn: " ;
FROM 20, 40 TO 650, 1200 PIXEL
oWnd:bRClicked := { | nR, nC | MyPopMnu( oWnd, nR, nC ) }
ACTIVATE WINDOW oWnd
Return nil
//----------------------------------------------------------------------------//
Function MyPopMnu( oWnd, nR, nC )
local oPop
MENU oPop POPUP 2015
MENUITEM "Array"
MENU SELECT { { "one1", "two1" }, { "one2", "two2" } } COLUMNS 1, 2 HEADERS "Col-1", "Col-2"
ENDMENU
ENDMENU
ACTIVATE MENU oPop AT nR, nC OF oWnd
Return oPop
//----------------------------------------------------------------------------//
Code: Select all | Expand
//----------------------------------------------------------------------------//
#include "Fivewin.ch"
//----------------------------------------------------------------------------//
Function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Test Menu MultiColumn: " ;
FROM 20, 40 TO 650, 1200 PIXEL
oWnd:bRClicked := { | nR, nC | MyPopMnu( oWnd, nR, nC ) }
ACTIVATE WINDOW oWnd
Return nil
//----------------------------------------------------------------------------//
Function MyPopMnu( oWnd, nR, nC )
local oPop
MENU oPop POPUP 2015
MENUITEM "Array"
MENU SELECT { { "one1", "two1" }, { "one2", "two2" } } COLUMNS 1, 2 HEADERS "Col-1", "Col-2"
ENDMENU
ENDMENU
ACTIVATE MENU oPop AT nR, nC OF oWnd
Return oPop
//----------------------------------------------------------------------------//
Code: Select all | Expand
Methods of the TXBrowse Class
Here's a detailed list of the methods of the TXBrowse class, including parameters, return values, and usage examples:
1. New( oWnd )
Description: Constructor for the TXBrowse class. Creates a new TXBrowse object as a child of the specified window.
Parameters:
oWnd: OBJECT - The parent TWindow object for the browse control.
Return Value: OBJECT - Returns the newly created TXBrowse object (Self).
Usage Example:
oBrw := TXBrowse():New( oWnd )
content_copy
download
Use code with caution.
Harbour
2. Destroy()
Description: Destructor for the TXBrowse class. Releases resources associated with the browse control, including bitmaps, pens, brushes, and data connections.
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Destroy()
content_copy
download
Use code with caution.
Harbour
3. SetStyle( nStyle )
Description: Sets the visual style of the browse control.
Parameters:
nStyle: NUMERIC or CODEBLOCK - Style number (e.g., 2007, flat) or a codeblock that returns a color gradient specification.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetStyle( 2007 ) // Sets the style to the 2007 visual style.
oBrw:SetStyle( { |lInvert| { { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, { 2/3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } } } ) // Sets a custom gradient.
content_copy
download
Use code with caution.
Harbour
4. SetDarkTheme( nTheme )
Description: Sets the browse control to a dark theme appearance.
Parameters:
nTheme: NUMERIC - Theme number (currently only 1 is supported for dark theme).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetDarkTheme( 1 ) // Enables dark theme.
content_copy
download
Use code with caution.
Harbour
5. SetRecSelBmp( uNew )
Description: Sets the bitmap used for the record selector triangle.
Parameters:
uNew: CHARACTER or NUMERIC - Path to a bitmap file or 0 to use the default arrow bitmap or NIL for no bitmap.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetRecSelBmp( "myarrow.bmp" ) // Sets a custom bitmap for record selector.
oBrw:SetRecSelBmp( 0 ) // Uses default arrow bitmap.
oBrw:SetRecSelBmp( nil ) // Removes the bitmap.
content_copy
download
Use code with caution.
Harbour
6. SetRecSelSl( nType )
Description: Sets the record selector to display either record numbers or key numbers.
Parameters:
nType: NUMERIC - 1 to display record numbers (RecNo), 2 to display key numbers (KeyNo), or any other value to display nothing.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetRecSelSl( 1 ) // Displays record numbers in the selector column.
oBrw:SetRecSelSl( 2 ) // Displays key numbers in the selector column.
oBrw:SetRecSelSl( 0 ) // Hides the record number/key number display.
content_copy
download
Use code with caution.
Harbour
7. SetRightFreeze( oCol )
Description: Sets a column as the right-freeze column, which remains visible when horizontally scrolling.
Parameters:
oCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to be frozen on the right side, or NIL to remove right-freeze column.
Return Value: OBJECT - Returns the right-freeze TxBrwColumn object or NIL if no right-freeze column is set.
Usage Example:
oBrw:SetRightFreeze( oBrw:aCols[ 3 ] ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( 3 ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( nil ) // Removes any right-freeze column.
content_copy
download
Use code with caution.
Harbour
8. nAt()
Description: Returns the index of the currently selected column within the displayed columns array.
Parameters: None
Return Value: NUMERIC - Index of the selected column in aDisplay array.
Usage Example:
nColIndex := oBrw:nAt()
content_copy
download
Use code with caution.
Harbour
9. EraseBkGnd()
Description: Erases the background of the browse control.
Parameters: None
Return Value: NUMERIC - Always returns 1.
Usage Example:
oBrw:EraseBkGnd()
content_copy
download
Use code with caution.
Harbour
10. cGenPrg( lDlgUnits )
Description: Generates a code snippet (PRG code) to recreate the browse control with its current settings.
Parameters:
lDlgUnits: LOGICAL - Flag indicating if dialog units should be used for size and position.
Return Value: CHARACTER - String containing the generated PRG code.
Usage Example:
cPrgCode := oBrw:cGenPrg( .T. ) // Generates PRG code using dialog units.
content_copy
download
Use code with caution.
Harbour
11. SetRDD( lAddColumns, lAutoOrder, aFldNames, aRows )
Description: Sets the data source to an RDD (e.g., DBF database).
Parameters:
lAddColumns: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.
lAutoOrder: LOGICAL - .T. to enable automatic ordering based on index tags, .F. otherwise.
aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).
aRows: ARRAY - Array data (optional, if array data is used instead of RDD).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetRDD( .T., .T. ) // Sets DBF as datasource, automatically adding columns and enabling auto-order.
oBrw:SetRDD( .F., .F., { "FIELD1", "FIELD2" } ) // Sets DBF and specifies columns to add.
content_copy
download
Use code with caution.
Harbour
12. SQLRDD_OrdKeyNo( n )
Description: Sets or gets the order key number for SQLRDD data source.
Parameters:
n: NUMERIC - Order key number to set (optional).
Return Value: NUMERIC - Returns the current order key number.
Usage Example:
nKeyNo := oBrw:SQLRDD_OrdKeyNo() // Gets current order key number.
oBrw:SQLRDD_OrdKeyNo( 5 ) // Sets the order key number to 5.
content_copy
download
Use code with caution.
Harbour
13. SQLRDD_OrdkeyGoto( n )
Description: Moves the record pointer in SQLRDD to the specified order key number.
Parameters:
n: NUMERIC - Order key number to go to.
Return Value: None
Usage Example:
oBrw:SQLRDD_OrdkeyGoto( 10 ) // Moves to order key number 10.
content_copy
download
Use code with caution.
Harbour
14. SQLRDD_CalcKeyNo()
Description: Recalculates and returns the current key number for SQLRDD data source.
Parameters: None
Return Value: NUMERIC - Returns the calculated key number.
Usage Example:
nKeyNo := oBrw:SQLRDD_CalcKeyNo()
content_copy
download
Use code with caution.
Harbour
15. SQLRDD_BookMark( nGoTo )
Description: Sets or gets a bookmark for SQLRDD data source based on record number.
Parameters:
nGoTo: NUMERIC - Record number to bookmark (optional).
Return Value: NUMERIC - Returns the current bookmark value (record number).
Usage Example:
nBookmark := oBrw:SQLRDD_BookMark() // Gets current bookmark.
oBrw:SQLRDD_BookMark( 25 ) // Sets bookmark to record number 25.
content_copy
download
Use code with caution.
Harbour
16. SQLRDD_Skipper( n )
Description: Skips records forward or backward in SQLRDD data source.
Parameters:
n: NUMERIC - Number of records to skip (positive for forward, negative for backward).
Return Value: NUMERIC - Returns the number of records actually skipped.
Usage Example:
nSkipped := oBrw:SQLRDD_Skipper( 10 ) // Skips 10 records forward.
nSkipped := oBrw:SQLRDD_Skipper( -5 ) // Skips 5 records backward.
content_copy
download
Use code with caution.
Harbour
17. SQLRDD_Adjust()
Description: Adjusts the browse control for SQLRDD data source (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
18. SQLRDD_SaveState()
Description: Saves the state of the browse control for SQLRDD data source (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
19. ResetData( uSrc, aCols )
Description: Resets the browse control's data and columns.
Parameters:
uSrc: - New data source (can be array, DBF alias, or other supported types).
aCols: ARRAY - Array of column specifications for the new data (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:ResetData( "NEW_DBF_ALIAS" ) // Resets data to a new DBF alias.
oBrw:ResetData( myNewArray, myColumnSpecs ) // Resets data to a new array with specified columns.
content_copy
download
Use code with caution.
Harbour
20. SetArray( aData, lAutoOrder, nColOrder, aCols, bOnSkip )
Description: Sets the data source to an array.
Parameters:
aData: ARRAY - Two-dimensional array containing the data to display.
lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.
nColOrder: NUMERIC - Column index to order the array data by (if lAutoOrder is .T.).
aCols: ARRAY - Array of column specifications (optional).
bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetArray( myDataArray, .T., 2 ) // Sets array data, enables auto-order by 2nd column.
oBrw:SetArray( myDataArray, .F., , myColumnSpecs ) // Sets array data with custom column specs.
content_copy
download
Use code with caution.
Harbour
21. SetoDbf( oDbf, aCols, lAutoSort, lAutoCols, aRows )
Description: Sets the data source to an ODBF object.
Parameters:
oDbf: OBJECT - ODBF object representing the database table.
aCols: ARRAY - Array of column specifications (optional).
lAutoSort: LOGICAL - .T. to enable auto-sorting, .F. otherwise.
lAutoCols: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.
aRows: ARRAY - Array data (optional, if array data is used instead of DBF).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetoDbf( myDbfObject, myColumnSpecs, .T., .F. ) // Sets ODBF object as datasource with custom columns and auto-sorting enabled.
content_copy
download
Use code with caution.
Harbour
22. SetExcelRange( oRange, lHeaders, aCols )
Description: Sets the data source to an Excel range object.
Parameters:
oRange: OBJECT - Excel Range object.
lHeaders: LOGICAL - .T. if the first row of the range contains headers, .F. otherwise.
aCols: ARRAY - Array of column specifications (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetExcelRange( myExcelRange, .T. ) // Sets Excel range as data source with headers.
content_copy
download
Use code with caution.
Harbour
23. SetAdo( oRs, lAddCols, lAutoOrder, aFldNames )
Description: Sets the data source to an ADO recordset object.
Parameters:
oRs: OBJECT - ADO Recordset object.
lAddCols: LOGICAL - .T. to automatically add columns based on recordset fields, .F. otherwise.
lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.
aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetAdo( myAdoRecordset, .T., .T. ) // Sets ADO recordset as data source with auto-columns and auto-order.
content_copy
download
Use code with caution.
Harbour
24. SetTree( oTree, aResource, bOnSkip, aCols )
Description: Sets the data source to a Tree object.
Parameters:
oTree: OBJECT - Tree object.
aResource: - Resource for tree bitmaps (optional).
bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).
aCols: ARRAY - Array of column specifications (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetTree( myTreeObject, "tree_bmp_resource" ) // Sets Tree object as data source.
content_copy
download
Use code with caution.
Harbour
25. SetColsForTree( uData )
Description: Sets columns for a tree browse based on data type.
Parameters:
uData: - Data type indicator for tree browse columns.
Return Value: None
Usage Example: (Internal use, called within SetTree)
26. InvertPivot()
Description: Inverts the pivot of the browse control (rotates data 90 degrees).
Parameters: None
Return Value: None
Usage Example:
oBrw:InvertPivot()
content_copy
download
Use code with caution.
Harbour
27. ArrCalcWidths( aData, aCols, nMaxRows )
Description: Calculates column widths based on array data and column specifications.
Parameters:
aData: ARRAY - Data array.
aCols: ARRAY - Column specifications array.
nMaxRows: NUMERIC - Maximum number of rows to consider for width calculation.
Return Value: ARRAY - Array containing calculated column widths.
Usage Example: (Internal use, called within AutoFit)
28. GetColsData( cData, lByCreationOrder )
Description: Retrieves column data as an array of values for a specified column DATA member.
Parameters:
cData: CHARACTER - Name of the column DATA member to retrieve (e.g., "cHeader", "nWidth").
lByCreationOrder: LOGICAL - .T. to return data in creation order, .F. in display order.
Return Value: ARRAY - Array of values for the specified column DATA member.
Usage Example:
aColumnHeaders := oBrw:GetColsData( "cHeader" ) // Gets all column headers.
aColumnWidths := oBrw:GetColsData( "nWidth", .T. ) // Gets column widths in creation order.
content_copy
download
Use code with caution.
Harbour
29. SetColsData( cData, aValues, lByCreationOrder )
Description: Sets column data based on an array of values for a specified column DATA member.
Parameters:
cData: CHARACTER - Name of the column DATA member to set (e.g., "cHeader", "nWidth").
aValues: ARRAY - Array of values to set for the column DATA member.
lByCreationOrder: LOGICAL - .T. to set data in creation order, .F. in display order.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetColsData( "cHeader", myColumnHeaders ) // Sets column headers.
oBrw:SetColsData( "nWidth", myWidthValues, .T. ) // Sets column widths in creation order.
content_copy
download
Use code with caution.
Harbour
30. SetGroupHeader( cGrpHdr, nFrom, nUpto, oFont, nAlign, nHeight )
Description: Sets a group header for a range of columns.
Parameters:
cGrpHdr: CHARACTER - Group header text.
nFrom: NUMERIC - Starting column index for the group.
nUpto: NUMERIC - Ending column index for the group.
oFont: OBJECT - Font object for the group header (optional).
nAlign: NUMERIC - Alignment for the group header text (AL_LEFT, AL_CENTER, AL_RIGHT).
nHeight: NUMERIC - Height of the group header (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetGroupHeader( "Customer Information", 1, 3, myHeaderFont, AL_CENTER, 30 ) // Sets group header for columns 1-3.
content_copy
download
Use code with caution.
Harbour
31. SetGroupTotal( aCols, cHead, nType, oFont )
Description: Sets a group total row for specified columns.
Parameters:
aCols: ARRAY - Array of column indices to calculate totals for.
cHead: CHARACTER - Header text for the group total row.
nType: NUMERIC - Aggregation type (AGGR_SUM, AGGR_AVG, AGGR_MIN, AGGR_MAX, AGGR_COUNT, AGGR_STD, AGGR_STDEVP).
oFont: OBJECT - Font object for the group total row (optional).
Return Value: None
Usage Example:
oBrw:SetGroupTotal( { 4, 5 }, "Total Sales", AGGR_SUM, myTotalFont ) // Sets group total row for columns 4 and 5 with sum aggregation.
content_copy
download
Use code with caution.
Harbour
32. ResetBrowse()
Description: Resets the browse control to its initial state, clearing data, columns, and settings.
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:ResetBrowse()
content_copy
download
Use code with caution.
Harbour
33. SetColFromADO( cnCol, lAutoOrder, aRsColNames, l1900, cAdoDB )
Description: Sets column properties from an ADO field object.
Parameters:
cnCol: - Column identifier (field name or index).
lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.
aRsColNames: ARRAY - Array of ADO column names (optional).
l1900: LOGICAL - Flag for 1900 date handling (optional).
cAdoDB: CHARACTER - ADO database connection string (optional).
Return Value: OBJECT - Returns the TxBrwColumn object.
Usage Example: (Internal use, called within SetADO)
34. ArrCell( nRow, nCol, cPic, lDispZeros )
Description: Retrieves the content of a specific cell in array data source.
Parameters:
nRow: NUMERIC - Row index (1-based).
nCol: NUMERIC - Column index (1-based).
cPic: CHARACTER - Picture format string (optional).
lDispZeros: LOGICAL - .T. to display zeros, .F. otherwise (optional).
Return Value: - Content of the cell (data type depends on array data).
Usage Example:
cellValue := oBrw:ArrCell( 2, 3 ) // Gets value from row 2, column 3.
content_copy
download
Use code with caution.
Harbour
35. ArrCellSet( nRow, nCol, uNewVal, lTrim )
Description: Sets the content of a specific cell in array data source.
Parameters:
nRow: NUMERIC - Row index (1-based).
nCol: NUMERIC - Column index (1-based).
uNewVal: - New value to set for the cell.
lTrim: LOGICAL - .T. to trim string values, .F. otherwise.
Return Value: - Content of the cell after setting the new value.
Usage Example:
oBrw:ArrCellSet( 3, 1, "New Value" ) // Sets value in row 3, column 1.
content_copy
download
Use code with caution.
Harbour
36. ShowMessage( cMsg, nSecs, nClrText, nClrBack )
Description: Displays a temporary message box within the browse control.
Parameters:
cMsg: CHARACTER - Message text to display.
nSecs: NUMERIC - Duration to display the message in seconds (0 for indefinite).
nClrText: - Text color for the message (optional).
nClrBack: - Background color for the message (optional).
Return Value: None
Usage Example:
oBrw:ShowMessage( "Processing data...", 5 ) // Shows message for 5 seconds.
content_copy
download
Use code with caution.
Harbour
37. CloseMessage()
Description: Closes the message box displayed by ShowMessage().
Parameters: None
Return Value: None
Usage Example:
oBrw:CloseMessage()
content_copy
download
Use code with caution.
Harbour
38. SetPos( nRow, nCol, lPixel, bAction )
Description: Sets the browse cursor position to a specific cell.
Parameters:
nRow: NUMERIC - Row index (1-based).
nCol: NUMERIC - Column index (1-based).
lPixel: LOGICAL - .T. if row/col are pixel coordinates, .F. if row/col are row/column indices.
bAction: CODEBLOCK - Codeblock to execute after repositioning (optional).
Return Value: None
Usage Example:
oBrw:SetPos( 10, 2 ) // Sets cursor to row 10, column 2.
oBrw:SetPos( 50, 100, .T. ) // Sets cursor position by pixel coordinates.
content_copy
download
Use code with caution.
Harbour
39. SetBackGround( uBack, uBckMode )
Description: Sets the background appearance of the browse control.
Parameters:
uBack: - Background color or bitmap resource.
uBckMode: - Background mode (gradient style or bitmap tiling, optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetBackGround( CLR_WHITE ) // Sets white background color.
oBrw:SetBackGround( "background.bmp", 1 ) // Sets background bitmap with vertical gradient.
content_copy
download
Use code with caution.
Harbour
40. MakeBrush()
Description: Creates a brush object for painting the background (internal method).
Parameters: None
Return Value: OBJECT - Returns the created brush object.
Usage Example: (Internal use only)
41. DataRect()
Description: Returns a TRect object representing the data area of the browse (internal method).
Parameters: None
Return Value: OBJECT - Returns a TRect object.
Usage Example: (Internal use only)
42. cBmpAdjBrush( cFile )
Description: Sets or gets the bitmap brush for background adjustment, creating one if needed.
Parameters:
cFile: CHARACTER - Path to a bitmap file (optional, for SET mode).
Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).
Usage Example:
oBrw:cBmpAdjBrush( "my_background_brush.bmp" ) // Sets a bitmap brush from file.
hBrush := oBrw:cBmpAdjBrush() // Gets the current bitmap brush.
content_copy
download
Use code with caution.
Harbour
43. ColStretch( nStretchCol )
Description: Stretches a column to fill available space in the browse control.
Parameters:
nStretchCol: NUMERIC - Column index to stretch (optional, if not provided, stretches last column).
Return Value: None
Usage Example:
oBrw:ColStretch( 2 ) // Stretches the 2nd column.
oBrw:ColStretch() // Stretches the last column.
content_copy
download
Use code with caution.
Harbour
44. DestroyToolTip()
Description: Destroys the tooltip control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
45. NcMouseMove( nHitTestCode, nRow, nCol )
Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).
Parameters:
nHitTestCode: NUMERIC - Hit test code.
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
Return Value: None
Usage Example: (Internal use only)
46. MouseLeave( nRow, nCol, nFlags )
Description: Handles mouse leave event (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
nFlags: NUMERIC - Mouse event flags.
Return Value: None
Usage Example: (Internal use only)
47. NcMouseMove( nHitTestCode, nRow, nCol )
Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).
Parameters:
nHitTestCode: NUMERIC - Hit test code.
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
Return Value: None
Usage Example: (Internal use only)
48. MouseLeave( nRow, nCol, nFlags )
Description: Handles mouse leave event (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
nFlags: NUMERIC - Mouse event flags.
Return Value: None
Usage Example: (Internal use only)
49. uDataSource()
Description: Accessor for the data source object (ODBF, ADO, MySQL, or Array) (internal method).
Parameters: None
Return Value: - Returns the data source object.
Usage Example: (Internal use only)
50. DataRow( lNew, cFieldList, lSourceData, aInitVals )
Description: Creates or edits a data row object (TXBrwRow).
Parameters:
lNew: LOGICAL - .T. to create a new row, .F. to edit current row.
cFieldList: CHARACTER - Comma-separated string of field names (optional).
lSourceData: LOGICAL - .T. if using source data, .F. otherwise (optional).
aInitVals: ARRAY - Array of initial values for new row (optional).
Return Value: OBJECT - Returns the created or edited TXBrwRow object.
Usage Example:
oNewRow := oBrw:DataRow( .T. ) // Creates a new data row object.
oEditRow := oBrw:DataRow( .F. ) // Edits the current data row.
content_copy
download
Use code with caution.
Harbour
51. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )
Description: Edits the data source (RDD, Array) in a modal dialog.
Parameters:
lNew: LOGICAL - .T. for new record, .F. for edit current record.
cFieldList: CHARACTER - Field list to edit (optional).
lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.
aInitVals: ARRAY - Array of initial values for new record (optional).
bSetup: CODEBLOCK - Codeblock to customize the edit dialog (optional).
Return Value: OBJECT - Returns the edited TXBrowse object (Self).
Usage Example:
oBrw:EditSource( .F., "FIELD1, FIELD2" ) // Edits current record in a dialog, displaying only FIELD1 and FIELD2.
content_copy
download
Use code with caution.
Harbour
52. EditBrowse( lNew, cFieldList, lNavigate )
Description: Edits the data source (RDD, Array) in a browse-like modal dialog.
Parameters:
lNew: LOGICAL - .T. for new record, .F. for edit current record.
cFieldList: CHARACTER - Field list to edit (optional).
lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:EditBrowse( .T. ) // Opens a browse-like dialog to add a new record.
content_copy
download
Use code with caution.
Harbour
53. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )
Description: General method for editing data in a modal dialog, automatically choosing between EditSource and EditBrowse based on lSourceData flag.
Parameters: (Same as EditSource and EditBrowse)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)
54. Delete( lMsg )
Description: Deletes the current record from the data source.
Parameters:
lMsg: LOGICAL - .T. to display a confirmation message, .F. otherwise.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Delete( .T. ) // Deletes current record with confirmation message.
content_copy
download
Use code with caution.
Harbour
55. SetOrderNatural()
Description: Sets the browse order to natural order (no sorting).
Parameters: None
Return Value: None
Usage Example:
oBrw:SetOrderNatural()
content_copy
download
Use code with caution.
Harbour
56. SetChecks( aBmp, lEdit, aPrompt )
Description: Enables checkboxes in a column for logical data type.
Parameters:
aBmp: ARRAY - Array of bitmaps for checkbox states (optional).
lEdit: LOGICAL - .T. to enable editing checkboxes, .F. otherwise.
aPrompt: CHARACTER - Prompt text for checkboxes (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetChecks( , .T. ) // Enables editable checkboxes in the first column (if logical).
content_copy
download
Use code with caution.
Harbour
57. SetMultiSelectCol( uCol, lFooter )
Description: Sets a column as the multi-select column, enabling row selection using checkboxes.
Parameters:
uCol: OBJECT or NUMERIC - TxBrwColumn object or column index for multi-select column.
lFooter: LOGICAL - .T. to show selected row count in footer, .F. otherwise.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column a multi-select column, showing selected count in footer.
content_copy
download
Use code with caution.
Harbour
58. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )
Description: Safely evaluates a codeblock, returning a default value if an error occurs (internal method).
Parameters:
RetVal_ifFailed: - Value to return if codeblock evaluation fails.
bBlock: CODEBLOCK - Codeblock to evaluate.
params_for_bBlock: - Optional parameters to pass to the codeblock.
Return Value: - Result of codeblock evaluation or RetVal_ifFailed if error.
Usage Example: (Internal use only)
59. AddVar( uKey, uVal )
Description: Adds a variable to the hCargo hash table for storing custom data associated with the browse control.
Parameters:
uKey: - Key for the variable in the hCargo hash.
uVal: - Value to store for the variable.
Return Value: None
Usage Example:
oBrw:AddVar( "MyCustomSetting", "Some Value" ) // Adds a custom setting to the browse.
content_copy
download
Use code with caution.
Harbour
60. lPasteReady()
Description: Checks if clipboard content is in a paste-ready format (internal method).
Parameters: None
Return Value: LOGICAL - .T. if paste-ready, .F. otherwise.
Usage Example: (Internal use only)
61. OnError()
Description: Default error handler for the TXBrowse class (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
62. SetColumns( nRow, nCol, nFlags, oColumn )
Description: Sets properties of a specific column (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
nFlags: NUMERIC - Flags.
oColumn: OBJECT - TxBrwColumn object.
Return Value: None
Usage Example: (Internal use only)
63. GoNextCtrl( hWnd )
Description: Moves focus to the next control in the window (internal method).
Parameters:
hWnd: - Handle to the current control window.
Return Value: None
Usage Example: (Internal use only)
64. GoPrevCtrl()
Description: Moves focus to the previous control in the window (virtual method).
Parameters: None
Return Value: None
Usage Example: (Internal use only, Virtual method for overriding)
65. SelFont()
Description: Selects the current font for the browse control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
66. SetFont( oFont, lResizeCols )
Description: Sets the font for the browse control.
Parameters:
oFont: OBJECT - Font object to set.
lResizeCols: LOGICAL - .T. to resize columns to fit new font, .F. otherwise.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetFont( myFontObject ) // Sets a new font for the browse.
oBrw:SetFont( myFontObject, .T. ) // Sets new font and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour
67. FontSize( nPlus )
Description: Adjusts the font size by a specified increment.
Parameters:
nPlus: NUMERIC - Font size increment (positive to increase, negative to decrease).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:FontSize( 2 ) // Increases font size by 2 points.
oBrw:FontSize( -1 ) // Decreases font size by 1 point.
content_copy
download
Use code with caution.
Harbour
68. ReCalcWH()
Description: Recalculates width and height of browse elements based on current settings (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
69. DrawSelect()
Description: Draws the selection indicator line (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
70. RefreshCurrent()
Description: Refreshes the currently selected row (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
71. oRow()
Description: Accessor for the current row data in array data source (internal method).
Parameters: None
Return Value: - Returns the current row data as an array element.
Usage Example: (Internal use only)
72. oCol( u )
Description: Retrieves a TxBrwColumn object by its index or object reference.
Parameters:
u: NUMERIC or OBJECT - Column index (1-based) or TxBrwColumn object.
Return Value: OBJECT - Returns the TxBrwColumn object or NIL if not found.
Usage Example:
oColumn := oBrw:oCol( 2 ) // Gets the TxBrwColumn object for the 2nd column.
content_copy
download
Use code with caution.
Harbour
73. RefreshHeaders()
Description: Refreshes the header area of the browse control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
74. RefreshFooters()
Description: Refreshes the footer area of the browse control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
75. ClpRow( lFullRow, aCols, lFormatted )
Description: Copies a row to the clipboard in text format.
Parameters:
lFullRow: LOGICAL - .T. to copy the entire row, .F. to copy only selected columns.
aCols: ARRAY - Array of column indices to copy (if lFullRow is .F., optional).
lFormatted: LOGICAL - .T. to format data for MSWord export, .F. otherwise.
Return Value: CHARACTER - String containing the row data in text format.
Usage Example:
cRowText := oBrw:ClpRow( .T. ) // Copies the entire current row to clipboard.
content_copy
download
Use code with caution.
Harbour
76. Copy( laRows, aCols )
Description: Copies rows to the clipboard.
Parameters:
laRows: LOGICAL or ARRAY - .T. to copy all rows, FALSE to copy current row, or ARRAY of row indices to copy.
aCols: ARRAY - Array of column indices to copy (optional).
Return Value: None
Usage Example:
oBrw:Copy( .T. ) // Copies all rows to clipboard.
oBrw:Copy( .F. ) // Copies current row to clipboard.
oBrw:Copy( { 1, 3, 5 } ) // Copies rows 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour
77. Paste( cText )
Description: Pastes text from the clipboard into the browse control.
Parameters:
cText: CHARACTER - Text to paste (optional, if not provided, reads from clipboard).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Paste() // Pastes from clipboard to current cell.
oBrw:Paste( "Some Text to Paste" ) // Pastes provided text to current cell.
content_copy
download
Use code with caution.
Harbour
78. aCellCoor( nRow, nCol )
Description: Returns coordinates of a cell in pixels (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
Return Value: ARRAY - Array containing cell coordinates {nTop, nLeft, nBottom, nRight}.
Usage Example: (Internal use only)
79. CellBitmap( nRow, nCol )
Description: Creates a bitmap of a cell (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
Return Value: OBJECT - Returns the bitmap handle.
Usage Example: (Internal use only)
80. ShowMessage( cMsg, nSecs, nClrText, nClrBack )
Description: Displays a message in the browse control (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ShowMessage)
Return Value: None
Usage Example:
oBrw:ShowMessage( { || "Loading Data..." }, 0 ) // Shows message using a codeblock.
content_copy
download
Use code with caution.
Harbour
81. CloseMessage()
Description: Closes the message box (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example:
oBrw:CloseMessage( { || .t. } ) // Closes message using a codeblock.
content_copy
download
Use code with caution.
Harbour
82. SetPos( nRow, nCol, lPixel, bAction )
Description: Sets the cursor position (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member SetPos)
Return Value: None
Usage Example:
oBrw:SetPos( 1, 1, .F., { || MsgInfo( "Cursor repositioned" ) } ) // Repositions cursor and executes codeblock.
content_copy
download
Use code with caution.
Harbour
83. SetBackGround( uBack, uBckMode )
Description: Sets the background appearance (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member SetBackGround)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetBackGround( CLR_BLUE, 2 ) // Sets blue background with gradient using a codeblock.
content_copy
download
Use code with caution.
Harbour
84. MakeBrush()
Description: Creates a brush (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the created brush object.
Usage Example: (Internal use only - method version for codeblock usage)
85. DataRect()
Description: Returns DataRect (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns a TRect object.
Usage Example: (Internal use only - method version for codeblock usage)
86. cBmpAdjBrush( cFile )
Description: Sets or gets bitmap brush (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member cBmpAdjBrush)
Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
87. ColStretch( nStretchCol )
Description: Stretches column (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ColStretch)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
88. DestroyToolTip()
Description: Destroys tooltip (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
89. NcMouseMove( nHitTestCode, nRow, nCol )
Description: Handles WM_NCMOUSEMOVE (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member NcMouseMove)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
90. MouseLeave( nRow, nCol, nFlags )
Description: Handles MouseLeave (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member MouseLeave)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
91. uDataSource()
Description: Accessor for DataSource (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the data source object.
Usage Example: (Internal use only - method version for codeblock usage)
92. DataRow( lNew, cFieldList, lSourceData, aInitVals )
Description: Creates DataRow (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member DataRow)
Return Value: OBJECT - Returns the created or edited TXBrwRow object.
Usage Example: (Internal use only - method version for codeblock usage)
93. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )
Description: Edits Source (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member EditSource)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
94. EditBrowse( lNew, cFieldList, lNavigate )
Description: Ed
Code: Select all | Expand
Methods of the TXBrowse Class
Here's a detailed list of the methods of the TXBrowse class, including parameters, return values, and usage examples:
1. New( oWnd )
Description: Constructor for the TXBrowse class. Creates a new TXBrowse object as a child of the specified window.
Parameters:
oWnd: OBJECT - The parent TWindow object for the browse control.
Return Value: OBJECT - Returns the newly created TXBrowse object (Self).
Usage Example:
oBrw := TXBrowse():New( oWnd )
content_copy
download
Use code with caution.
Harbour
2. Destroy()
Description: Destructor for the TXBrowse class. Releases resources associated with the browse control, including bitmaps, pens, brushes, and data connections.
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Destroy()
content_copy
download
Use code with caution.
Harbour
3. SetStyle( nStyle )
Description: Sets the visual style of the browse control.
Parameters:
nStyle: NUMERIC or CODEBLOCK - Style number (e.g., 2007, flat) or a codeblock that returns a color gradient specification.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetStyle( 2007 ) // Sets the style to the 2007 visual style.
oBrw:SetStyle( { |lInvert| { { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, { 2/3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } } } ) // Sets a custom gradient.
content_copy
download
Use code with caution.
Harbour
4. SetDarkTheme( nTheme )
Description: Sets the browse control to a dark theme appearance.
Parameters:
nTheme: NUMERIC - Theme number (currently only 1 is supported for dark theme).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetDarkTheme( 1 ) // Enables dark theme.
content_copy
download
Use code with caution.
Harbour
5. SetRecSelBmp( uNew )
Description: Sets the bitmap used for the record selector triangle.
Parameters:
uNew: CHARACTER or NUMERIC - Path to a bitmap file or 0 to use the default arrow bitmap or NIL for no bitmap.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetRecSelBmp( "myarrow.bmp" ) // Sets a custom bitmap for record selector.
oBrw:SetRecSelBmp( 0 ) // Uses default arrow bitmap.
oBrw:SetRecSelBmp( nil ) // Removes the bitmap.
content_copy
download
Use code with caution.
Harbour
6. SetRecSelSl( nType )
Description: Sets the record selector to display either record numbers or key numbers.
Parameters:
nType: NUMERIC - 1 to display record numbers (RecNo), 2 to display key numbers (KeyNo), or any other value to display nothing.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetRecSelSl( 1 ) // Displays record numbers in the selector column.
oBrw:SetRecSelSl( 2 ) // Displays key numbers in the selector column.
oBrw:SetRecSelSl( 0 ) // Hides the record number/key number display.
content_copy
download
Use code with caution.
Harbour
7. SetRightFreeze( oCol )
Description: Sets a column as the right-freeze column, which remains visible when horizontally scrolling.
Parameters:
oCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to be frozen on the right side, or NIL to remove right-freeze column.
Return Value: OBJECT - Returns the right-freeze TxBrwColumn object or NIL if no right-freeze column is set.
Usage Example:
oBrw:SetRightFreeze( oBrw:aCols[ 3 ] ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( 3 ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( nil ) // Removes any right-freeze column.
content_copy
download
Use code with caution.
Harbour
8. nAt()
Description: Returns the index of the currently selected column within the displayed columns array.
Parameters: None
Return Value: NUMERIC - Index of the selected column in aDisplay array.
Usage Example:
nColIndex := oBrw:nAt()
content_copy
download
Use code with caution.
Harbour
9. EraseBkGnd()
Description: Erases the background of the browse control.
Parameters: None
Return Value: NUMERIC - Always returns 1.
Usage Example:
oBrw:EraseBkGnd()
content_copy
download
Use code with caution.
Harbour
10. cGenPrg( lDlgUnits )
Description: Generates a code snippet (PRG code) to recreate the browse control with its current settings.
Parameters:
lDlgUnits: LOGICAL - Flag indicating if dialog units should be used for size and position.
Return Value: CHARACTER - String containing the generated PRG code.
Usage Example:
cPrgCode := oBrw:cGenPrg( .T. ) // Generates PRG code using dialog units.
content_copy
download
Use code with caution.
Harbour
11. SetRDD( lAddColumns, lAutoOrder, aFldNames, aRows )
Description: Sets the data source to an RDD (e.g., DBF database).
Parameters:
lAddColumns: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.
lAutoOrder: LOGICAL - .T. to enable automatic ordering based on index tags, .F. otherwise.
aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).
aRows: ARRAY - Array data (optional, if array data is used instead of RDD).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetRDD( .T., .T. ) // Sets DBF as datasource, automatically adding columns and enabling auto-order.
oBrw:SetRDD( .F., .F., { "FIELD1", "FIELD2" } ) // Sets DBF and specifies columns to add.
content_copy
download
Use code with caution.
Harbour
12. SQLRDD_OrdKeyNo( n )
Description: Sets or gets the order key number for SQLRDD data source.
Parameters:
n: NUMERIC - Order key number to set (optional).
Return Value: NUMERIC - Returns the current order key number.
Usage Example:
nKeyNo := oBrw:SQLRDD_OrdKeyNo() // Gets current order key number.
oBrw:SQLRDD_OrdKeyNo( 5 ) // Sets the order key number to 5.
content_copy
download
Use code with caution.
Harbour
13. SQLRDD_OrdkeyGoto( n )
Description: Moves the record pointer in SQLRDD to the specified order key number.
Parameters:
n: NUMERIC - Order key number to go to.
Return Value: None
Usage Example:
oBrw:SQLRDD_OrdkeyGoto( 10 ) // Moves to order key number 10.
content_copy
download
Use code with caution.
Harbour
14. SQLRDD_CalcKeyNo()
Description: Recalculates and returns the current key number for SQLRDD data source.
Parameters: None
Return Value: NUMERIC - Returns the calculated key number.
Usage Example:
nKeyNo := oBrw:SQLRDD_CalcKeyNo()
content_copy
download
Use code with caution.
Harbour
15. SQLRDD_BookMark( nGoTo )
Description: Sets or gets a bookmark for SQLRDD data source based on record number.
Parameters:
nGoTo: NUMERIC - Record number to bookmark (optional).
Return Value: NUMERIC - Returns the current bookmark value (record number).
Usage Example:
nBookmark := oBrw:SQLRDD_BookMark() // Gets current bookmark.
oBrw:SQLRDD_BookMark( 25 ) // Sets bookmark to record number 25.
content_copy
download
Use code with caution.
Harbour
16. SQLRDD_Skipper( n )
Description: Skips records forward or backward in SQLRDD data source.
Parameters:
n: NUMERIC - Number of records to skip (positive for forward, negative for backward).
Return Value: NUMERIC - Returns the number of records actually skipped.
Usage Example:
nSkipped := oBrw:SQLRDD_Skipper( 10 ) // Skips 10 records forward.
nSkipped := oBrw:SQLRDD_Skipper( -5 ) // Skips 5 records backward.
content_copy
download
Use code with caution.
Harbour
17. SQLRDD_Adjust()
Description: Adjusts the browse control for SQLRDD data source (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
18. SQLRDD_SaveState()
Description: Saves the state of the browse control for SQLRDD data source (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
19. ResetData( uSrc, aCols )
Description: Resets the browse control's data and columns.
Parameters:
uSrc: - New data source (can be array, DBF alias, or other supported types).
aCols: ARRAY - Array of column specifications for the new data (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:ResetData( "NEW_DBF_ALIAS" ) // Resets data to a new DBF alias.
oBrw:ResetData( myNewArray, myColumnSpecs ) // Resets data to a new array with specified columns.
content_copy
download
Use code with caution.
Harbour
20. SetArray( aData, lAutoOrder, nColOrder, aCols, bOnSkip )
Description: Sets the data source to an array.
Parameters:
aData: ARRAY - Two-dimensional array containing the data to display.
lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.
nColOrder: NUMERIC - Column index to order the array data by (if lAutoOrder is .T.).
aCols: ARRAY - Array of column specifications (optional).
bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetArray( myDataArray, .T., 2 ) // Sets array data, enables auto-order by 2nd column.
oBrw:SetArray( myDataArray, .F., , myColumnSpecs ) // Sets array data with custom column specs.
content_copy
download
Use code with caution.
Harbour
21. SetoDbf( oDbf, aCols, lAutoSort, lAutoCols, aRows )
Description: Sets the data source to an ODBF object.
Parameters:
oDbf: OBJECT - ODBF object representing the database table.
aCols: ARRAY - Array of column specifications (optional).
lAutoSort: LOGICAL - .T. to enable auto-sorting, .F. otherwise.
lAutoCols: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.
aRows: ARRAY - Array data (optional, if array data is used instead of DBF).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetoDbf( myDbfObject, myColumnSpecs, .T., .F. ) // Sets ODBF object as datasource with custom columns and auto-sorting enabled.
content_copy
download
Use code with caution.
Harbour
22. SetExcelRange( oRange, lHeaders, aCols )
Description: Sets the data source to an Excel range object.
Parameters:
oRange: OBJECT - Excel Range object.
lHeaders: LOGICAL - .T. if the first row of the range contains headers, .F. otherwise.
aCols: ARRAY - Array of column specifications (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetExcelRange( myExcelRange, .T. ) // Sets Excel range as data source with headers.
content_copy
download
Use code with caution.
Harbour
23. SetAdo( oRs, lAddCols, lAutoOrder, aFldNames )
Description: Sets the data source to an ADO recordset object.
Parameters:
oRs: OBJECT - ADO Recordset object.
lAddCols: LOGICAL - .T. to automatically add columns based on recordset fields, .F. otherwise.
lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.
aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetAdo( myAdoRecordset, .T., .T. ) // Sets ADO recordset as data source with auto-columns and auto-order.
content_copy
download
Use code with caution.
Harbour
24. SetTree( oTree, aResource, bOnSkip, aCols )
Description: Sets the data source to a Tree object.
Parameters:
oTree: OBJECT - Tree object.
aResource: - Resource for tree bitmaps (optional).
bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).
aCols: ARRAY - Array of column specifications (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetTree( myTreeObject, "tree_bmp_resource" ) // Sets Tree object as data source.
content_copy
download
Use code with caution.
Harbour
25. SetColsForTree( uData )
Description: Sets columns for a tree browse based on data type.
Parameters:
uData: - Data type indicator for tree browse columns.
Return Value: None
Usage Example: (Internal use, called within SetTree)
26. InvertPivot()
Description: Inverts the pivot of the browse control (rotates data 90 degrees).
Parameters: None
Return Value: None
Usage Example:
oBrw:InvertPivot()
content_copy
download
Use code with caution.
Harbour
27. ArrCalcWidths( aData, aCols, nMaxRows )
Description: Calculates column widths based on array data and column specifications.
Parameters:
aData: ARRAY - Data array.
aCols: ARRAY - Column specifications array.
nMaxRows: NUMERIC - Maximum number of rows to consider for width calculation.
Return Value: ARRAY - Array containing calculated column widths.
Usage Example: (Internal use, called within AutoFit)
28. GetColsData( cData, lByCreationOrder )
Description: Retrieves column data as an array of values for a specified column DATA member.
Parameters:
cData: CHARACTER - Name of the column DATA member to retrieve (e.g., "cHeader", "nWidth").
lByCreationOrder: LOGICAL - .T. to return data in creation order, .F. in display order.
Return Value: ARRAY - Array of values for the specified column DATA member.
Usage Example:
aColumnHeaders := oBrw:GetColsData( "cHeader" ) // Gets all column headers.
aColumnWidths := oBrw:GetColsData( "nWidth", .T. ) // Gets column widths in creation order.
content_copy
download
Use code with caution.
Harbour
29. SetColsData( cData, aValues, lByCreationOrder )
Description: Sets column data based on an array of values for a specified column DATA member.
Parameters:
cData: CHARACTER - Name of the column DATA member to set (e.g., "cHeader", "nWidth").
aValues: ARRAY - Array of values to set for the column DATA member.
lByCreationOrder: LOGICAL - .T. to set data in creation order, .F. in display order.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetColsData( "cHeader", myColumnHeaders ) // Sets column headers.
oBrw:SetColsData( "nWidth", myWidthValues, .T. ) // Sets column widths in creation order.
content_copy
download
Use code with caution.
Harbour
30. SetGroupHeader( cGrpHdr, nFrom, nUpto, oFont, nAlign, nHeight )
Description: Sets a group header for a range of columns.
Parameters:
cGrpHdr: CHARACTER - Group header text.
nFrom: NUMERIC - Starting column index for the group.
nUpto: NUMERIC - Ending column index for the group.
oFont: OBJECT - Font object for the group header (optional).
nAlign: NUMERIC - Alignment for the group header text (AL_LEFT, AL_CENTER, AL_RIGHT).
nHeight: NUMERIC - Height of the group header (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetGroupHeader( "Customer Information", 1, 3, myHeaderFont, AL_CENTER, 30 ) // Sets group header for columns 1-3.
content_copy
download
Use code with caution.
Harbour
31. SetGroupTotal( aCols, cHead, nType, oFont )
Description: Sets a group total row for specified columns.
Parameters:
aCols: ARRAY - Array of column indices to calculate totals for.
cHead: CHARACTER - Header text for the group total row.
nType: NUMERIC - Aggregation type (AGGR_SUM, AGGR_AVG, AGGR_MIN, AGGR_MAX, AGGR_COUNT, AGGR_STD, AGGR_STDEVP).
oFont: OBJECT - Font object for the group total row (optional).
Return Value: None
Usage Example:
oBrw:SetGroupTotal( { 4, 5 }, "Total Sales", AGGR_SUM, myTotalFont ) // Sets group total row for columns 4 and 5 with sum aggregation.
content_copy
download
Use code with caution.
Harbour
32. ResetBrowse()
Description: Resets the browse control to its initial state, clearing data, columns, and settings.
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:ResetBrowse()
content_copy
download
Use code with caution.
Harbour
33. SetColFromADO( cnCol, lAutoOrder, aRsColNames, l1900, cAdoDB )
Description: Sets column properties from an ADO field object.
Parameters:
cnCol: - Column identifier (field name or index).
lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.
aRsColNames: ARRAY - Array of ADO column names (optional).
l1900: LOGICAL - Flag for 1900 date handling (optional).
cAdoDB: CHARACTER - ADO database connection string (optional).
Return Value: OBJECT - Returns the TxBrwColumn object.
Usage Example: (Internal use, called within SetADO)
34. ArrCell( nRow, nCol, cPic, lDispZeros )
Description: Retrieves the content of a specific cell in array data source.
Parameters:
nRow: NUMERIC - Row index (1-based).
nCol: NUMERIC - Column index (1-based).
cPic: CHARACTER - Picture format string (optional).
lDispZeros: LOGICAL - .T. to display zeros, .F. otherwise (optional).
Return Value: - Content of the cell (data type depends on array data).
Usage Example:
cellValue := oBrw:ArrCell( 2, 3 ) // Gets value from row 2, column 3.
content_copy
download
Use code with caution.
Harbour
35. ArrCellSet( nRow, nCol, uNewVal, lTrim )
Description: Sets the content of a specific cell in array data source.
Parameters:
nRow: NUMERIC - Row index (1-based).
nCol: NUMERIC - Column index (1-based).
uNewVal: - New value to set for the cell.
lTrim: LOGICAL - .T. to trim string values, .F. otherwise.
Return Value: - Content of the cell after setting the new value.
Usage Example:
oBrw:ArrCellSet( 3, 1, "New Value" ) // Sets value in row 3, column 1.
content_copy
download
Use code with caution.
Harbour
36. ShowMessage( cMsg, nSecs, nClrText, nClrBack )
Description: Displays a temporary message box within the browse control.
Parameters:
cMsg: CHARACTER - Message text to display.
nSecs: NUMERIC - Duration to display the message in seconds (0 for indefinite).
nClrText: - Text color for the message (optional).
nClrBack: - Background color for the message (optional).
Return Value: None
Usage Example:
oBrw:ShowMessage( "Processing data...", 5 ) // Shows message for 5 seconds.
content_copy
download
Use code with caution.
Harbour
37. CloseMessage()
Description: Closes the message box displayed by ShowMessage().
Parameters: None
Return Value: None
Usage Example:
oBrw:CloseMessage()
content_copy
download
Use code with caution.
Harbour
38. SetPos( nRow, nCol, lPixel, bAction )
Description: Sets the browse cursor position to a specific cell.
Parameters:
nRow: NUMERIC - Row index (1-based).
nCol: NUMERIC - Column index (1-based).
lPixel: LOGICAL - .T. if row/col are pixel coordinates, .F. if row/col are row/column indices.
bAction: CODEBLOCK - Codeblock to execute after repositioning (optional).
Return Value: None
Usage Example:
oBrw:SetPos( 10, 2 ) // Sets cursor to row 10, column 2.
oBrw:SetPos( 50, 100, .T. ) // Sets cursor position by pixel coordinates.
content_copy
download
Use code with caution.
Harbour
39. SetBackGround( uBack, uBckMode )
Description: Sets the background appearance of the browse control.
Parameters:
uBack: - Background color or bitmap resource.
uBckMode: - Background mode (gradient style or bitmap tiling, optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetBackGround( CLR_WHITE ) // Sets white background color.
oBrw:SetBackGround( "background.bmp", 1 ) // Sets background bitmap with vertical gradient.
content_copy
download
Use code with caution.
Harbour
40. MakeBrush()
Description: Creates a brush object for painting the background (internal method).
Parameters: None
Return Value: OBJECT - Returns the created brush object.
Usage Example: (Internal use only)
41. DataRect()
Description: Returns a TRect object representing the data area of the browse (internal method).
Parameters: None
Return Value: OBJECT - Returns a TRect object.
Usage Example: (Internal use only)
42. cBmpAdjBrush( cFile )
Description: Sets or gets the bitmap brush for background adjustment, creating one if needed.
Parameters:
cFile: CHARACTER - Path to a bitmap file (optional, for SET mode).
Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).
Usage Example:
oBrw:cBmpAdjBrush( "my_background_brush.bmp" ) // Sets a bitmap brush from file.
hBrush := oBrw:cBmpAdjBrush() // Gets the current bitmap brush.
content_copy
download
Use code with caution.
Harbour
43. ColStretch( nStretchCol )
Description: Stretches a column to fill available space in the browse control.
Parameters:
nStretchCol: NUMERIC - Column index to stretch (optional, if not provided, stretches last column).
Return Value: None
Usage Example:
oBrw:ColStretch( 2 ) // Stretches the 2nd column.
oBrw:ColStretch() // Stretches the last column.
content_copy
download
Use code with caution.
Harbour
44. DestroyToolTip()
Description: Destroys the tooltip control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
45. NcMouseMove( nHitTestCode, nRow, nCol )
Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).
Parameters:
nHitTestCode: NUMERIC - Hit test code.
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
Return Value: None
Usage Example: (Internal use only)
46. MouseLeave( nRow, nCol, nFlags )
Description: Handles mouse leave event (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
nFlags: NUMERIC - Mouse event flags.
Return Value: None
Usage Example: (Internal use only)
47. NcMouseMove( nHitTestCode, nRow, nCol )
Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).
Parameters:
nHitTestCode: NUMERIC - Hit test code.
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
Return Value: None
Usage Example: (Internal use only)
48. MouseLeave( nRow, nCol, nFlags )
Description: Handles mouse leave event (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
nFlags: NUMERIC - Mouse event flags.
Return Value: None
Usage Example: (Internal use only)
49. uDataSource()
Description: Accessor for the data source object (ODBF, ADO, MySQL, or Array) (internal method).
Parameters: None
Return Value: - Returns the data source object.
Usage Example: (Internal use only)
50. DataRow( lNew, cFieldList, lSourceData, aInitVals )
Description: Creates or edits a data row object (TXBrwRow).
Parameters:
lNew: LOGICAL - .T. to create a new row, .F. to edit current row.
cFieldList: CHARACTER - Comma-separated string of field names (optional).
lSourceData: LOGICAL - .T. if using source data, .F. otherwise (optional).
aInitVals: ARRAY - Array of initial values for new row (optional).
Return Value: OBJECT - Returns the created or edited TXBrwRow object.
Usage Example:
oNewRow := oBrw:DataRow( .T. ) // Creates a new data row object.
oEditRow := oBrw:DataRow( .F. ) // Edits the current data row.
content_copy
download
Use code with caution.
Harbour
51. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )
Description: Edits the data source (RDD, Array) in a modal dialog.
Parameters:
lNew: LOGICAL - .T. for new record, .F. for edit current record.
cFieldList: CHARACTER - Field list to edit (optional).
lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.
aInitVals: ARRAY - Array of initial values for new record (optional).
bSetup: CODEBLOCK - Codeblock to customize the edit dialog (optional).
Return Value: OBJECT - Returns the edited TXBrowse object (Self).
Usage Example:
oBrw:EditSource( .F., "FIELD1, FIELD2" ) // Edits current record in a dialog, displaying only FIELD1 and FIELD2.
content_copy
download
Use code with caution.
Harbour
52. EditBrowse( lNew, cFieldList, lNavigate )
Description: Edits the data source (RDD, Array) in a browse-like modal dialog.
Parameters:
lNew: LOGICAL - .T. for new record, .F. for edit current record.
cFieldList: CHARACTER - Field list to edit (optional).
lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:EditBrowse( .T. ) // Opens a browse-like dialog to add a new record.
content_copy
download
Use code with caution.
Harbour
53. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )
Description: General method for editing data in a modal dialog, automatically choosing between EditSource and EditBrowse based on lSourceData flag.
Parameters: (Same as EditSource and EditBrowse)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)
54. Delete( lMsg )
Description: Deletes the current record from the data source.
Parameters:
lMsg: LOGICAL - .T. to display a confirmation message, .F. otherwise.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Delete( .T. ) // Deletes current record with confirmation message.
content_copy
download
Use code with caution.
Harbour
55. SetOrderNatural()
Description: Sets the browse order to natural order (no sorting).
Parameters: None
Return Value: None
Usage Example:
oBrw:SetOrderNatural()
content_copy
download
Use code with caution.
Harbour
56. SetChecks( aBmp, lEdit, aPrompt )
Description: Enables checkboxes in a column for logical data type.
Parameters:
aBmp: ARRAY - Array of bitmaps for checkbox states (optional).
lEdit: LOGICAL - .T. to enable editing checkboxes, .F. otherwise.
aPrompt: CHARACTER - Prompt text for checkboxes (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetChecks( , .T. ) // Enables editable checkboxes in the first column (if logical).
content_copy
download
Use code with caution.
Harbour
57. SetMultiSelectCol( uCol, lFooter )
Description: Sets a column as the multi-select column, enabling row selection using checkboxes.
Parameters:
uCol: OBJECT or NUMERIC - TxBrwColumn object or column index for multi-select column.
lFooter: LOGICAL - .T. to show selected row count in footer, .F. otherwise.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column a multi-select column, showing selected count in footer.
content_copy
download
Use code with caution.
Harbour
58. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )
Description: Safely evaluates a codeblock, returning a default value if an error occurs (internal method).
Parameters:
RetVal_ifFailed: - Value to return if codeblock evaluation fails.
bBlock: CODEBLOCK - Codeblock to evaluate.
params_for_bBlock: - Optional parameters to pass to the codeblock.
Return Value: - Result of codeblock evaluation or RetVal_ifFailed if error.
Usage Example: (Internal use only)
59. AddVar( uKey, uVal )
Description: Adds a variable to the hCargo hash table for storing custom data associated with the browse control.
Parameters:
uKey: - Key for the variable in the hCargo hash.
uVal: - Value to store for the variable.
Return Value: None
Usage Example:
oBrw:AddVar( "MyCustomSetting", "Some Value" ) // Adds a custom setting to the browse.
content_copy
download
Use code with caution.
Harbour
60. lPasteReady()
Description: Checks if clipboard content is in a paste-ready format (internal method).
Parameters: None
Return Value: LOGICAL - .T. if paste-ready, .F. otherwise.
Usage Example: (Internal use only)
61. OnError()
Description: Default error handler for the TXBrowse class (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
62. SetColumns( nRow, nCol, nFlags, oColumn )
Description: Sets properties of a specific column (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
nFlags: NUMERIC - Flags.
oColumn: OBJECT - TxBrwColumn object.
Return Value: None
Usage Example: (Internal use only)
63. GoNextCtrl( hWnd )
Description: Moves focus to the next control in the window (internal method).
Parameters:
hWnd: - Handle to the current control window.
Return Value: None
Usage Example: (Internal use only)
64. GoPrevCtrl()
Description: Moves focus to the previous control in the window (virtual method).
Parameters: None
Return Value: None
Usage Example: (Internal use only, Virtual method for overriding)
65. SelFont()
Description: Selects the current font for the browse control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
66. SetFont( oFont, lResizeCols )
Description: Sets the font for the browse control.
Parameters:
oFont: OBJECT - Font object to set.
lResizeCols: LOGICAL - .T. to resize columns to fit new font, .F. otherwise.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetFont( myFontObject ) // Sets a new font for the browse.
oBrw:SetFont( myFontObject, .T. ) // Sets new font and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour
67. FontSize( nPlus )
Description: Adjusts the font size by a specified increment.
Parameters:
nPlus: NUMERIC - Font size increment (positive to increase, negative to decrease).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:FontSize( 2 ) // Increases font size by 2 points.
oBrw:FontSize( -1 ) // Decreases font size by 1 point.
content_copy
download
Use code with caution.
Harbour
68. ReCalcWH()
Description: Recalculates width and height of browse elements based on current settings (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
69. DrawSelect()
Description: Draws the selection indicator line (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
70. RefreshCurrent()
Description: Refreshes the currently selected row (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
71. oRow()
Description: Accessor for the current row data in array data source (internal method).
Parameters: None
Return Value: - Returns the current row data as an array element.
Usage Example: (Internal use only)
72. oCol( u )
Description: Retrieves a TxBrwColumn object by its index or object reference.
Parameters:
u: NUMERIC or OBJECT - Column index (1-based) or TxBrwColumn object.
Return Value: OBJECT - Returns the TxBrwColumn object or NIL if not found.
Usage Example:
oColumn := oBrw:oCol( 2 ) // Gets the TxBrwColumn object for the 2nd column.
content_copy
download
Use code with caution.
Harbour
73. RefreshHeaders()
Description: Refreshes the header area of the browse control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
74. RefreshFooters()
Description: Refreshes the footer area of the browse control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
75. ClpRow( lFullRow, aCols, lFormatted )
Description: Copies a row to the clipboard in text format.
Parameters:
lFullRow: LOGICAL - .T. to copy the entire row, .F. to copy only selected columns.
aCols: ARRAY - Array of column indices to copy (if lFullRow is .F., optional).
lFormatted: LOGICAL - .T. to format data for MSWord export, .F. otherwise.
Return Value: CHARACTER - String containing the row data in text format.
Usage Example:
cRowText := oBrw:ClpRow( .T. ) // Copies the entire current row to clipboard.
content_copy
download
Use code with caution.
Harbour
76. Copy( laRows, aCols )
Description: Copies rows to the clipboard.
Parameters:
laRows: LOGICAL or ARRAY - .T. to copy all rows, FALSE to copy current row, or ARRAY of row indices to copy.
aCols: ARRAY - Array of column indices to copy (optional).
Return Value: None
Usage Example:
oBrw:Copy( .T. ) // Copies all rows to clipboard.
oBrw:Copy( .F. ) // Copies current row to clipboard.
oBrw:Copy( { 1, 3, 5 } ) // Copies rows 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour
77. Paste( cText )
Description: Pastes text from the clipboard into the browse control.
Parameters:
cText: CHARACTER - Text to paste (optional, if not provided, reads from clipboard).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Paste() // Pastes from clipboard to current cell.
oBrw:Paste( "Some Text to Paste" ) // Pastes provided text to current cell.
content_copy
download
Use code with caution.
Harbour
78. aCellCoor( nRow, nCol )
Description: Returns coordinates of a cell in pixels (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
Return Value: ARRAY - Array containing cell coordinates {nTop, nLeft, nBottom, nRight}.
Usage Example: (Internal use only)
79. CellBitmap( nRow, nCol )
Description: Creates a bitmap of a cell (internal method).
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
Return Value: OBJECT - Returns the bitmap handle.
Usage Example: (Internal use only)
80. ShowMessage( cMsg, nSecs, nClrText, nClrBack )
Description: Displays a message in the browse control (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ShowMessage)
Return Value: None
Usage Example:
oBrw:ShowMessage( { || "Loading Data..." }, 0 ) // Shows message using a codeblock.
content_copy
download
Use code with caution.
Harbour
81. CloseMessage()
Description: Closes the message box (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example:
oBrw:CloseMessage( { || .t. } ) // Closes message using a codeblock.
content_copy
download
Use code with caution.
Harbour
82. SetPos( nRow, nCol, lPixel, bAction )
Description: Sets the cursor position (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member SetPos)
Return Value: None
Usage Example:
oBrw:SetPos( 1, 1, .F., { || MsgInfo( "Cursor repositioned" ) } ) // Repositions cursor and executes codeblock.
content_copy
download
Use code with caution.
Harbour
83. SetBackGround( uBack, uBckMode )
Description: Sets the background appearance (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member SetBackGround)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetBackGround( CLR_BLUE, 2 ) // Sets blue background with gradient using a codeblock.
content_copy
download
Use code with caution.
Harbour
84. MakeBrush()
Description: Creates a brush (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the created brush object.
Usage Example: (Internal use only - method version for codeblock usage)
85. DataRect()
Description: Returns DataRect (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns a TRect object.
Usage Example: (Internal use only - method version for codeblock usage)
86. cBmpAdjBrush( cFile )
Description: Sets or gets bitmap brush (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member cBmpAdjBrush)
Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
87. ColStretch( nStretchCol )
Description: Stretches column (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ColStretch)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
88. DestroyToolTip()
Description: Destroys tooltip (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
89. NcMouseMove( nHitTestCode, nRow, nCol )
Description: Handles WM_NCMOUSEMOVE (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member NcMouseMove)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
90. MouseLeave( nRow, nCol, nFlags )
Description: Handles MouseLeave (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member MouseLeave)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
91. uDataSource()
Description: Accessor for DataSource (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the data source object.
Usage Example: (Internal use only - method version for codeblock usage)
92. DataRow( lNew, cFieldList, lSourceData, aInitVals )
Description: Creates DataRow (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member DataRow)
Return Value: OBJECT - Returns the created or edited TXBrwRow object.
Usage Example: (Internal use only - method version for codeblock usage)
93. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )
Description: Edits Source (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member EditSource)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
94. EditBrowse( lNew, cFieldList, lNavigate )
Description: Ed
Code: Select all | Expand
95. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup ) (Continued)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)
96. Delete( lMsg )
Description: Deletes the current record from the data source.
Parameters:
lMsg: LOGICAL - .T. to display a confirmation message box before deletion, .F. for silent deletion.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Delete( .T. ) // Deletes the current record with a confirmation prompt.
oBrw:Delete( .F. ) // Deletes the current record without confirmation.
content_copy
download
Use code with caution.
Harbour
97. SetOrderNatural()
Description: Resets the sorting order of the browse to its natural (unsorted) order.
Parameters: None
Return Value: None
Usage Example:
oBrw:SetOrderNatural() // Removes any sorting applied to the browse.
content_copy
download
Use code with caution.
Harbour
98. SetChecks( aBmp, lEdit, aPrompt )
Description: Enables checkboxes for the first column of the browse, typically used for selecting rows.
Parameters:
aBmp: ARRAY - Optional array containing bitmap handles for the checkbox states (checked, unchecked, null). If not provided, default bitmaps are used.
lEdit: LOGICAL - .T. to allow users to edit the checkbox state directly in the browse, .F. for read-only checkboxes.
aPrompt: CHARACTER - Optional prompt text associated with the checkboxes.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetChecks( , .T. ) // Adds editable checkboxes to the first column.
oBrw:SetChecks( { hBmpChecked, hBmpUnchecked }, .F., "Select Rows" ) // Adds read-only checkboxes with custom bitmaps and prompt.
content_copy
download
Use code with caution.
Harbour
99. SetMultiSelectCol( uCol, lFooter )
Description: Designates a specific column to function as a multi-select column, enabling row selection using checkboxes in that column.
Parameters:
uCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to designate as the multi-select column.
lFooter: LOGICAL - .T. to display the count of selected rows in the footer, .F. to hide the count.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column the multi-select column, displaying selected count in the footer.
oBrw:SetMultiSelectCol( oBrw:oCol( "MyColumn" ), .F. ) // Makes "MyColumn" the multi-select column, hiding footer count.
content_copy
download
Use code with caution.
Harbour
100. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )
Description: Provides a safe way to evaluate a codeblock, trapping potential runtime errors and returning a default value if an error occurs. This is useful for preventing browse errors from crashing the application.
Parameters:
RetVal_ifFailed: - The value to be returned if the evaluation of bBlock results in an error.
bBlock: CODEBLOCK - The codeblock to be evaluated.
params_for_bBlock: - Optional parameters to be passed to the codeblock during evaluation.
Return Value: - The result of the codeblock evaluation if successful, or RetVal_ifFailed if an error occurs.
Usage Example: (Primarily for internal use, but can be used in custom codeblocks within TXBrowse)
nValue := oBrw:SafeEval( 0, { || Val( oBrw:ArrCell( 1, 1 ) ) } ) // Safely evaluates Val() on a cell, returns 0 if Val() fails.
content_copy
download
Use code with caution.
Harbour
101. AddVar( uKey, uVal )
Description: Allows adding custom variables to the hCargo hash table associated with the TXBrowse object. This provides a mechanism to store and retrieve custom data related to the browse.
Parameters:
uKey: - The key (identifier) for the variable within the hCargo hash table.
uVal: - The value to be stored for the variable.
Return Value: None
Usage Example:
oBrw:AddVar( "UserPreference", "Dark Mode" ) // Stores a user preference setting in hCargo.
customSetting := oBrw:hCargo[ "UserPreference" ] // Retrieves the custom setting.
content_copy
download
Use code with caution.
Harbour
102. lPasteReady()
Description: Checks if the data currently in the clipboard is in a format suitable for pasting into the TXBrowse control.
Parameters: None
Return Value: LOGICAL - Returns .T. if the clipboard data is paste-ready, .F. otherwise.
Usage Example: (Primarily used internally to determine if pasting functionality should be enabled)
103. OnError()
Description: Default error handler method for the TXBrowse class. This method is called when an error occurs within the browse control.
Parameters: None
Return Value: None
Usage Example: (Primarily for internal use; you can override this method to implement custom error handling)
104. SetColumns( nRow, nCol, nFlags, oColumn )
Description: Used internally to set properties of a specific column at a given row and column position, likely during column resizing or layout adjustments.
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
nFlags: NUMERIC - Flags.
oColumn: OBJECT - TxBrwColumn object.
Return Value: None
Usage Example: (Internal use only)
105. GoNextCtrl( hWnd )
Description: Moves the input focus to the next control within the same window as the TXBrowse control. This is often used for navigation between controls in a form or dialog.
Parameters:
hWnd: - Handle of the current control that has focus.
Return Value: None
Usage Example: (Used internally for control navigation)
106. GoPrevCtrl()
Description: Moves the input focus to the previous control in the window. This is a VIRTUAL method, meaning it's designed to be overridden in derived classes to customize the behavior of moving to the previous control.
Parameters: None
Return Value: None
Usage Example: (Virtual method, override in derived classes for custom behavior)
107. SelFont()
Description: Selects and retrieves the currently active font for the TXBrowse control.
Parameters: None
Return Value: None
Usage Example: (Internal use only, likely related to font handling within the control)
108. SetFont( oFont, lResizeCols )
Description: Sets the font to be used for displaying data within the TXBrowse control.
Parameters:
oFont: OBJECT - The TFont object representing the font to be applied.
lResizeCols: LOGICAL - .T. to automatically adjust column widths to fit the new font, .F. to keep column widths unchanged.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetFont( myFont, .T. ) // Applies 'myFont' and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour
109. FontSize( nPlus )
Description: Dynamically adjusts the font size of the browse control, either increasing or decreasing it.
Parameters:
nPlus: NUMERIC - A positive value to increase the font size, or a negative value to decrease it.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:FontSize( 1 ) // Increases the font size by 1 point.
oBrw:FontSize( -2 ) // Decreases the font size by 2 points.
content_copy
download
Use code with caution.
Harbour
110. ReCalcWH()
Description: Recalculates the widths and heights of various elements within the TXBrowse control, such as headers, footers, and rows, based on the current font and other style settings. This is typically called internally after changes that might affect layout.
Parameters: None
Return Value: None
Usage Example: (Internal use only, called automatically when layout changes occur)
111. DrawSelect()
Description: Draws the visual indicator for the currently selected row (the record selector).
Parameters: None
Return Value: None
Usage Example: (Internal use only, called during painting to visually highlight the selected row)
112. RefreshCurrent()
Description: Refreshes the display of the currently selected row in the browse control. This is useful to update the display after data changes.
Parameters: None
Return Value: None
Usage Example:
oBrw:RefreshCurrent() // Updates the display of the current row.
content_copy
download
Use code with caution.
Harbour
113. aRow()
Description: Accessor method to retrieve the data for the currently selected row when using an array as the data source.
Parameters: None
Return Value: - Returns the data for the current row as an array element.
Usage Example:
currentRowData := oBrw:aRow // Retrieves data of the current row in array browse.
content_copy
download
Use code with caution.
Harbour
114. oCol( u )
Description: Retrieves a TxBrwColumn object associated with the TXBrowse control.
Parameters:
u: NUMERIC or OBJECT - Column index (1-based) or a direct reference to a TxBrwColumn object.
Return Value: OBJECT - Returns the TxBrwColumn object if found, otherwise returns NIL.
Usage Example:
oFirstColumn := oBrw:oCol( 1 ) // Retrieves the TxBrwColumn object for the first column.
content_copy
download
Use code with caution.
Harbour
115. RefreshHeaders()
Description: Refreshes the visual display of the header area of the TXBrowse control.
Parameters: None
Return Value: None
Usage Example:
oBrw:RefreshHeaders() // Redraws the header area to reflect changes.
content_copy
download
Use code with caution.
Harbour
116. RefreshFooters()
Description: Refreshes the visual display of the footer area of the TXBrowse control.
Parameters: None
Return Value: None
Usage Example:
oBrw:RefreshFooters() // Redraws the footer area to reflect changes, like updated totals.
content_copy
download
Use code with caution.
Harbour
117. ClpRow( lFullRow, aCols, lFormatted )
Description: Copies the data of a row to the clipboard, formatting it as text.
Parameters:
lFullRow: LOGICAL - .T. to copy all columns of the row, .F. to copy only specified columns.
aCols: ARRAY - (Optional) Array of column indices to copy if lFullRow is .F..
lFormatted: LOGICAL - .T. to format the text output for better compatibility with MS Word, .F. for plain text.
Return Value: CHARACTER - Returns a character string containing the formatted row data for the clipboard.
Usage Example:
clipboardText := oBrw:ClpRow( .T. ) // Copies the entire current row to the clipboard as formatted text.
content_copy
download
Use code with caution.
Harbour
118. Copy( laRows, aCols )
Description: Copies one or more rows from the browse to the clipboard.
Parameters:
laRows: LOGICAL or ARRAY - Specifies which rows to copy:
.T. : Copy all rows in the browse.
.F. : Copy only the currently selected row.
ARRAY : Copy rows at the specified indices in the array.
aCols: ARRAY - (Optional) Array of column indices to copy for the specified rows.
Return Value: None
Usage Example:
oBrw:Copy( .F. ) // Copies the currently selected row.
oBrw:Copy( .T., { 1, 3, 5 } ) // Copies all rows but only columns 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour
119. Paste( cText )
Description: Pastes data from the clipboard into the browse control, starting at the currently selected cell.
Parameters:
cText: CHARACTER - (Optional) Text string to paste. If omitted, the method reads data from the clipboard.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Paste() // Pastes clipboard data into the browse.
oBrw:Paste( "Data to paste" ) // Pastes the provided text directly.
content_copy
download
Use code with caution.
Harbour
120. aCellCoor( nRow, nCol )
Description: Retrieves the screen coordinates (top, left, bottom, right) of a specific cell within the browse control.
Parameters:
nRow: NUMERIC - Row index of the cell.
nCol: NUMERIC - Column index of the cell.
Return Value: ARRAY - Returns an array containing the coordinates: { nTop, nLeft, nBottom, nRight } in pixels.
Usage Example:
cellCoords := oBrw:aCellCoor( 5, 2 ) // Gets coordinates of the cell at row 5, column 2.
content_copy
download
Use code with caution.
Harbour
121. CellBitmap( nRow, nCol )
Description: Creates a bitmap image of a specific cell within the browse control.
Parameters:
nRow: NUMERIC - Row index of the cell.
nCol: NUMERIC - Column index of the cell.
Return Value: OBJECT - Returns a bitmap handle (HBITMAP) of the cell's content.
Usage Example:
hCellBitmap := oBrw:CellBitmap( 1, 1 ) // Creates a bitmap of the cell at row 1, column 1.
content_copy
download
Use code with caution.
Harbour
122. ShowMessage( cMsg, nSecs, nClrText, nClrBack )
Description: Displays a message overlay within the TXBrowse control. This is a method version of the ShowMessage DATA member, allowing for codeblock parameters.
Parameters: (Same as for the ShowMessage DATA member)
Return Value: None
Usage Example:
oBrw:ShowMessage( { || "Loading data..." }, 0 ) // Displays a message using a codeblock for the message text.
content_copy
download
Use code with caution.
Harbour
123. CloseMessage()
Description: Closes any message box currently displayed by ShowMessage.
Parameters: None
Return Value: None
Usage Example:
oBrw:CloseMessage() // Closes the message box.
content_copy
download
Use code with caution.
Harbour
124. SetPos( nRow, nCol, lPixel, bAction )
Description: Sets the cursor position within the browse. This is a method version of the SetPos DATA member, allowing for a codeblock to be executed after repositioning.
Parameters: (Same as for the SetPos DATA member)
Return Value: None
Usage Example:
oBrw:SetPos( 1, 2, .F., { || MsgInfo( "Cursor moved" ) } ) // Repositions the cursor and executes a codeblock.
content_copy
download
Use code with caution.
Harbour
125. SetBackGround( uBack, uBckMode )
Description: Sets the background appearance of the browse control. This is a method version of the SetBackGround DATA member, allowing for codeblock parameters.
Parameters: (Same as for the SetBackGround DATA member)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetBackGround( { || CLR_BLUE }, 2 ) // Sets background using a codeblock for the color and gradient mode.
content_copy
download
Use code with caution.
Harbour
126. MakeBrush()
Description: Creates a brush object for painting the browse background. Method version for use within codeblocks.
Parameters: None
Return Value: OBJECT - Returns the created brush object.
Usage Example: (Internal use only, method version for codeblock use)
127. DataRect()
Description: Returns a TRect object representing the data display area of the browse. Method version for use within codeblocks.
Parameters: None
Return Value: OBJECT - Returns a TRect object.
Usage Example: (Internal use only - method version for codeblock usage)
128. cBmpAdjBrush( cFile )
Description: Sets or gets the bitmap brush for background adjustment. Method version for use within codeblocks.
Parameters: (Same as DATA member cBmpAdjBrush)
Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
129. ColStretch( nStretchCol )
Description: Stretches a column to fill available space. Method version for use within codeblocks.
Parameters: (Same as DATA member ColStretch)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
130. DestroyToolTip()
Description: Destroys the tooltip control. Method version for use within codeblocks.
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
131. NcMouseMove( nHitTestCode, nRow, nCol )
Description: Handles WM_NCMOUSEMOVE message. Method version for use within codeblocks.
Parameters: (Same as DATA member NcMouseMove)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
132. MouseLeave( nRow, nCol, nFlags )
Description: Handles MouseLeave event. Method version for use within codeblocks.
Parameters: (Same as DATA member MouseLeave)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
133. uDataSource()
Description: Accessor for DataSource. Method version for use within codeblocks.
Parameters: None
Return Value: - Returns the data source object.
Usage Example: (Internal use only - method version for codeblock usage)
134. DataRow( lNew, cFieldList, lSourceData, aInitVals )
Description: Creates DataRow. Method version for use within codeblocks.
Parameters: (Same as DATA member DataRow)
Return Value: OBJECT - Returns the created or edited TXBrwRow object.
Usage Example: (Internal use only - method version for codeblock usage)
135. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )
Description: Edits Source. Method version for use within codeblocks.
Parameters: (Same as DATA member EditSource)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
136. EditBrowse( lNew, cFieldList, lNavigate )
Description: Edits Browse. Method version for use within codeblocks.
Parameters: (Same as DATA member EditBrowse)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
137. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )
Description: Edits data (general edit method). Method version for use within codeblocks.
Parameters: (Same as DATA member Edit)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
138. Delete( lMsg )
Description: Deletes a record. Method version for use within codeblocks.
Parameters: (Same as DATA member Delete)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
139. GoFltRow( n )
Description: Navigates to a specific row within a filtered browse based on its filter row index.
Parameters:
n: NUMERIC - The filter row index to navigate to (1-based).
Return Value: LOGICAL - Returns .T. if navigation was successful, .F. otherwise.
Usage Example:
oBrw:GoFltRow( 3 ) // Moves the browse cursor to the 3rd row in the filtered dataset.
content_copy
download
Use code with caution.
Harbour
140. GoFltRow( n ) (Second Definition)
Description: Retrieves the filter row index if no parameters are passed.
Parameters:
n: NUMERIC - (Optional) If NIL it returns the current filter row index, otherwise it sets the filter row index.
Return Value: NUMERIC - Returns the current filter row index.
Usage Example:
nCurrentFilterRow := oBrw:GoFltRow() // Gets the current filter row index.
content_copy
download
Use code with caution.
Harbour
141. SaveState( aAdditionalData )
Description: Saves the current state of the browse control, allowing for later restoration.
Parameters:
aAdditionalData: ARRAY - (Optional) Array for saving additional custom data with the browse state.
Return Value: None
Usage Example:
oBrw:SaveState() // Saves the current browse state.
oBrw:SaveState( { "CustomData1", "CustomData2" } ) // Saves state with additional data.
content_copy
download
Use code with caution.
Harbour
142. RestoreState( cState )
Description: Restores the browse control to a previously saved state, using a state string obtained from SaveState().
Parameters:
cState: CHARACTER - State string obtained from SaveState().
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:RestoreState( savedStateString ) // Restores browse state from the saved string.
content_copy
download
Use code with caution.
Harbour
143. OldRestoreState( cState )
Description: Retained for compatibility with older versions (10.8) of the TXBrowse class. Restores browse state from a state string.
Parameters:
cState: CHARACTER - State string in the older format.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (For backward compatibility with older saved states)
144. Lock()
Description: Locks the browse control, preventing data modifications.
Parameters: None
Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.
Usage Example:
lLocked := oBrw:Lock()
content_copy
download
Use code with caution.
Harbour
145. UnLock()
Description: Unlocks the browse control, allowing data modifications.
Parameters: None
Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).
Usage Example:
oBrw:UnLock()
content_copy
download
Use code with caution.
Harbour
146. SaveData( lRefresh )
Description: Saves any pending data changes to the underlying data source.
Parameters:
lRefresh: LOGICAL - .T. to refresh the browse after saving, .F. otherwise.
Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.
Usage Example:
lSaved := oBrw:SaveData( .T. ) // Saves data changes and refreshes the browse.
content_copy
download
Use code with caution.
Harbour
147. ShowSeek()
Description: Shows or hides the incremental seek input control (TGet object).
Parameters: None
Return Value: None
Usage Example:
oBrw:ShowSeek() // Shows the incremental seek input control.
content_copy
download
Use code with caution.
Harbour
148. Seek( cSeek )
Description: Performs an incremental seek operation based on the provided search string.
Parameters:
cSeek: CHARACTER - String to search for incrementally.
Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.
Usage Example:
lFound := oBrw:Seek( "customer name" ) // Performs incremental seek for "customer name".
content_copy
download
Use code with caution.
Harbour
149. RddIncrSeek( cExpr, uSeek )
Description: Performs incremental seek on an RDD data source using a custom expression.
Parameters:
cExpr: CHARACTER - Expression to evaluate for each record during the seek.
uSeek: - Search string to match against the expression result.
Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.
Usage Example: (Advanced usage for custom incremental seek logic)
150. RddIncrFilter( cExpr, uSeek )
Description: Performs incremental filtering on an RDD data source using a custom expression.
Parameters:
cExpr: CHARACTER - Expression to evaluate for filtering.
uSeek: - Search string for filtering criteria.
Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.
Usage Example: (Advanced usage for custom incremental filtering logic)
151. ArrayIncrSeek( cSeek, nGoTo )
Description: Performs incremental seek on an array data source.
Parameters:
cSeek: CHARACTER - String to search for incrementally.
nGoTo: NUMERIC - Row index to go to if a match is found (optional).
Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.
Usage Example:
lFound := oBrw:ArrayIncrSeek( "item description" ) // Incremental seek in array data.
content_copy
download
Use code with caution.
Harbour
152. ArrayIncrFilter( cSeek, nGoTo )
Description: Performs incremental filtering on an array data source.
Parameters:
cSeek: CHARACTER - String to filter by.
nGoTo: NUMERIC - Row index to navigate to after filtering (optional).
Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.
Usage Example:
oBrw:ArrayIncrFilter( "status: pending" ) // Incremental filter on array data.
content_copy
download
Use code with caution.
Harbour
153. AdoIncrSeek( uSeek )
Description: Performs incremental seek on an ADO recordset data source.
Parameters:
uSeek: - String to search for incrementally.
Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.
Usage Example:
lFound := oBrw:AdoIncrSeek( "product name" ) // Incremental seek in ADO recordset.
content_copy
download
Use code with caution.
Harbour
154. Select( nOperation )
Description: Selects or deselects rows in multi-select mode based on different operations.
Parameters:
nOperation: NUMERIC - Operation code:
0: Deselect all rows.
1: Add current row to selection.
2: Swap current row selection (toggle).
3: Select a range of rows (Shift+click).
4: Select all rows.
Return Value: None
Usage Example:
oBrw:Select( 1 ) // Adds the current row to the selection.
oBrw:Select( 0 ) // Deselects all rows.
content_copy
download
Use code with caution.
Harbour
155. SelectAll()
Description: Selects all rows in the browse control (shortcut for Select(4)).
Parameters: None
Return Value: None
Usage Example:
oBrw:SelectAll() // Selects all rows in the browse.
content_copy
download
Use code with caution.
Harbour
156. SelectNone()
Description: Deselects all rows in the browse control (shortcut for Select(0)).
Parameters: None
Return Value: None
Usage Example:
oBrw:SelectNone() // Deselects all rows.
content_copy
download
Use code with caution.
Harbour
157. IsSelectedRow()
Description: Checks if the current row is selected in multi-select mode.
Parameters: None
Return Value: LOGICAL - .T. if the current row is selected, .F. otherwise.
Usage Example:
if oBrw:IsSelectedRow()
MsgInfo( "Current row is selected." )
endif
content_copy
download
Use code with caution.
Harbour
158. SelectRow( nOperation )
Description: Selects or deselects the current row in multi-select mode (internal method, likely used by Select).
Parameters:
nOperation: NUMERIC - Operation code (similar to Select, but specifically for the current row).
Return Value: None
Usage Example: (Internal use only)
159. Adjust()
Description: Adjusts the layout and appearance of the browse control, recalculating heights, widths, and other visual elements based on current settings.
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Adjust() // Recalculates and adjusts browse layout.
content_copy
download
Use code with caution.
Harbour
160. Check_oSeek()
Description: Checks and handles the oSeek object (incremental seek input) (internal method).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only)
161. SetSortBmp()
Description: Sets the bitmaps used for sort indicators in column headers (internal method).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only)
162. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )
Description: Automatically adjusts column widths to fit their content.
Parameters:
aColsToFit: ARRAY - Array of column indices or TxBrwColumn objects to auto-fit. If NIL, auto-fits all columns.
nRows: NUMERIC - Number of rows to consider when calculating column widths. If NIL, considers all rows.
lDataOnly: LOGICAL - .T. to consider only data rows for width calculation, .F. to include header and footer.
nMaxWidth: NUMERIC - Maximum width for columns (optional).
Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.
Usage Example:
oBrw:AutoFit() // Auto-fits all columns to their content.
oBrw:AutoFit( { 1, 3 } ) // Auto-fits columns 1 and 3.
oBrw:AutoFit( , 100 ) // Auto-fits columns considering only the first 100 rows.
content_copy
download
Use code with caution.
Harbour
163. CheckSize()
Description: Checks and adjusts the size of the browse control based on margins and padding (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
164. Resize( nSizeType, nWidth, nHeight )
Description: Resizes the browse control to the specified dimensions or using predefined size types.
Parameters:
nSizeType: NUMERIC - Size type code (e.g., SIZE_PIXEL, SIZE_CLIENT, SIZE_WINDOW).
nWidth: NUMERIC - New width in pixels (if nSizeType is SIZE_PIXEL).
nHeight: NUMERIC - New height in pixels (if nSizeType is SIZE_PIXEL).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Resize( SIZE_PIXEL, 800, 600 ) // Resizes browse to 800x600 pixels.
oBrw:Resize( SIZE_CLIENT ) // Resizes browse to fill client area of parent window.
content_copy
download
Use code with caution.
Harbour
165. Change( lRow )
Description: Handles the change event, triggered when the selected row changes or a column is modified.
Parameters:
lRow: LOGICAL - .T. if the change is due to row selection, .F. if due to column change.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use, called automatically when row or column selection changes)
166. MakeTotals( aCols )
Description: Calculates totals for specified columns and prepares them for display in the footer (internal method).
Parameters:
aCols: ARRAY - Array of column indices or TxBrwColumn objects to calculate totals for.
Return Value: None
Usage Example: (Internal use only)
167. SaveTotals( lBlank )
Description: Saves the calculated totals (internal method).
Parameters:
lBlank: LOGICAL - .T. to blank out existing totals before saving, .F. otherwise.
Return Value: None
Usage Example: (Internal use only)
168. ReCalcTotals( lReduce )
Description: Recalculates totals based on changes in data or filtering (internal method).
Parameters:
lReduce: LOGICAL - .T. to reduce totals based on filtered data, .F. otherwise.
Return Value: None
Usage Example: (Internal use only)
169. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )
Description: General-purpose evaluation method for codeblocks, allowing iteration over browse rows with conditions and limits.
Parameters:
bBlock: CODEBLOCK - Codeblock to be evaluated for each row.
bFor: CODEBLOCK - Codeblock to be evaluated before each row (condition for row processing).
bWhile: CODEBLOCK - Codeblock for loop continuation condition.
nNext: NUMERIC - Number of rows to process (optional).
nRec: NUMERIC - Starting record number (optional).
lRest: LOGICAL - .T. to process from current record to end, .F. otherwise (optional).
Return Value: None
Usage Example:
oBrw:Eval( { |o| MsgInfo( o:Column1 ) }, , { || oBrw:Eof() } ) // Iterates through all rows and displays "Column1" value in each row.
content_copy
download
Use code with caution.
Harbour
170. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )
Description: Generates a report from the browse data, allowing for preview, printing, and exporting to PDF.
Parameters:
cTitle: CHARACTER - Title for the report.
lPreview: LOGICAL - .T. to show print preview dialog, .F. for direct printing.
lModal: LOGICAL - .T. to show print preview dialog as modal, .F. as modeless.
bSetUp: CODEBLOCK - Codeblock to customize report setup (optional).
aGroupBy: ARRAY - Array of column indices or TxBrwColumn objects to group data by (optional).
cPDF: CHARACTER - Path to save the report as PDF (optional, if provided, exports to PDF directly).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the report (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Report( "Customer Report", .T., .T., , { 2 }, "customer_report.pdf" ) // Generates a previewable PDF report grouped by the 2nd column.
content_copy
download
Use code with caution.
Harbour
171. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )
Description: Exports browse data to a Microsoft Word document.
Parameters:
bProgress: CODEBLOCK - Codeblock to display export progress (optional).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the Word document (optional).
nWrdTblFormat: NUMERIC - Word table format code (optional).
nPageOrientation: NUMERIC - Page orientation (0 for portrait, 1 for landscape, optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:ToWord( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, , 5 ) // Exports data to Word with progress display.
content_copy
download
Use code with caution.
Harbour
172. ToHTML( cHtml, lShow )
Description: Exports browse data to an HTML file.
Parameters:
cHtml: CHARACTER - Path to save the HTML file.
lShow: LOGICAL - .T. to open the HTML file after export, .F. otherwise.
Return Value: None
Usage Example:
oBrw:ToHTML( "browse_data.html", .T. ) // Exports data to HTML and opens the file in browser.
content_copy
download
Use code with caution.
Harbour
173. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )
Description: Exports browse data to a CSV (Comma Separated Values) file.
Parameters:
cFile: CHARACTER - Path to save the CSV file.
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in CSV (optional).
lHeaders: LOGICAL - .T. to include column headers in CSV, .F. otherwise.
cTrue: CHARACTER - String representation for logical TRUE value in CSV (optional).
cFalse: CHARACTER - String representation for logical FALSE value in CSV (optional).
cDelim: CHARACTER - Delimiter character for CSV (optional, default is comma).
Return Value: None
Usage Example:
oBrw:ToCSV( "browse_data.csv", , .T., "Yes", "No", ";" ) // Exports to CSV with custom delimiter and logical value representations.
content_copy
download
Use code with caution.
Harbour
174. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )
Description: Exports browse data to an Excel spreadsheet file (XLS or XLSX).
Parameters:
bProgress: CODEBLOCK - Codeblock to display export progress (optional).
nGroupBy: NUMERIC - Column index to group data in Excel (optional).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Excel (optional).
lShow: LOGICAL - .T. to open Excel after export, .F. otherwise.
cPDF: CHARACTER - Path to save as PDF in addition to Excel (optional).
bPrePDF: CODEBLOCK - Codeblock to execute before PDF export (optional).
Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.
Usage Example:
oBrw:ToExcel( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, , .T., "browse_data.pdf" ) // Exports to Excel with grouping, progress display, and PDF export.
content_copy
download
Use code with caution.
Harbour
175. ToXlsx( cFileXls, aCols )
Description: Exports browse data to an XLSX (Excel 2007+) file.
Parameters:
cFileXls: CHARACTER - Path to save the XLSX file.
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in XLSX (optional).
Return Value: None
Usage Example:
oBrw:ToXlsx( "browse_data.xlsx" ) // Exports data to XLSX file.
content_copy
download
Use code with caution.
Harbour
176. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )
Description: Exports browse data to a LibreOffice Calc spreadsheet file.
Parameters:
bProgress: CODEBLOCK - Codeblock to display export progress (optional).
nGroupBy: NUMERIC - Column index to group data in Calc (optional).
nPasteMode: NUMERIC - Paste mode for Calc (optional).
aSaveAs: ARRAY - Array for save-as options (optional).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Calc (optional).
Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.
Usage Example:
oBrw:ToCalc( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, 2 ) // Exports to Calc with grouping and paste mode 2.
content_copy
download
Use code with caution.
Harbour
177. ToDbf( cFile, bProgress, aCols, lPrompt )
Description: Exports browse data to a DBF (dBase) file.
Parameters:
cFile: CHARACTER - Path to save the DBF file.
bProgress: CODEBLOCK - Codeblock to display export progress (optional).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in DBF (optional).
lPrompt: LOGICAL - .T. to prompt user for file overwrite confirmation, .F. otherwise.
Return Value: None
Usage Example:
oBrw:ToDbf( "browse_data.dbf", , , .T. ) // Exports to DBF with overwrite prompt enabled.
content_copy
download
Use code with caution.
Harbour
178. ToArray( aCols )
Description: Exports browse data to a two-dimensional array.
Parameters:
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in array (optional).
Return Value: ARRAY - Returns the two-dimensional array containing browse data.
Usage Example:
myDataArray := oBrw:ToArray() // Exports all visible columns to an array.
content_copy
download
Use code with caution.
Harbour
179. CurrentRow()
Description: Returns a TXBrwRow object representing the data of the currently selected row.
Parameters: None
Return Value: OBJECT - Returns a TXBrwRow object.
Usage Example:
oCurrentRow := oBrw:CurrentRow() // Gets a TXBrwRow object for the current row.
content_copy
download
Use code with caution.
Harbour
180. AddBitmap( uBmp, aResize )
Description: Adds a bitmap to the browse control's bitmap collection for use in columns or other visual elements.
Parameters:
uBmp: CHARACTER or NUMERIC - Path to bitmap file or bitmap handle.
aResize: - Resize parameters (optional).
Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.
Usage Example:
nBitmapIndex := oBrw:AddBitmap( "mybitmap.bmp" ) // Adds a bitmap to the browse's bitmap collection.
content_copy
download
Use code with caution.
Harbour
181. aBitmap( n )
Description: Accessor method to retrieve a bitmap from the browse control's bitmap collection by its index.
Parameters:
n: NUMERIC - Index of the bitmap in the aBitmaps array.
Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.
Usage Example:
hBitmap := oBrw:aBitmap( nBitmapIndex ) // Retrieves a bitmap by its index.
content_copy
download
Use code with caution.
Harbour
182. Initiate( hDlg )
Description: Initializes the browse control (internal method).
Parameters:
hDlg: - Handle to the dialog window (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only)
183. Display()
Description: Displays the browse control (internal method).
Parameters: None
Return Value: NUMERIC - Always returns 0.
Usage Example: (Internal use only)
184. Paint()
Description: Paints the browse control's content (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only, called by the windowing system during redraw)
185. DrawBorder()
Description: Draws the border around the browse control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only, called during painting)
186. CheckSortCbx()
Description: Checks and updates the sort checkbox control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
187. GetPaintCols( nLast )
Description: Retrieves an array of columns to be painted, optimized for performance (internal method).
Parameters:
nLast: NUMERIC - Last displayed column index.
Return Value: ARRAY - Array of TxBrwColumn objects to paint.
Usage Example: (Internal use only)
188. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )
Description: Paints a horizontal divider line (internal method).
Parameters:
hDC: OBJECT - Device context handle.
nRow: NUMERIC - Row position.
nLeft: NUMERIC - Left position.
nRight: NUMERIC - Right position.
nStyle: NUMERIC - Line style.
hRowPen: OBJECT - Pen handle for row lines.
hWhitePen: OBJECT - Pen handle for white color.
Return Value: None
Usage Example: (Internal use only)
189. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )
Description: Paints a vertical divider line (internal method).
Parameters:
hDC: OBJECT - Device context handle.
nCol: NUMERIC - Column position.
nTop: NUMERIC - Top position.
nBottom: NUMERIC - Bottom position.
nStyle: NUMERIC - Line style.
hColPen: OBJECT - Pen handle for column lines.
hWhitePen: OBJECT - Pen handle for white color.
Return Value: None
Usage Example: (Internal use only)
190. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )
Description: Paints the header area of the browse (internal method).
Parameters:
hDC: OBJECT - Device context handle.
aCols: ARRAY - Array of columns to paint.
nLast: NUMERIC - Last displayed column index.
hWhitePen: OBJECT - Pen handle for white color.
hGrayPen: OBJECT - Pen handle for gray color.
hColPen: OBJECT - Pen handle for column lines.
Return Value: None
Usage Example: (Internal use only)
191. PaintTopBar( hDC, hGrayPen )
Description: Paints the top bar area of the browse (internal method).
Parameters:
hDC: OBJECT - Device context handle.
hGrayPen: OBJECT - Pen handle for gray color.
Return Value: None
Usage Example: (Internal use only)
192. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )
Description: Paints the footer area of the browse (internal method).
Parameters:
hDC: OBJECT - Device context handle.
aCols: ARRAY - Array of columns to paint.
nLast: NUMERIC - Last displayed column index.
nGridWidth: NUMERIC - Grid width.
nBrwHeight: NUMERIC - Browse height.
hWhitePen: OBJECT - Pen handle for white color.
hGrayPen: OBJECT - Pen handle for gray color.
Return Value: None
Usage Example: (Internal use only)
193. Refresh( lComplete )
Description: Refreshes the browse control, redrawing its content.
Parameters:
lComplete: LOGICAL - .T. for a full refresh, .F. for partial refresh (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Refresh() // Performs a full refresh.
oBrw:Refresh( .F. ) // Performs a partial refresh.
content_copy
download
Use code with caution.
Harbour
194. CalcRowSelPos()
Description: Calculates the position of the selected row (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
195. DelRepos()
Description: Repositions browse after record deletion (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
196. KeyCount()
Description: Returns the total number of rows in the data source.
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example:
nRowCount := oBrw:KeyCount()
content_copy
download
Use code with caution.
Harbour
197. BookMark( uGoTo )
Description: Sets or gets the bookmark position (record number).
Parameters:
uGoTo: NUMERIC - Record number to bookmark (optional).
Return Value: NUMERIC - Returns the current bookmark value (record number).
Usage Example:
nBookmarkValue := oBrw:BookMark() // Gets current bookmark value.
oBrw:BookMark( 15 ) // Sets bookmark to record number 15.
content_copy
download
Use code with caution.
Harbour
198. KeyNo( nKeyGoTo )
Description: Sets or gets the key number (vertical scroll position).
Parameters:
nKeyGoTo: NUMERIC - Key number to set (optional).
Return Value: NUMERIC - Returns the current key number.
Usage Example:
nKeyNumber := oBrw:KeyNo() // Gets current key number.
oBrw:KeyNo( 50 ) // Sets key number to 50.
content_copy
download
Use code with caution.
Harbour
199. Skip( n )
Description: Skips rows forward or backward.
Parameters:
n: NUMERIC - Number of rows to skip (positive for forward, negative for backward).
Return Value: NUMERIC - Number of rows actually skipped.
Usage Example:
nSkippedRows := oBrw:Skip( 5 ) // Skips 5 rows forward.
content_copy
download
Use code with caution.
Harbour
200. Bof()
Description: Checks if the browse is at the Beginning Of File (BOF).
Parameters: None
Return Value: LOGICAL - .T. if BOF, .F. otherwise.
Usage Example:
if oBrw:Bof()
MsgInfo( "At the beginning of the data." )
endif
content_copy
download
Use code with caution.
Harbour
201. Eof()
Description: Checks if the browse is at the End Of File (EOF).
Parameters: None
Return Value: LOGICAL - .T. if EOF, .F. otherwise.
Usage Example:
if oBrw:Eof()
MsgInfo( "At the end of the data." )
endif
content_copy
download
Use code with caution.
Harbour
202. GoTop()
Description: Moves the browse cursor to the first row (Top of File - TOF).
Parameters: None
Return Value: None
Usage Example:
oBrw:GoTop() // Moves to the first row.
content_copy
download
Use code with caution.
Harbour
203. GoBottom()
Description: Moves the browse cursor to the last row (Bottom of File - BOF).
Parameters: None
Return Value: None
Usage Example:
oBrw:GoBottom() // Moves to the last row.
content_copy
download
Use code with caution.
Harbour
204. GoUp( nUp )
Description: Moves the browse cursor up by a specified number of rows.
Parameters:
nUp: NUMERIC - Number of rows to move up (default is 1).
Return Value: None
Usage Example:
oBrw:GoUp() // Moves up one row.
oBrw:GoUp( 3 ) // Moves up three rows.
content_copy
download
Use code with caution.
Harbour
205. GoDown( nDown, nKey )
Description: Moves the browse cursor down by a specified number of rows.
Parameters:
nDown: NUMERIC - Number of rows to move down (default is 1).
nKey: NUMERIC - Key code (optional, used internally).
Return Value: None
Usage Example:
oBrw:GoDown() // Moves down one row.
oBrw:GoDown( 5 ) // Moves down five rows.
content_copy
download
Use code with caution.
Harbour
206. PageUp( nLines )
Description: Moves the browse cursor up by a page (number of visible data rows).
Parameters:
nLines: NUMERIC - Number of lines to page up (default is number of data rows).
Return Value: None
Usage Example:
oBrw:PageUp() // Pages up one page of data.
content_copy
download
Use code with caution.
Harbour
207. PageDown( nLines )
Description: Moves the browse cursor down by a page (number of visible data rows).
Parameters:
nLines: NUMERIC - Number of lines to page down (default is number of data rows).
Return Value: None
Usage Example:
oBrw:PageDown() // Pages down one page of data.
content_copy
download
Use code with caution.
Harbour
208. GoLeft()
Description: Moves the browse cursor one column to the left.
Parameters:
lOffset: NUMERIC - Offset to move left (optional, default is 1).
lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.
Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.
Usage Example:
oBrw:GoLeft() // Moves one column to the left.
content_copy
download
Use code with caution.
Harbour
209. GoRight()
Description: Moves the browse cursor one column to the right.
Parameters:
lOffset: NUMERIC - Offset to move right (optional, default is 1).
lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.
Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.
Usage Example:
oBrw:GoRight() // Moves one column to the right.
content_copy
download
Use code with caution.
Harbour
210. GoLeftMost()
Description: Moves the browse cursor to the leftmost visible column.
Parameters: None
Return Value: None
Usage Example:
oBrw:GoLeftMost() // Moves to the first visible column.
content_copy
download
Use code with caution.
Harbour
211. GoRightMost()
Description: Moves the browse cursor to the rightmost visible column.
Parameters: None
Return Value: None
Usage Example:
oBrw:GoRightMost() // Moves to the last visible column.
content_copy
download
Use code with caution.
Harbour
212. GoFirstEditCol()
Description: Moves the browse cursor to the first editable column in the current row.
Parameters: None
Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.
Usage Example:
oEditColumn := oBrw:GoFirstEditCol() // Moves cursor to the first editable column.
content_copy
download
Use code with caution.
Harbour
213. HandleEvent( nMsg, nWParam, nLParam )
Description: Handles window messages (internal method, event dispatcher).
Parameters:
nMsg: NUMERIC - Windows message code.
nWParam: NUMERIC - WPARAM parameter of the message.
nLParam: NUMERIC - LPARAM parameter of the message.
Return Value: NUMERIC - Message return value.
Usage Example: (Internal use only - handles Windows messages)
214. HandleGesture( nGesture, nLParam )
Description: Handles gesture events (internal method, for kinetic scrolling and touch gestures).
Parameters:
nGesture: NUMERIC - Gesture ID.
nLParam: NUMERIC - LPARAM parameter of the gesture event.
Return Value: NUMERIC - Gesture event return value.
Usage Example: (Internal use only - handles touch and kinetic scrolling)
215. GesturePan( aPanInfo )
Description: Handles pan gestures (used for kinetic scrolling, internal method).
Parameters:
aPanInfo: ARRAY - Array containing pan gesture information.
Return Value: NUMERIC - Gesture pan return value.
Usage Example: (Internal use only - handles kinetic scrolling gestures)
216. KeyCount()
Description: Returns the number of records (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example:
rowCount := oBrw:KeyCount() // Gets row count using codeblock.
content_copy
download
Use code with caution.
Harbour
217. BookMark()
Description: Accessor for Bookmark (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the bookmark value.
Usage Example:
bookmarkValue := oBrw:BookMark() // Gets bookmark value using codeblock.
content_copy
download
Use code with caution.
Harbour
218. KeyNo()
Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the key number.
Usage Example:
keyNumber := oBrw:KeyNo() // Gets key number using codeblock.
content_copy
download
Use code with caution.
Harbour
219. Skip()
Description: Accessor for Skip (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Number of rows to skip.
Return Value: - Returns the number of rows skipped.
Usage Example:
rowsSkipped := oBrw:Skip( 2 ) // Skips rows using codeblock.
content_copy
download
Use code with caution.
Harbour
220. Bof()
Description: Accessor for Bof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.
Usage Example:
isBOF := oBrw:Bof() // Checks BOF using codeblock.
content_copy
download
Use code with caution.
Harbour
221. Eof()
Description: Accessor for Eof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.
Usage Example:
isEOF := oBrw:Eof() // Checks EOF using codeblock.
content_copy
download
Use code with caution.
Harbour
222. GoTop()
Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example:
oBrw:GoTop() // Moves to top using codeblock.
content_copy
download
Use code with caution.
Harbour
223. GoBottom()
Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example:
oBrw:GoBottom() // Moves to bottom using codeblock.
content_copy
download
Use code with caution.
Harbour
224. GoFltRow( n )
Description: Accessor for GoFltRow (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Filter row index.
Return Value: NUMERIC - Returns the filter row index.
Usage Example: (Internal use only - method version for codeblock usage)
225. SaveState( aAdditionalData )
Description: Accessor for SaveState (same as DATA member, method version for codeblock usage).
Parameters:
aAdditionalData: ARRAY - Additional data array.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
226. RestoreState( cState )
Description: Accessor for RestoreState (same as DATA member, method version for codeblock usage).
Parameters:
cState: CHARACTER - State string.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
227. OldRestoreState( cState )
Description: Accessor for OldRestoreState (same as DATA member, method version for codeblock usage).
Parameters:
cState: CHARACTER - State string.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
228. Lock()
Description: Accessor for Lock (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.
Usage Example:
isLocked := oBrw:Lock() // Locks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour
229. UnLock()
Description: Accessor for UnLock (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).
Usage Example:
oBrw:UnLock() // Unlocks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour
230. SaveData( lRefresh )
Description: Accessor for SaveData (same as DATA member, method version for codeblock usage).
Parameters:
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.
Usage Example:
isSaved := oBrw:SaveData( .T. ) // Saves data using codeblock.
content_copy
download
Use code with caution.
Harbour
231. ShowSeek()
Description: Accessor for ShowSeek (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example:
oBrw:ShowSeek() // Shows seek input using codeblock.
content_copy
download
Use code with caution.
Harbour
232. Seek( cSeek )
Description: Accessor for Seek (same as DATA member, method version for codeblock usage).
Parameters:
cSeek: CHARACTER - Seek string.
Return Value: LOGICAL - Returns .T. if seek is successful, .F. otherwise.
Usage Example:
isFound := oBrw:Seek( "Search String" ) // Performs seek using codeblock.
content_copy
download
Use code with caution.
Harbour
233. Adjust()
Description: Accessor for Adjust (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Adjust() // Adjusts layout using codeblock.
content_copy
download
Use code with caution.
Harbour
234. Check_oSeek()
Description: Accessor for Check_oSeek (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
235. SetSortBmp()
Description: Accessor for SetSortBmp (same as DATA member, method version for codeblock usage).
Parameters:
aBmp: ARRAY - Bitmap array.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
236. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )
Description: Accessor for AutoFit (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member AutoFit)
Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.
Usage Example: (Internal use only - method version for codeblock usage)
237. CheckSize()
Description: Accessor for CheckSize (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
238. Resize( nSizeType, nWidth, nHeight )
Description: Accessor for Resize (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member Resize)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
239. Change( lRow )
Description: Accessor for Change (same as DATA member, method version for codeblock usage).
Parameters:
lRow: LOGICAL - Row flag.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
]]>Code: Select all | Expand
95. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup ) (Continued)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)
96. Delete( lMsg )
Description: Deletes the current record from the data source.
Parameters:
lMsg: LOGICAL - .T. to display a confirmation message box before deletion, .F. for silent deletion.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Delete( .T. ) // Deletes the current record with a confirmation prompt.
oBrw:Delete( .F. ) // Deletes the current record without confirmation.
content_copy
download
Use code with caution.
Harbour
97. SetOrderNatural()
Description: Resets the sorting order of the browse to its natural (unsorted) order.
Parameters: None
Return Value: None
Usage Example:
oBrw:SetOrderNatural() // Removes any sorting applied to the browse.
content_copy
download
Use code with caution.
Harbour
98. SetChecks( aBmp, lEdit, aPrompt )
Description: Enables checkboxes for the first column of the browse, typically used for selecting rows.
Parameters:
aBmp: ARRAY - Optional array containing bitmap handles for the checkbox states (checked, unchecked, null). If not provided, default bitmaps are used.
lEdit: LOGICAL - .T. to allow users to edit the checkbox state directly in the browse, .F. for read-only checkboxes.
aPrompt: CHARACTER - Optional prompt text associated with the checkboxes.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetChecks( , .T. ) // Adds editable checkboxes to the first column.
oBrw:SetChecks( { hBmpChecked, hBmpUnchecked }, .F., "Select Rows" ) // Adds read-only checkboxes with custom bitmaps and prompt.
content_copy
download
Use code with caution.
Harbour
99. SetMultiSelectCol( uCol, lFooter )
Description: Designates a specific column to function as a multi-select column, enabling row selection using checkboxes in that column.
Parameters:
uCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to designate as the multi-select column.
lFooter: LOGICAL - .T. to display the count of selected rows in the footer, .F. to hide the count.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column the multi-select column, displaying selected count in the footer.
oBrw:SetMultiSelectCol( oBrw:oCol( "MyColumn" ), .F. ) // Makes "MyColumn" the multi-select column, hiding footer count.
content_copy
download
Use code with caution.
Harbour
100. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )
Description: Provides a safe way to evaluate a codeblock, trapping potential runtime errors and returning a default value if an error occurs. This is useful for preventing browse errors from crashing the application.
Parameters:
RetVal_ifFailed: - The value to be returned if the evaluation of bBlock results in an error.
bBlock: CODEBLOCK - The codeblock to be evaluated.
params_for_bBlock: - Optional parameters to be passed to the codeblock during evaluation.
Return Value: - The result of the codeblock evaluation if successful, or RetVal_ifFailed if an error occurs.
Usage Example: (Primarily for internal use, but can be used in custom codeblocks within TXBrowse)
nValue := oBrw:SafeEval( 0, { || Val( oBrw:ArrCell( 1, 1 ) ) } ) // Safely evaluates Val() on a cell, returns 0 if Val() fails.
content_copy
download
Use code with caution.
Harbour
101. AddVar( uKey, uVal )
Description: Allows adding custom variables to the hCargo hash table associated with the TXBrowse object. This provides a mechanism to store and retrieve custom data related to the browse.
Parameters:
uKey: - The key (identifier) for the variable within the hCargo hash table.
uVal: - The value to be stored for the variable.
Return Value: None
Usage Example:
oBrw:AddVar( "UserPreference", "Dark Mode" ) // Stores a user preference setting in hCargo.
customSetting := oBrw:hCargo[ "UserPreference" ] // Retrieves the custom setting.
content_copy
download
Use code with caution.
Harbour
102. lPasteReady()
Description: Checks if the data currently in the clipboard is in a format suitable for pasting into the TXBrowse control.
Parameters: None
Return Value: LOGICAL - Returns .T. if the clipboard data is paste-ready, .F. otherwise.
Usage Example: (Primarily used internally to determine if pasting functionality should be enabled)
103. OnError()
Description: Default error handler method for the TXBrowse class. This method is called when an error occurs within the browse control.
Parameters: None
Return Value: None
Usage Example: (Primarily for internal use; you can override this method to implement custom error handling)
104. SetColumns( nRow, nCol, nFlags, oColumn )
Description: Used internally to set properties of a specific column at a given row and column position, likely during column resizing or layout adjustments.
Parameters:
nRow: NUMERIC - Row index.
nCol: NUMERIC - Column index.
nFlags: NUMERIC - Flags.
oColumn: OBJECT - TxBrwColumn object.
Return Value: None
Usage Example: (Internal use only)
105. GoNextCtrl( hWnd )
Description: Moves the input focus to the next control within the same window as the TXBrowse control. This is often used for navigation between controls in a form or dialog.
Parameters:
hWnd: - Handle of the current control that has focus.
Return Value: None
Usage Example: (Used internally for control navigation)
106. GoPrevCtrl()
Description: Moves the input focus to the previous control in the window. This is a VIRTUAL method, meaning it's designed to be overridden in derived classes to customize the behavior of moving to the previous control.
Parameters: None
Return Value: None
Usage Example: (Virtual method, override in derived classes for custom behavior)
107. SelFont()
Description: Selects and retrieves the currently active font for the TXBrowse control.
Parameters: None
Return Value: None
Usage Example: (Internal use only, likely related to font handling within the control)
108. SetFont( oFont, lResizeCols )
Description: Sets the font to be used for displaying data within the TXBrowse control.
Parameters:
oFont: OBJECT - The TFont object representing the font to be applied.
lResizeCols: LOGICAL - .T. to automatically adjust column widths to fit the new font, .F. to keep column widths unchanged.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetFont( myFont, .T. ) // Applies 'myFont' and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour
109. FontSize( nPlus )
Description: Dynamically adjusts the font size of the browse control, either increasing or decreasing it.
Parameters:
nPlus: NUMERIC - A positive value to increase the font size, or a negative value to decrease it.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:FontSize( 1 ) // Increases the font size by 1 point.
oBrw:FontSize( -2 ) // Decreases the font size by 2 points.
content_copy
download
Use code with caution.
Harbour
110. ReCalcWH()
Description: Recalculates the widths and heights of various elements within the TXBrowse control, such as headers, footers, and rows, based on the current font and other style settings. This is typically called internally after changes that might affect layout.
Parameters: None
Return Value: None
Usage Example: (Internal use only, called automatically when layout changes occur)
111. DrawSelect()
Description: Draws the visual indicator for the currently selected row (the record selector).
Parameters: None
Return Value: None
Usage Example: (Internal use only, called during painting to visually highlight the selected row)
112. RefreshCurrent()
Description: Refreshes the display of the currently selected row in the browse control. This is useful to update the display after data changes.
Parameters: None
Return Value: None
Usage Example:
oBrw:RefreshCurrent() // Updates the display of the current row.
content_copy
download
Use code with caution.
Harbour
113. aRow()
Description: Accessor method to retrieve the data for the currently selected row when using an array as the data source.
Parameters: None
Return Value: - Returns the data for the current row as an array element.
Usage Example:
currentRowData := oBrw:aRow // Retrieves data of the current row in array browse.
content_copy
download
Use code with caution.
Harbour
114. oCol( u )
Description: Retrieves a TxBrwColumn object associated with the TXBrowse control.
Parameters:
u: NUMERIC or OBJECT - Column index (1-based) or a direct reference to a TxBrwColumn object.
Return Value: OBJECT - Returns the TxBrwColumn object if found, otherwise returns NIL.
Usage Example:
oFirstColumn := oBrw:oCol( 1 ) // Retrieves the TxBrwColumn object for the first column.
content_copy
download
Use code with caution.
Harbour
115. RefreshHeaders()
Description: Refreshes the visual display of the header area of the TXBrowse control.
Parameters: None
Return Value: None
Usage Example:
oBrw:RefreshHeaders() // Redraws the header area to reflect changes.
content_copy
download
Use code with caution.
Harbour
116. RefreshFooters()
Description: Refreshes the visual display of the footer area of the TXBrowse control.
Parameters: None
Return Value: None
Usage Example:
oBrw:RefreshFooters() // Redraws the footer area to reflect changes, like updated totals.
content_copy
download
Use code with caution.
Harbour
117. ClpRow( lFullRow, aCols, lFormatted )
Description: Copies the data of a row to the clipboard, formatting it as text.
Parameters:
lFullRow: LOGICAL - .T. to copy all columns of the row, .F. to copy only specified columns.
aCols: ARRAY - (Optional) Array of column indices to copy if lFullRow is .F..
lFormatted: LOGICAL - .T. to format the text output for better compatibility with MS Word, .F. for plain text.
Return Value: CHARACTER - Returns a character string containing the formatted row data for the clipboard.
Usage Example:
clipboardText := oBrw:ClpRow( .T. ) // Copies the entire current row to the clipboard as formatted text.
content_copy
download
Use code with caution.
Harbour
118. Copy( laRows, aCols )
Description: Copies one or more rows from the browse to the clipboard.
Parameters:
laRows: LOGICAL or ARRAY - Specifies which rows to copy:
.T. : Copy all rows in the browse.
.F. : Copy only the currently selected row.
ARRAY : Copy rows at the specified indices in the array.
aCols: ARRAY - (Optional) Array of column indices to copy for the specified rows.
Return Value: None
Usage Example:
oBrw:Copy( .F. ) // Copies the currently selected row.
oBrw:Copy( .T., { 1, 3, 5 } ) // Copies all rows but only columns 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour
119. Paste( cText )
Description: Pastes data from the clipboard into the browse control, starting at the currently selected cell.
Parameters:
cText: CHARACTER - (Optional) Text string to paste. If omitted, the method reads data from the clipboard.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Paste() // Pastes clipboard data into the browse.
oBrw:Paste( "Data to paste" ) // Pastes the provided text directly.
content_copy
download
Use code with caution.
Harbour
120. aCellCoor( nRow, nCol )
Description: Retrieves the screen coordinates (top, left, bottom, right) of a specific cell within the browse control.
Parameters:
nRow: NUMERIC - Row index of the cell.
nCol: NUMERIC - Column index of the cell.
Return Value: ARRAY - Returns an array containing the coordinates: { nTop, nLeft, nBottom, nRight } in pixels.
Usage Example:
cellCoords := oBrw:aCellCoor( 5, 2 ) // Gets coordinates of the cell at row 5, column 2.
content_copy
download
Use code with caution.
Harbour
121. CellBitmap( nRow, nCol )
Description: Creates a bitmap image of a specific cell within the browse control.
Parameters:
nRow: NUMERIC - Row index of the cell.
nCol: NUMERIC - Column index of the cell.
Return Value: OBJECT - Returns a bitmap handle (HBITMAP) of the cell's content.
Usage Example:
hCellBitmap := oBrw:CellBitmap( 1, 1 ) // Creates a bitmap of the cell at row 1, column 1.
content_copy
download
Use code with caution.
Harbour
122. ShowMessage( cMsg, nSecs, nClrText, nClrBack )
Description: Displays a message overlay within the TXBrowse control. This is a method version of the ShowMessage DATA member, allowing for codeblock parameters.
Parameters: (Same as for the ShowMessage DATA member)
Return Value: None
Usage Example:
oBrw:ShowMessage( { || "Loading data..." }, 0 ) // Displays a message using a codeblock for the message text.
content_copy
download
Use code with caution.
Harbour
123. CloseMessage()
Description: Closes any message box currently displayed by ShowMessage.
Parameters: None
Return Value: None
Usage Example:
oBrw:CloseMessage() // Closes the message box.
content_copy
download
Use code with caution.
Harbour
124. SetPos( nRow, nCol, lPixel, bAction )
Description: Sets the cursor position within the browse. This is a method version of the SetPos DATA member, allowing for a codeblock to be executed after repositioning.
Parameters: (Same as for the SetPos DATA member)
Return Value: None
Usage Example:
oBrw:SetPos( 1, 2, .F., { || MsgInfo( "Cursor moved" ) } ) // Repositions the cursor and executes a codeblock.
content_copy
download
Use code with caution.
Harbour
125. SetBackGround( uBack, uBckMode )
Description: Sets the background appearance of the browse control. This is a method version of the SetBackGround DATA member, allowing for codeblock parameters.
Parameters: (Same as for the SetBackGround DATA member)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:SetBackGround( { || CLR_BLUE }, 2 ) // Sets background using a codeblock for the color and gradient mode.
content_copy
download
Use code with caution.
Harbour
126. MakeBrush()
Description: Creates a brush object for painting the browse background. Method version for use within codeblocks.
Parameters: None
Return Value: OBJECT - Returns the created brush object.
Usage Example: (Internal use only, method version for codeblock use)
127. DataRect()
Description: Returns a TRect object representing the data display area of the browse. Method version for use within codeblocks.
Parameters: None
Return Value: OBJECT - Returns a TRect object.
Usage Example: (Internal use only - method version for codeblock usage)
128. cBmpAdjBrush( cFile )
Description: Sets or gets the bitmap brush for background adjustment. Method version for use within codeblocks.
Parameters: (Same as DATA member cBmpAdjBrush)
Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
129. ColStretch( nStretchCol )
Description: Stretches a column to fill available space. Method version for use within codeblocks.
Parameters: (Same as DATA member ColStretch)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
130. DestroyToolTip()
Description: Destroys the tooltip control. Method version for use within codeblocks.
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
131. NcMouseMove( nHitTestCode, nRow, nCol )
Description: Handles WM_NCMOUSEMOVE message. Method version for use within codeblocks.
Parameters: (Same as DATA member NcMouseMove)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
132. MouseLeave( nRow, nCol, nFlags )
Description: Handles MouseLeave event. Method version for use within codeblocks.
Parameters: (Same as DATA member MouseLeave)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
133. uDataSource()
Description: Accessor for DataSource. Method version for use within codeblocks.
Parameters: None
Return Value: - Returns the data source object.
Usage Example: (Internal use only - method version for codeblock usage)
134. DataRow( lNew, cFieldList, lSourceData, aInitVals )
Description: Creates DataRow. Method version for use within codeblocks.
Parameters: (Same as DATA member DataRow)
Return Value: OBJECT - Returns the created or edited TXBrwRow object.
Usage Example: (Internal use only - method version for codeblock usage)
135. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )
Description: Edits Source. Method version for use within codeblocks.
Parameters: (Same as DATA member EditSource)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
136. EditBrowse( lNew, cFieldList, lNavigate )
Description: Edits Browse. Method version for use within codeblocks.
Parameters: (Same as DATA member EditBrowse)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
137. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )
Description: Edits data (general edit method). Method version for use within codeblocks.
Parameters: (Same as DATA member Edit)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
138. Delete( lMsg )
Description: Deletes a record. Method version for use within codeblocks.
Parameters: (Same as DATA member Delete)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
139. GoFltRow( n )
Description: Navigates to a specific row within a filtered browse based on its filter row index.
Parameters:
n: NUMERIC - The filter row index to navigate to (1-based).
Return Value: LOGICAL - Returns .T. if navigation was successful, .F. otherwise.
Usage Example:
oBrw:GoFltRow( 3 ) // Moves the browse cursor to the 3rd row in the filtered dataset.
content_copy
download
Use code with caution.
Harbour
140. GoFltRow( n ) (Second Definition)
Description: Retrieves the filter row index if no parameters are passed.
Parameters:
n: NUMERIC - (Optional) If NIL it returns the current filter row index, otherwise it sets the filter row index.
Return Value: NUMERIC - Returns the current filter row index.
Usage Example:
nCurrentFilterRow := oBrw:GoFltRow() // Gets the current filter row index.
content_copy
download
Use code with caution.
Harbour
141. SaveState( aAdditionalData )
Description: Saves the current state of the browse control, allowing for later restoration.
Parameters:
aAdditionalData: ARRAY - (Optional) Array for saving additional custom data with the browse state.
Return Value: None
Usage Example:
oBrw:SaveState() // Saves the current browse state.
oBrw:SaveState( { "CustomData1", "CustomData2" } ) // Saves state with additional data.
content_copy
download
Use code with caution.
Harbour
142. RestoreState( cState )
Description: Restores the browse control to a previously saved state, using a state string obtained from SaveState().
Parameters:
cState: CHARACTER - State string obtained from SaveState().
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:RestoreState( savedStateString ) // Restores browse state from the saved string.
content_copy
download
Use code with caution.
Harbour
143. OldRestoreState( cState )
Description: Retained for compatibility with older versions (10.8) of the TXBrowse class. Restores browse state from a state string.
Parameters:
cState: CHARACTER - State string in the older format.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (For backward compatibility with older saved states)
144. Lock()
Description: Locks the browse control, preventing data modifications.
Parameters: None
Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.
Usage Example:
lLocked := oBrw:Lock()
content_copy
download
Use code with caution.
Harbour
145. UnLock()
Description: Unlocks the browse control, allowing data modifications.
Parameters: None
Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).
Usage Example:
oBrw:UnLock()
content_copy
download
Use code with caution.
Harbour
146. SaveData( lRefresh )
Description: Saves any pending data changes to the underlying data source.
Parameters:
lRefresh: LOGICAL - .T. to refresh the browse after saving, .F. otherwise.
Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.
Usage Example:
lSaved := oBrw:SaveData( .T. ) // Saves data changes and refreshes the browse.
content_copy
download
Use code with caution.
Harbour
147. ShowSeek()
Description: Shows or hides the incremental seek input control (TGet object).
Parameters: None
Return Value: None
Usage Example:
oBrw:ShowSeek() // Shows the incremental seek input control.
content_copy
download
Use code with caution.
Harbour
148. Seek( cSeek )
Description: Performs an incremental seek operation based on the provided search string.
Parameters:
cSeek: CHARACTER - String to search for incrementally.
Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.
Usage Example:
lFound := oBrw:Seek( "customer name" ) // Performs incremental seek for "customer name".
content_copy
download
Use code with caution.
Harbour
149. RddIncrSeek( cExpr, uSeek )
Description: Performs incremental seek on an RDD data source using a custom expression.
Parameters:
cExpr: CHARACTER - Expression to evaluate for each record during the seek.
uSeek: - Search string to match against the expression result.
Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.
Usage Example: (Advanced usage for custom incremental seek logic)
150. RddIncrFilter( cExpr, uSeek )
Description: Performs incremental filtering on an RDD data source using a custom expression.
Parameters:
cExpr: CHARACTER - Expression to evaluate for filtering.
uSeek: - Search string for filtering criteria.
Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.
Usage Example: (Advanced usage for custom incremental filtering logic)
151. ArrayIncrSeek( cSeek, nGoTo )
Description: Performs incremental seek on an array data source.
Parameters:
cSeek: CHARACTER - String to search for incrementally.
nGoTo: NUMERIC - Row index to go to if a match is found (optional).
Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.
Usage Example:
lFound := oBrw:ArrayIncrSeek( "item description" ) // Incremental seek in array data.
content_copy
download
Use code with caution.
Harbour
152. ArrayIncrFilter( cSeek, nGoTo )
Description: Performs incremental filtering on an array data source.
Parameters:
cSeek: CHARACTER - String to filter by.
nGoTo: NUMERIC - Row index to navigate to after filtering (optional).
Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.
Usage Example:
oBrw:ArrayIncrFilter( "status: pending" ) // Incremental filter on array data.
content_copy
download
Use code with caution.
Harbour
153. AdoIncrSeek( uSeek )
Description: Performs incremental seek on an ADO recordset data source.
Parameters:
uSeek: - String to search for incrementally.
Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.
Usage Example:
lFound := oBrw:AdoIncrSeek( "product name" ) // Incremental seek in ADO recordset.
content_copy
download
Use code with caution.
Harbour
154. Select( nOperation )
Description: Selects or deselects rows in multi-select mode based on different operations.
Parameters:
nOperation: NUMERIC - Operation code:
0: Deselect all rows.
1: Add current row to selection.
2: Swap current row selection (toggle).
3: Select a range of rows (Shift+click).
4: Select all rows.
Return Value: None
Usage Example:
oBrw:Select( 1 ) // Adds the current row to the selection.
oBrw:Select( 0 ) // Deselects all rows.
content_copy
download
Use code with caution.
Harbour
155. SelectAll()
Description: Selects all rows in the browse control (shortcut for Select(4)).
Parameters: None
Return Value: None
Usage Example:
oBrw:SelectAll() // Selects all rows in the browse.
content_copy
download
Use code with caution.
Harbour
156. SelectNone()
Description: Deselects all rows in the browse control (shortcut for Select(0)).
Parameters: None
Return Value: None
Usage Example:
oBrw:SelectNone() // Deselects all rows.
content_copy
download
Use code with caution.
Harbour
157. IsSelectedRow()
Description: Checks if the current row is selected in multi-select mode.
Parameters: None
Return Value: LOGICAL - .T. if the current row is selected, .F. otherwise.
Usage Example:
if oBrw:IsSelectedRow()
MsgInfo( "Current row is selected." )
endif
content_copy
download
Use code with caution.
Harbour
158. SelectRow( nOperation )
Description: Selects or deselects the current row in multi-select mode (internal method, likely used by Select).
Parameters:
nOperation: NUMERIC - Operation code (similar to Select, but specifically for the current row).
Return Value: None
Usage Example: (Internal use only)
159. Adjust()
Description: Adjusts the layout and appearance of the browse control, recalculating heights, widths, and other visual elements based on current settings.
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Adjust() // Recalculates and adjusts browse layout.
content_copy
download
Use code with caution.
Harbour
160. Check_oSeek()
Description: Checks and handles the oSeek object (incremental seek input) (internal method).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only)
161. SetSortBmp()
Description: Sets the bitmaps used for sort indicators in column headers (internal method).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only)
162. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )
Description: Automatically adjusts column widths to fit their content.
Parameters:
aColsToFit: ARRAY - Array of column indices or TxBrwColumn objects to auto-fit. If NIL, auto-fits all columns.
nRows: NUMERIC - Number of rows to consider when calculating column widths. If NIL, considers all rows.
lDataOnly: LOGICAL - .T. to consider only data rows for width calculation, .F. to include header and footer.
nMaxWidth: NUMERIC - Maximum width for columns (optional).
Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.
Usage Example:
oBrw:AutoFit() // Auto-fits all columns to their content.
oBrw:AutoFit( { 1, 3 } ) // Auto-fits columns 1 and 3.
oBrw:AutoFit( , 100 ) // Auto-fits columns considering only the first 100 rows.
content_copy
download
Use code with caution.
Harbour
163. CheckSize()
Description: Checks and adjusts the size of the browse control based on margins and padding (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
164. Resize( nSizeType, nWidth, nHeight )
Description: Resizes the browse control to the specified dimensions or using predefined size types.
Parameters:
nSizeType: NUMERIC - Size type code (e.g., SIZE_PIXEL, SIZE_CLIENT, SIZE_WINDOW).
nWidth: NUMERIC - New width in pixels (if nSizeType is SIZE_PIXEL).
nHeight: NUMERIC - New height in pixels (if nSizeType is SIZE_PIXEL).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Resize( SIZE_PIXEL, 800, 600 ) // Resizes browse to 800x600 pixels.
oBrw:Resize( SIZE_CLIENT ) // Resizes browse to fill client area of parent window.
content_copy
download
Use code with caution.
Harbour
165. Change( lRow )
Description: Handles the change event, triggered when the selected row changes or a column is modified.
Parameters:
lRow: LOGICAL - .T. if the change is due to row selection, .F. if due to column change.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use, called automatically when row or column selection changes)
166. MakeTotals( aCols )
Description: Calculates totals for specified columns and prepares them for display in the footer (internal method).
Parameters:
aCols: ARRAY - Array of column indices or TxBrwColumn objects to calculate totals for.
Return Value: None
Usage Example: (Internal use only)
167. SaveTotals( lBlank )
Description: Saves the calculated totals (internal method).
Parameters:
lBlank: LOGICAL - .T. to blank out existing totals before saving, .F. otherwise.
Return Value: None
Usage Example: (Internal use only)
168. ReCalcTotals( lReduce )
Description: Recalculates totals based on changes in data or filtering (internal method).
Parameters:
lReduce: LOGICAL - .T. to reduce totals based on filtered data, .F. otherwise.
Return Value: None
Usage Example: (Internal use only)
169. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )
Description: General-purpose evaluation method for codeblocks, allowing iteration over browse rows with conditions and limits.
Parameters:
bBlock: CODEBLOCK - Codeblock to be evaluated for each row.
bFor: CODEBLOCK - Codeblock to be evaluated before each row (condition for row processing).
bWhile: CODEBLOCK - Codeblock for loop continuation condition.
nNext: NUMERIC - Number of rows to process (optional).
nRec: NUMERIC - Starting record number (optional).
lRest: LOGICAL - .T. to process from current record to end, .F. otherwise (optional).
Return Value: None
Usage Example:
oBrw:Eval( { |o| MsgInfo( o:Column1 ) }, , { || oBrw:Eof() } ) // Iterates through all rows and displays "Column1" value in each row.
content_copy
download
Use code with caution.
Harbour
170. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )
Description: Generates a report from the browse data, allowing for preview, printing, and exporting to PDF.
Parameters:
cTitle: CHARACTER - Title for the report.
lPreview: LOGICAL - .T. to show print preview dialog, .F. for direct printing.
lModal: LOGICAL - .T. to show print preview dialog as modal, .F. as modeless.
bSetUp: CODEBLOCK - Codeblock to customize report setup (optional).
aGroupBy: ARRAY - Array of column indices or TxBrwColumn objects to group data by (optional).
cPDF: CHARACTER - Path to save the report as PDF (optional, if provided, exports to PDF directly).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the report (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Report( "Customer Report", .T., .T., , { 2 }, "customer_report.pdf" ) // Generates a previewable PDF report grouped by the 2nd column.
content_copy
download
Use code with caution.
Harbour
171. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )
Description: Exports browse data to a Microsoft Word document.
Parameters:
bProgress: CODEBLOCK - Codeblock to display export progress (optional).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the Word document (optional).
nWrdTblFormat: NUMERIC - Word table format code (optional).
nPageOrientation: NUMERIC - Page orientation (0 for portrait, 1 for landscape, optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:ToWord( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, , 5 ) // Exports data to Word with progress display.
content_copy
download
Use code with caution.
Harbour
172. ToHTML( cHtml, lShow )
Description: Exports browse data to an HTML file.
Parameters:
cHtml: CHARACTER - Path to save the HTML file.
lShow: LOGICAL - .T. to open the HTML file after export, .F. otherwise.
Return Value: None
Usage Example:
oBrw:ToHTML( "browse_data.html", .T. ) // Exports data to HTML and opens the file in browser.
content_copy
download
Use code with caution.
Harbour
173. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )
Description: Exports browse data to a CSV (Comma Separated Values) file.
Parameters:
cFile: CHARACTER - Path to save the CSV file.
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in CSV (optional).
lHeaders: LOGICAL - .T. to include column headers in CSV, .F. otherwise.
cTrue: CHARACTER - String representation for logical TRUE value in CSV (optional).
cFalse: CHARACTER - String representation for logical FALSE value in CSV (optional).
cDelim: CHARACTER - Delimiter character for CSV (optional, default is comma).
Return Value: None
Usage Example:
oBrw:ToCSV( "browse_data.csv", , .T., "Yes", "No", ";" ) // Exports to CSV with custom delimiter and logical value representations.
content_copy
download
Use code with caution.
Harbour
174. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )
Description: Exports browse data to an Excel spreadsheet file (XLS or XLSX).
Parameters:
bProgress: CODEBLOCK - Codeblock to display export progress (optional).
nGroupBy: NUMERIC - Column index to group data in Excel (optional).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Excel (optional).
lShow: LOGICAL - .T. to open Excel after export, .F. otherwise.
cPDF: CHARACTER - Path to save as PDF in addition to Excel (optional).
bPrePDF: CODEBLOCK - Codeblock to execute before PDF export (optional).
Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.
Usage Example:
oBrw:ToExcel( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, , .T., "browse_data.pdf" ) // Exports to Excel with grouping, progress display, and PDF export.
content_copy
download
Use code with caution.
Harbour
175. ToXlsx( cFileXls, aCols )
Description: Exports browse data to an XLSX (Excel 2007+) file.
Parameters:
cFileXls: CHARACTER - Path to save the XLSX file.
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in XLSX (optional).
Return Value: None
Usage Example:
oBrw:ToXlsx( "browse_data.xlsx" ) // Exports data to XLSX file.
content_copy
download
Use code with caution.
Harbour
176. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )
Description: Exports browse data to a LibreOffice Calc spreadsheet file.
Parameters:
bProgress: CODEBLOCK - Codeblock to display export progress (optional).
nGroupBy: NUMERIC - Column index to group data in Calc (optional).
nPasteMode: NUMERIC - Paste mode for Calc (optional).
aSaveAs: ARRAY - Array for save-as options (optional).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Calc (optional).
Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.
Usage Example:
oBrw:ToCalc( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, 2 ) // Exports to Calc with grouping and paste mode 2.
content_copy
download
Use code with caution.
Harbour
177. ToDbf( cFile, bProgress, aCols, lPrompt )
Description: Exports browse data to a DBF (dBase) file.
Parameters:
cFile: CHARACTER - Path to save the DBF file.
bProgress: CODEBLOCK - Codeblock to display export progress (optional).
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in DBF (optional).
lPrompt: LOGICAL - .T. to prompt user for file overwrite confirmation, .F. otherwise.
Return Value: None
Usage Example:
oBrw:ToDbf( "browse_data.dbf", , , .T. ) // Exports to DBF with overwrite prompt enabled.
content_copy
download
Use code with caution.
Harbour
178. ToArray( aCols )
Description: Exports browse data to a two-dimensional array.
Parameters:
aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in array (optional).
Return Value: ARRAY - Returns the two-dimensional array containing browse data.
Usage Example:
myDataArray := oBrw:ToArray() // Exports all visible columns to an array.
content_copy
download
Use code with caution.
Harbour
179. CurrentRow()
Description: Returns a TXBrwRow object representing the data of the currently selected row.
Parameters: None
Return Value: OBJECT - Returns a TXBrwRow object.
Usage Example:
oCurrentRow := oBrw:CurrentRow() // Gets a TXBrwRow object for the current row.
content_copy
download
Use code with caution.
Harbour
180. AddBitmap( uBmp, aResize )
Description: Adds a bitmap to the browse control's bitmap collection for use in columns or other visual elements.
Parameters:
uBmp: CHARACTER or NUMERIC - Path to bitmap file or bitmap handle.
aResize: - Resize parameters (optional).
Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.
Usage Example:
nBitmapIndex := oBrw:AddBitmap( "mybitmap.bmp" ) // Adds a bitmap to the browse's bitmap collection.
content_copy
download
Use code with caution.
Harbour
181. aBitmap( n )
Description: Accessor method to retrieve a bitmap from the browse control's bitmap collection by its index.
Parameters:
n: NUMERIC - Index of the bitmap in the aBitmaps array.
Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.
Usage Example:
hBitmap := oBrw:aBitmap( nBitmapIndex ) // Retrieves a bitmap by its index.
content_copy
download
Use code with caution.
Harbour
182. Initiate( hDlg )
Description: Initializes the browse control (internal method).
Parameters:
hDlg: - Handle to the dialog window (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only)
183. Display()
Description: Displays the browse control (internal method).
Parameters: None
Return Value: NUMERIC - Always returns 0.
Usage Example: (Internal use only)
184. Paint()
Description: Paints the browse control's content (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only, called by the windowing system during redraw)
185. DrawBorder()
Description: Draws the border around the browse control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only, called during painting)
186. CheckSortCbx()
Description: Checks and updates the sort checkbox control (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
187. GetPaintCols( nLast )
Description: Retrieves an array of columns to be painted, optimized for performance (internal method).
Parameters:
nLast: NUMERIC - Last displayed column index.
Return Value: ARRAY - Array of TxBrwColumn objects to paint.
Usage Example: (Internal use only)
188. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )
Description: Paints a horizontal divider line (internal method).
Parameters:
hDC: OBJECT - Device context handle.
nRow: NUMERIC - Row position.
nLeft: NUMERIC - Left position.
nRight: NUMERIC - Right position.
nStyle: NUMERIC - Line style.
hRowPen: OBJECT - Pen handle for row lines.
hWhitePen: OBJECT - Pen handle for white color.
Return Value: None
Usage Example: (Internal use only)
189. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )
Description: Paints a vertical divider line (internal method).
Parameters:
hDC: OBJECT - Device context handle.
nCol: NUMERIC - Column position.
nTop: NUMERIC - Top position.
nBottom: NUMERIC - Bottom position.
nStyle: NUMERIC - Line style.
hColPen: OBJECT - Pen handle for column lines.
hWhitePen: OBJECT - Pen handle for white color.
Return Value: None
Usage Example: (Internal use only)
190. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )
Description: Paints the header area of the browse (internal method).
Parameters:
hDC: OBJECT - Device context handle.
aCols: ARRAY - Array of columns to paint.
nLast: NUMERIC - Last displayed column index.
hWhitePen: OBJECT - Pen handle for white color.
hGrayPen: OBJECT - Pen handle for gray color.
hColPen: OBJECT - Pen handle for column lines.
Return Value: None
Usage Example: (Internal use only)
191. PaintTopBar( hDC, hGrayPen )
Description: Paints the top bar area of the browse (internal method).
Parameters:
hDC: OBJECT - Device context handle.
hGrayPen: OBJECT - Pen handle for gray color.
Return Value: None
Usage Example: (Internal use only)
192. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )
Description: Paints the footer area of the browse (internal method).
Parameters:
hDC: OBJECT - Device context handle.
aCols: ARRAY - Array of columns to paint.
nLast: NUMERIC - Last displayed column index.
nGridWidth: NUMERIC - Grid width.
nBrwHeight: NUMERIC - Browse height.
hWhitePen: OBJECT - Pen handle for white color.
hGrayPen: OBJECT - Pen handle for gray color.
Return Value: None
Usage Example: (Internal use only)
193. Refresh( lComplete )
Description: Refreshes the browse control, redrawing its content.
Parameters:
lComplete: LOGICAL - .T. for a full refresh, .F. for partial refresh (optional).
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Refresh() // Performs a full refresh.
oBrw:Refresh( .F. ) // Performs a partial refresh.
content_copy
download
Use code with caution.
Harbour
194. CalcRowSelPos()
Description: Calculates the position of the selected row (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
195. DelRepos()
Description: Repositions browse after record deletion (internal method).
Parameters: None
Return Value: None
Usage Example: (Internal use only)
196. KeyCount()
Description: Returns the total number of rows in the data source.
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example:
nRowCount := oBrw:KeyCount()
content_copy
download
Use code with caution.
Harbour
197. BookMark( uGoTo )
Description: Sets or gets the bookmark position (record number).
Parameters:
uGoTo: NUMERIC - Record number to bookmark (optional).
Return Value: NUMERIC - Returns the current bookmark value (record number).
Usage Example:
nBookmarkValue := oBrw:BookMark() // Gets current bookmark value.
oBrw:BookMark( 15 ) // Sets bookmark to record number 15.
content_copy
download
Use code with caution.
Harbour
198. KeyNo( nKeyGoTo )
Description: Sets or gets the key number (vertical scroll position).
Parameters:
nKeyGoTo: NUMERIC - Key number to set (optional).
Return Value: NUMERIC - Returns the current key number.
Usage Example:
nKeyNumber := oBrw:KeyNo() // Gets current key number.
oBrw:KeyNo( 50 ) // Sets key number to 50.
content_copy
download
Use code with caution.
Harbour
199. Skip( n )
Description: Skips rows forward or backward.
Parameters:
n: NUMERIC - Number of rows to skip (positive for forward, negative for backward).
Return Value: NUMERIC - Number of rows actually skipped.
Usage Example:
nSkippedRows := oBrw:Skip( 5 ) // Skips 5 rows forward.
content_copy
download
Use code with caution.
Harbour
200. Bof()
Description: Checks if the browse is at the Beginning Of File (BOF).
Parameters: None
Return Value: LOGICAL - .T. if BOF, .F. otherwise.
Usage Example:
if oBrw:Bof()
MsgInfo( "At the beginning of the data." )
endif
content_copy
download
Use code with caution.
Harbour
201. Eof()
Description: Checks if the browse is at the End Of File (EOF).
Parameters: None
Return Value: LOGICAL - .T. if EOF, .F. otherwise.
Usage Example:
if oBrw:Eof()
MsgInfo( "At the end of the data." )
endif
content_copy
download
Use code with caution.
Harbour
202. GoTop()
Description: Moves the browse cursor to the first row (Top of File - TOF).
Parameters: None
Return Value: None
Usage Example:
oBrw:GoTop() // Moves to the first row.
content_copy
download
Use code with caution.
Harbour
203. GoBottom()
Description: Moves the browse cursor to the last row (Bottom of File - BOF).
Parameters: None
Return Value: None
Usage Example:
oBrw:GoBottom() // Moves to the last row.
content_copy
download
Use code with caution.
Harbour
204. GoUp( nUp )
Description: Moves the browse cursor up by a specified number of rows.
Parameters:
nUp: NUMERIC - Number of rows to move up (default is 1).
Return Value: None
Usage Example:
oBrw:GoUp() // Moves up one row.
oBrw:GoUp( 3 ) // Moves up three rows.
content_copy
download
Use code with caution.
Harbour
205. GoDown( nDown, nKey )
Description: Moves the browse cursor down by a specified number of rows.
Parameters:
nDown: NUMERIC - Number of rows to move down (default is 1).
nKey: NUMERIC - Key code (optional, used internally).
Return Value: None
Usage Example:
oBrw:GoDown() // Moves down one row.
oBrw:GoDown( 5 ) // Moves down five rows.
content_copy
download
Use code with caution.
Harbour
206. PageUp( nLines )
Description: Moves the browse cursor up by a page (number of visible data rows).
Parameters:
nLines: NUMERIC - Number of lines to page up (default is number of data rows).
Return Value: None
Usage Example:
oBrw:PageUp() // Pages up one page of data.
content_copy
download
Use code with caution.
Harbour
207. PageDown( nLines )
Description: Moves the browse cursor down by a page (number of visible data rows).
Parameters:
nLines: NUMERIC - Number of lines to page down (default is number of data rows).
Return Value: None
Usage Example:
oBrw:PageDown() // Pages down one page of data.
content_copy
download
Use code with caution.
Harbour
208. GoLeft()
Description: Moves the browse cursor one column to the left.
Parameters:
lOffset: NUMERIC - Offset to move left (optional, default is 1).
lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.
Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.
Usage Example:
oBrw:GoLeft() // Moves one column to the left.
content_copy
download
Use code with caution.
Harbour
209. GoRight()
Description: Moves the browse cursor one column to the right.
Parameters:
lOffset: NUMERIC - Offset to move right (optional, default is 1).
lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.
Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.
Usage Example:
oBrw:GoRight() // Moves one column to the right.
content_copy
download
Use code with caution.
Harbour
210. GoLeftMost()
Description: Moves the browse cursor to the leftmost visible column.
Parameters: None
Return Value: None
Usage Example:
oBrw:GoLeftMost() // Moves to the first visible column.
content_copy
download
Use code with caution.
Harbour
211. GoRightMost()
Description: Moves the browse cursor to the rightmost visible column.
Parameters: None
Return Value: None
Usage Example:
oBrw:GoRightMost() // Moves to the last visible column.
content_copy
download
Use code with caution.
Harbour
212. GoFirstEditCol()
Description: Moves the browse cursor to the first editable column in the current row.
Parameters: None
Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.
Usage Example:
oEditColumn := oBrw:GoFirstEditCol() // Moves cursor to the first editable column.
content_copy
download
Use code with caution.
Harbour
213. HandleEvent( nMsg, nWParam, nLParam )
Description: Handles window messages (internal method, event dispatcher).
Parameters:
nMsg: NUMERIC - Windows message code.
nWParam: NUMERIC - WPARAM parameter of the message.
nLParam: NUMERIC - LPARAM parameter of the message.
Return Value: NUMERIC - Message return value.
Usage Example: (Internal use only - handles Windows messages)
214. HandleGesture( nGesture, nLParam )
Description: Handles gesture events (internal method, for kinetic scrolling and touch gestures).
Parameters:
nGesture: NUMERIC - Gesture ID.
nLParam: NUMERIC - LPARAM parameter of the gesture event.
Return Value: NUMERIC - Gesture event return value.
Usage Example: (Internal use only - handles touch and kinetic scrolling)
215. GesturePan( aPanInfo )
Description: Handles pan gestures (used for kinetic scrolling, internal method).
Parameters:
aPanInfo: ARRAY - Array containing pan gesture information.
Return Value: NUMERIC - Gesture pan return value.
Usage Example: (Internal use only - handles kinetic scrolling gestures)
216. KeyCount()
Description: Returns the number of records (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example:
rowCount := oBrw:KeyCount() // Gets row count using codeblock.
content_copy
download
Use code with caution.
Harbour
217. BookMark()
Description: Accessor for Bookmark (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the bookmark value.
Usage Example:
bookmarkValue := oBrw:BookMark() // Gets bookmark value using codeblock.
content_copy
download
Use code with caution.
Harbour
218. KeyNo()
Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the key number.
Usage Example:
keyNumber := oBrw:KeyNo() // Gets key number using codeblock.
content_copy
download
Use code with caution.
Harbour
219. Skip()
Description: Accessor for Skip (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Number of rows to skip.
Return Value: - Returns the number of rows skipped.
Usage Example:
rowsSkipped := oBrw:Skip( 2 ) // Skips rows using codeblock.
content_copy
download
Use code with caution.
Harbour
220. Bof()
Description: Accessor for Bof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.
Usage Example:
isBOF := oBrw:Bof() // Checks BOF using codeblock.
content_copy
download
Use code with caution.
Harbour
221. Eof()
Description: Accessor for Eof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.
Usage Example:
isEOF := oBrw:Eof() // Checks EOF using codeblock.
content_copy
download
Use code with caution.
Harbour
222. GoTop()
Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example:
oBrw:GoTop() // Moves to top using codeblock.
content_copy
download
Use code with caution.
Harbour
223. GoBottom()
Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example:
oBrw:GoBottom() // Moves to bottom using codeblock.
content_copy
download
Use code with caution.
Harbour
224. GoFltRow( n )
Description: Accessor for GoFltRow (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Filter row index.
Return Value: NUMERIC - Returns the filter row index.
Usage Example: (Internal use only - method version for codeblock usage)
225. SaveState( aAdditionalData )
Description: Accessor for SaveState (same as DATA member, method version for codeblock usage).
Parameters:
aAdditionalData: ARRAY - Additional data array.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
226. RestoreState( cState )
Description: Accessor for RestoreState (same as DATA member, method version for codeblock usage).
Parameters:
cState: CHARACTER - State string.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
227. OldRestoreState( cState )
Description: Accessor for OldRestoreState (same as DATA member, method version for codeblock usage).
Parameters:
cState: CHARACTER - State string.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
228. Lock()
Description: Accessor for Lock (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.
Usage Example:
isLocked := oBrw:Lock() // Locks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour
229. UnLock()
Description: Accessor for UnLock (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).
Usage Example:
oBrw:UnLock() // Unlocks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour
230. SaveData( lRefresh )
Description: Accessor for SaveData (same as DATA member, method version for codeblock usage).
Parameters:
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.
Usage Example:
isSaved := oBrw:SaveData( .T. ) // Saves data using codeblock.
content_copy
download
Use code with caution.
Harbour
231. ShowSeek()
Description: Accessor for ShowSeek (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example:
oBrw:ShowSeek() // Shows seek input using codeblock.
content_copy
download
Use code with caution.
Harbour
232. Seek( cSeek )
Description: Accessor for Seek (same as DATA member, method version for codeblock usage).
Parameters:
cSeek: CHARACTER - Seek string.
Return Value: LOGICAL - Returns .T. if seek is successful, .F. otherwise.
Usage Example:
isFound := oBrw:Seek( "Search String" ) // Performs seek using codeblock.
content_copy
download
Use code with caution.
Harbour
233. Adjust()
Description: Accessor for Adjust (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example:
oBrw:Adjust() // Adjusts layout using codeblock.
content_copy
download
Use code with caution.
Harbour
234. Check_oSeek()
Description: Accessor for Check_oSeek (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
235. SetSortBmp()
Description: Accessor for SetSortBmp (same as DATA member, method version for codeblock usage).
Parameters:
aBmp: ARRAY - Bitmap array.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
236. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )
Description: Accessor for AutoFit (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member AutoFit)
Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.
Usage Example: (Internal use only - method version for codeblock usage)
237. CheckSize()
Description: Accessor for CheckSize (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
238. Resize( nSizeType, nWidth, nHeight )
Description: Accessor for Resize (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member Resize)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
239. Change( lRow )
Description: Accessor for Change (same as DATA member, method version for codeblock usage).
Parameters:
lRow: LOGICAL - Row flag.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
]]>Code: Select all | Expand
240. MakeTotals( aCols )
Description: Accessor for MakeTotals (same as DATA member, method version for codeblock usage).
Parameters:
aCols: ARRAY - Columns array.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
241. SaveTotals( lBlank )
Description: Accessor for SaveTotals (same as DATA member, method version for codeblock usage).
Parameters:
lBlank: LOGICAL - Blank flag.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
242. ReCalcTotals( lReduce )
Description: Accessor for ReCalcTotals (same as DATA member, method version for codeblock usage).
Parameters:
lReduce: LOGICAL - Reduce flag.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
243. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )
Description: Accessor for Eval (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member Eval)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
244. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )
Description: Accessor for Report (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member Report)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
245. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )
Description: Accessor for ToWord (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToWord)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
246. ToHTML( cHtml, lShow )
Description: Accessor for ToHTML (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToHTML)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
247. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )
Description: Accessor for ToCSV (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToCSV)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
248. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )
Description: Accessor for ToExcel (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToExcel)
Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
249. ToXlsx( cFileXls, aCols )
Description: Accessor for ToXlsx (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToXlsx)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
250. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )
Description: Accessor for ToCalc (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToCalc)
Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
251. ToArray( aCols )
Description: Accessor for ToArray (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToArray)
Return Value: ARRAY - Returns the two-dimensional array containing browse data.
Usage Example: (Internal use only - method version for codeblock usage)
252. CurrentRow()
Description: Accessor for CurrentRow (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns a TXBrwRow object.
Usage Example: (Internal use only - method version for codeblock usage)
253. AddBitmap( uBmp, aResize )
Description: Accessor for AddBitmap (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member AddBitmap)
Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.
Usage Example: (Internal use only - method version for codeblock usage)
254. aBitmap( n )
Description: Accessor for aBitmap (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member aBitmap)
Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.
Usage Example: (Internal use only - method version for codeblock usage)
255. Initiate( hDlg )
Description: Accessor for Initiate (same as DATA member, method version for codeblock usage).
Parameters:
hDlg: - Handle to the dialog window.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
256. Display()
Description: Accessor for Display (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Always returns 0.
Usage Example: (Internal use only - method version for codeblock usage)
257. Paint()
Description: Accessor for Paint (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Always returns 0.
Usage Example: (Internal use only - method version for codeblock usage)
258. DrawBorder()
Description: Accessor for DrawBorder (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
259. CheckSortCbx()
Description: Accessor for CheckSortCbx (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
260. GetPaintCols( nLast )
Description: Accessor for GetPaintCols (same as DATA member, method version for codeblock usage).
Parameters:
nLast: NUMERIC - Last column index.
Return Value: ARRAY - Array of columns to paint.
Usage Example: (Internal use only - method version for codeblock usage)
261. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )
Description: Accessor for PaintHDivider (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintHDivider)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
262. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )
Description: Accessor for PaintVDivider (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintVDivider)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
263. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )
Description: Accessor for PaintHeader (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintHeader)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
264. PaintTopBar( hDC, hGrayPen )
Description: Accessor for PaintTopBar (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintTopBar)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
265. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )
Description: Accessor for PaintFooter (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintFooter)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
266. Refresh( lComplete )
Description: Accessor for Refresh (same as DATA member, method version for codeblock usage).
Parameters:
lComplete: LOGICAL - Complete refresh flag.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
267. CalcRowSelPos()
Description: Accessor for CalcRowSelPos (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
268. DelRepos()
Description: Accessor for DelRepos (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
269. KeyCount()
Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example: (Internal use only - method version for codeblock usage)
270. BookMark()
Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).
Parameters:
u: - Bookmark value.
Return Value: NUMERIC - Returns the bookmark value.
Usage Example: (Internal use only - method version for codeblock usage)
271. KeyNo()
Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Key number.
Return Value: NUMERIC - Returns the key number.
Usage Example: (Internal use only - method version for codeblock usage)
272. Skip( n )
Description: Accessor for Skip (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Number of rows to skip.
Return Value: NUMERIC - Number of rows skipped.
Usage Example: (Internal use only - method version for codeblock usage)
273. Bof()
Description: Accessor for Bof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
274. Eof()
Description: Accessor for Eof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
275. GoTop()
Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
276. GoBottom()
Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
277. GoUp( nUp )
Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).
Parameters:
nUp: NUMERIC - Number of rows to go up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
278. GoDown( nDown, nKey )
Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).
Parameters:
nDown: NUMERIC - Number of rows to go down.
nKey: NUMERIC - Key code.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
279. PageUp( nLines )
Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
280. PageDown( nLines )
Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page down.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
281. GoLeft( lOffset, lRefresh )
Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Left offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
282. GoRight( lOffset, lRefresh )
Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Right offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
283. GoLeftMost()
Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
284. GoRightMost()
Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
285. GoFirstEditCol()
Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.
Usage Example: (Internal use only - method version for codeblock usage)
286. HandleEvent( nMsg, nWParam, nLParam )
Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member HandleEvent)
Return Value: NUMERIC - Message return value.
Usage Example: (Internal use only - method version for codeblock usage)
287. HandleGesture( nGesture, nLParam )
Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member HandleGesture)
Return Value: NUMERIC - Gesture event return value.
Usage Example: (Internal use only - method version for codeblock usage)
288. GesturePan( aPanInfo )
Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member GesturePan)
Return Value: NUMERIC - Gesture pan return value.
Usage Example: (Internal use only - method version for codeblock usage)
289. KeyCount()
Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example: (Internal use only - method version for codeblock usage)
290. BookMark()
Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the bookmark value.
Usage Example: (Internal use only - method version for codeblock usage)
291. KeyNo()
Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Returns the key number.
Usage Example: (Internal use only - method version for codeblock usage)
292. Skip( n )
Description: Accessor for Skip (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Number of rows to skip.
Return Value: NUMERIC - Number of rows skipped.
Usage Example: (Internal use only - method version for codeblock usage)
293. Bof()
Description: Accessor for Bof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
294. Eof()
Description: Accessor for Eof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
295. GoTop()
Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
296. GoBottom()
Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
297. GoUp( nUp )
Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).
Parameters:
nUp: NUMERIC - Number of rows to go up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
298. GoDown( nDown, nKey )
Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).
Parameters:
nDown: NUMERIC - Number of rows to go down.
nKey: NUMERIC - Key code.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
299. PageUp( nLines )
Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
300. PageDown( nLines )
Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page down.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
301. GoLeft( lOffset, lRefresh )
Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Left offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
302. GoRight( lOffset, lRefresh )
Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Right offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
303. GoLeftMost()
Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
304. GoRightMost()
Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
305. GoFirstEditCol()
Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.
Usage Example: (Internal use only - method version for codeblock usage)
306. HandleEvent( nMsg, nWParam, nLParam )
Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member HandleEvent)
Return Value: NUMERIC - Message return value.
Usage Example: (Internal use only - method version for codeblock usage)
307. HandleGesture( nGesture, nLParam )
Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member HandleGesture)
Return Value: NUMERIC - Gesture event return value.
Usage Example: (Internal use only - method version for codeblock usage)
308. GesturePan( aPanInfo )
Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member GesturePan)
Return Value: NUMERIC - Gesture pan return value.
Usage Example: (Internal use only - method version for codeblock usage)
309. KeyCount()
Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example: (Internal use only - method version for codeblock usage)
310. BookMark()
Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the bookmark value.
Usage Example: (Internal use only - method version for codeblock usage)
311. KeyNo()
Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Returns the key number.
Usage Example: (Internal use only - method version for codeblock usage)
312. Skip( n )
Description: Accessor for Skip (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Number of rows to skip.
Return Value: NUMERIC - Number of rows skipped.
Usage Example: (Internal use only - method version for codeblock usage)
313. Bof()
Description: Accessor for Bof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
314. Eof()
Description: Accessor for Eof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
315. GoTop()
Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
316. GoBottom()
Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
317. GoUp( nUp )
Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).
Parameters:
nUp: NUMERIC - Number of rows to go up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
318. GoDown( nDown, nKey )
Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).
Parameters:
nDown: NUMERIC - Number of rows to go down.
nKey: NUMERIC - Key code.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
319. PageUp( nLines )
Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
320. PageDown( nLines )
Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page down.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
321. GoLeft( lOffset, lRefresh )
Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Left offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
322. GoRight( lOffset, lRefresh )
Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Right offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
323. GoLeftMost()
Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
324. GoRightMost()
Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
325. GoFirstEditCol()
Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.
Usage Example: (Internal use only - method version for codeblock usage)
]]>Code: Select all | Expand
240. MakeTotals( aCols )
Description: Accessor for MakeTotals (same as DATA member, method version for codeblock usage).
Parameters:
aCols: ARRAY - Columns array.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
241. SaveTotals( lBlank )
Description: Accessor for SaveTotals (same as DATA member, method version for codeblock usage).
Parameters:
lBlank: LOGICAL - Blank flag.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
242. ReCalcTotals( lReduce )
Description: Accessor for ReCalcTotals (same as DATA member, method version for codeblock usage).
Parameters:
lReduce: LOGICAL - Reduce flag.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
243. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )
Description: Accessor for Eval (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member Eval)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
244. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )
Description: Accessor for Report (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member Report)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
245. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )
Description: Accessor for ToWord (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToWord)
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
246. ToHTML( cHtml, lShow )
Description: Accessor for ToHTML (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToHTML)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
247. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )
Description: Accessor for ToCSV (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToCSV)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
248. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )
Description: Accessor for ToExcel (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToExcel)
Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
249. ToXlsx( cFileXls, aCols )
Description: Accessor for ToXlsx (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToXlsx)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
250. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )
Description: Accessor for ToCalc (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToCalc)
Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
251. ToArray( aCols )
Description: Accessor for ToArray (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member ToArray)
Return Value: ARRAY - Returns the two-dimensional array containing browse data.
Usage Example: (Internal use only - method version for codeblock usage)
252. CurrentRow()
Description: Accessor for CurrentRow (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns a TXBrwRow object.
Usage Example: (Internal use only - method version for codeblock usage)
253. AddBitmap( uBmp, aResize )
Description: Accessor for AddBitmap (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member AddBitmap)
Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.
Usage Example: (Internal use only - method version for codeblock usage)
254. aBitmap( n )
Description: Accessor for aBitmap (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member aBitmap)
Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.
Usage Example: (Internal use only - method version for codeblock usage)
255. Initiate( hDlg )
Description: Accessor for Initiate (same as DATA member, method version for codeblock usage).
Parameters:
hDlg: - Handle to the dialog window.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
256. Display()
Description: Accessor for Display (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Always returns 0.
Usage Example: (Internal use only - method version for codeblock usage)
257. Paint()
Description: Accessor for Paint (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Always returns 0.
Usage Example: (Internal use only - method version for codeblock usage)
258. DrawBorder()
Description: Accessor for DrawBorder (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
259. CheckSortCbx()
Description: Accessor for CheckSortCbx (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
260. GetPaintCols( nLast )
Description: Accessor for GetPaintCols (same as DATA member, method version for codeblock usage).
Parameters:
nLast: NUMERIC - Last column index.
Return Value: ARRAY - Array of columns to paint.
Usage Example: (Internal use only - method version for codeblock usage)
261. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )
Description: Accessor for PaintHDivider (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintHDivider)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
262. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )
Description: Accessor for PaintVDivider (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintVDivider)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
263. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )
Description: Accessor for PaintHeader (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintHeader)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
264. PaintTopBar( hDC, hGrayPen )
Description: Accessor for PaintTopBar (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintTopBar)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
265. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )
Description: Accessor for PaintFooter (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member PaintFooter)
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
266. Refresh( lComplete )
Description: Accessor for Refresh (same as DATA member, method version for codeblock usage).
Parameters:
lComplete: LOGICAL - Complete refresh flag.
Return Value: OBJECT - Returns the TXBrowse object (Self).
Usage Example: (Internal use only - method version for codeblock usage)
267. CalcRowSelPos()
Description: Accessor for CalcRowSelPos (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
268. DelRepos()
Description: Accessor for DelRepos (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
269. KeyCount()
Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example: (Internal use only - method version for codeblock usage)
270. BookMark()
Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).
Parameters:
u: - Bookmark value.
Return Value: NUMERIC - Returns the bookmark value.
Usage Example: (Internal use only - method version for codeblock usage)
271. KeyNo()
Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Key number.
Return Value: NUMERIC - Returns the key number.
Usage Example: (Internal use only - method version for codeblock usage)
272. Skip( n )
Description: Accessor for Skip (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Number of rows to skip.
Return Value: NUMERIC - Number of rows skipped.
Usage Example: (Internal use only - method version for codeblock usage)
273. Bof()
Description: Accessor for Bof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
274. Eof()
Description: Accessor for Eof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
275. GoTop()
Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
276. GoBottom()
Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
277. GoUp( nUp )
Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).
Parameters:
nUp: NUMERIC - Number of rows to go up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
278. GoDown( nDown, nKey )
Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).
Parameters:
nDown: NUMERIC - Number of rows to go down.
nKey: NUMERIC - Key code.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
279. PageUp( nLines )
Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
280. PageDown( nLines )
Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page down.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
281. GoLeft( lOffset, lRefresh )
Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Left offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
282. GoRight( lOffset, lRefresh )
Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Right offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
283. GoLeftMost()
Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
284. GoRightMost()
Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
285. GoFirstEditCol()
Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.
Usage Example: (Internal use only - method version for codeblock usage)
286. HandleEvent( nMsg, nWParam, nLParam )
Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member HandleEvent)
Return Value: NUMERIC - Message return value.
Usage Example: (Internal use only - method version for codeblock usage)
287. HandleGesture( nGesture, nLParam )
Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member HandleGesture)
Return Value: NUMERIC - Gesture event return value.
Usage Example: (Internal use only - method version for codeblock usage)
288. GesturePan( aPanInfo )
Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member GesturePan)
Return Value: NUMERIC - Gesture pan return value.
Usage Example: (Internal use only - method version for codeblock usage)
289. KeyCount()
Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example: (Internal use only - method version for codeblock usage)
290. BookMark()
Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the bookmark value.
Usage Example: (Internal use only - method version for codeblock usage)
291. KeyNo()
Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Returns the key number.
Usage Example: (Internal use only - method version for codeblock usage)
292. Skip( n )
Description: Accessor for Skip (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Number of rows to skip.
Return Value: NUMERIC - Number of rows skipped.
Usage Example: (Internal use only - method version for codeblock usage)
293. Bof()
Description: Accessor for Bof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
294. Eof()
Description: Accessor for Eof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
295. GoTop()
Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
296. GoBottom()
Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
297. GoUp( nUp )
Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).
Parameters:
nUp: NUMERIC - Number of rows to go up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
298. GoDown( nDown, nKey )
Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).
Parameters:
nDown: NUMERIC - Number of rows to go down.
nKey: NUMERIC - Key code.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
299. PageUp( nLines )
Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
300. PageDown( nLines )
Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page down.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
301. GoLeft( lOffset, lRefresh )
Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Left offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
302. GoRight( lOffset, lRefresh )
Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Right offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
303. GoLeftMost()
Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
304. GoRightMost()
Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
305. GoFirstEditCol()
Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.
Usage Example: (Internal use only - method version for codeblock usage)
306. HandleEvent( nMsg, nWParam, nLParam )
Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member HandleEvent)
Return Value: NUMERIC - Message return value.
Usage Example: (Internal use only - method version for codeblock usage)
307. HandleGesture( nGesture, nLParam )
Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member HandleGesture)
Return Value: NUMERIC - Gesture event return value.
Usage Example: (Internal use only - method version for codeblock usage)
308. GesturePan( aPanInfo )
Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).
Parameters: (Same as DATA member GesturePan)
Return Value: NUMERIC - Gesture pan return value.
Usage Example: (Internal use only - method version for codeblock usage)
309. KeyCount()
Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Total number of rows.
Usage Example: (Internal use only - method version for codeblock usage)
310. BookMark()
Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: - Returns the bookmark value.
Usage Example: (Internal use only - method version for codeblock usage)
311. KeyNo()
Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: NUMERIC - Returns the key number.
Usage Example: (Internal use only - method version for codeblock usage)
312. Skip( n )
Description: Accessor for Skip (same as DATA member, method version for codeblock usage).
Parameters:
n: NUMERIC - Number of rows to skip.
Return Value: NUMERIC - Number of rows skipped.
Usage Example: (Internal use only - method version for codeblock usage)
313. Bof()
Description: Accessor for Bof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
314. Eof()
Description: Accessor for Eof (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
315. GoTop()
Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
316. GoBottom()
Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
317. GoUp( nUp )
Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).
Parameters:
nUp: NUMERIC - Number of rows to go up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
318. GoDown( nDown, nKey )
Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).
Parameters:
nDown: NUMERIC - Number of rows to go down.
nKey: NUMERIC - Key code.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
319. PageUp( nLines )
Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page up.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
320. PageDown( nLines )
Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).
Parameters:
nLines: NUMERIC - Number of lines to page down.
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
321. GoLeft( lOffset, lRefresh )
Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Left offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
322. GoRight( lOffset, lRefresh )
Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).
Parameters:
lOffset: NUMERIC - Right offset.
lRefresh: LOGICAL - Refresh flag.
Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.
Usage Example: (Internal use only - method version for codeblock usage)
323. GoLeftMost()
Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
324. GoRightMost()
Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: None
Usage Example: (Internal use only - method version for codeblock usage)
325. GoFirstEditCol()
Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).
Parameters: None
Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.
Usage Example: (Internal use only - method version for codeblock usage)
]]>Code: Select all | Expand
You're right to ask about how these methods are related! The sheer number of methods in TXBrowse can be overwhelming, but they are designed to work together to provide a rich and functional browse control.
Let's break down how these methods are related by categorizing them based on their roles and interactions:
1. Lifecycle Management (Creation, Destruction, Initialization):
New() and Destroy(): These are the fundamental methods that control the lifespan of a TXBrowse object. New() creates an instance, setting up default properties and resources. Destroy() cleans up and releases those resources when the object is no longer needed.
Initiate( hDlg ): Called internally during the creation process. It sets up scrollbars, default colors, and initializes data-related codeblocks.
Adjust(): Crucially linked to data loading and display. It's called after data is set (via SetRDD, SetArray, etc.) to calculate sizes of rows, columns, headers, footers, and prepare the browse for rendering. It also triggers CheckSize() and CalcHdrHeight() to ensure correct layout.
CheckSize() & CalcHdrHeight() & CalcRowSelPos(): These are helper methods called by Adjust() and Refresh() to recalculate dimensions and positions based on data and style settings. They ensure the browse layout is consistent and correct after data or style changes.
Think of it like building a house: New() is like laying the foundation, Initiate() is like building the basic structure, Adjust() is like fitting windows and doors and ensuring everything is properly sized, and Destroy() is like demolishing the house when it's no longer needed.
2. Data Source Management (Setting and Resetting Data):
SetRDD(), SetArray(), SetoDbf(), SetExcelRange(), SetAdo(), SetTree(), SetColsForTree(), SetDolphin(), SetMySql(): These methods are the entry points for connecting the TXBrowse to different data sources. They are mutually exclusive – you'll use one of them depending on your data origin. They all ultimately trigger Adjust() after setting up the data connection to prepare the browse for display.
ResetData( uSrc, aCols ) & ResetBrowse(): Used to clear the existing data and columns and optionally load new data. ResetBrowse() is a more general reset, while ResetData() specifically handles switching data sources.
Analogy: These methods are like choosing the type of fuel and engine for your car (TXBrowse). You choose one (RDD, Array, etc.) to power the data display. ResetData is like changing the engine entirely, while ResetBrowse is more like just turning off the engine and clearing the dashboard.
3. Navigation Methods (Cursor Movement and Position):
GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), Skip(): These methods provide different ways to move the browse cursor through the data. They are all interconnected as different forms of navigation.
BookMark(), KeyNo(): These methods manage the bookmark and key number (scrollbar position) of the browse. They are often used in conjunction with navigation methods to remember or jump to specific positions.
GoFltRow(n), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(): These methods offer more specialized navigation, like moving to a specific filtered row or navigating horizontally.
Analogy: These are like the steering wheel, pedals, gear shift, and GPS of your car. They allow you to control where you are in the data (the road).
4. Selection Management (Row Selection and Multiselect):
Select( nOperation ), SelectAll(), SelectNone(), SelectRow( nOperation ), IsSelectedRow(): These methods are focused on row selection, especially in multi-select mode. Select() is the core method, with others being convenience wrappers.
SetMultiSelectCol( uCol, lFooter ): Enables multi-selection and links it to a specific column, triggering the use of the selection methods.
Analogy: These are like the car's seatbelt and door locks – features that manage how you interact with the car's contents (data).
5. Editing and Data Modification:
Edit(), EditSource(), EditBrowse(), EditDateTime(): These methods provide different ways to edit data, typically in modal dialogs or in-place (depending on column settings). Edit() acts as a dispatcher, choosing the appropriate editing method.
CancelEdit(): Cancels any ongoing edit operation.
Delete( lMsg ): Deletes the currently selected record.
SaveData( lRefresh ): Saves changes made during editing back to the data source.
ArrCellSet(), ArrCell(): Methods for direct manipulation of array data source cells.
Lock(), UnLock(): Methods for controlling data modification by locking/unlocking the browse.
Analogy: These are like the tools you use to repair or modify your car – wrenches, paintbrushes, etc. They allow you to change the data (car's components).
6. Display and Appearance Methods:
Display(), Paint(), Refresh( lComplete ), RefreshCurrent(), RefreshHeaders(), RefreshFooters(), DrawBorder(), DrawLine(), EraseData(), FullPaint(): These methods are responsible for rendering the browse control visually. Refresh() is the main method for redrawing, while others handle specific parts of the display or optimize refresh operations.
SetStyle(), SetDarkTheme(), SetFont(), FontSize(), SetRecSelBmp(), SetRecSelSl(), SetBackGround(), SetColor(), SetGroupHeader(), SetGroupTotal(), SetMultiSelectCol(), SetChecks(), SetProgBar(): These methods control the visual appearance of the browse, including styles, colors, fonts, bitmaps, and various display elements.
ShowMessage(), CloseMessage(): Methods for displaying and closing temporary message boxes within the browse.
DrawChart(), DrawChartInRect(), PaintBmpAndText(), PaintHeader(), PaintFooter(), PaintHDivider(), PaintVDivider(), PaintTopBar(), PaintCellBack(), PaintCell(), PaintCellBtn(), PaintCellImage(), PaintCellBarCode(): These are lower-level painting methods used internally by Paint() to draw specific elements of the browse, like headers, footers, cells, bitmaps, and various visual styles.
Analogy: These are like the paint job, interior design, and lights of your car – everything that makes it look and present information to the user.
7. Exporting Methods:
ToExcel(), ToXlsx(), ToCalc(), ToWord(), ToHTML(), ToCSV(), ToArray(), ClpRow(), Copy(): These methods provide ways to export the data displayed in the browse to various formats.
Analogy: These are like the car's ability to transport cargo – taking the data (cargo) and putting it in a different format (destination).
8. Event Handling Methods:
HandleEvent(), HandleGesture(), GesturePan(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), KeyDown(), KeyChar(), MouseLeave(), NcMouseMove(): These methods handle various Windows messages and events, allowing the TXBrowse to respond to user interactions (mouse clicks, keyboard input, scrolling, gestures) and system events.
Analogy: These are like the car's sensors and controls that respond to the driver's actions and the environment.
9. Utility/Helper Methods:
MakeBlock(), ArrCalcWidths(), CalcHdrHeight(), CalcRowSelPos(), Check_oSeek(), CheckSize(), ColStretch(), DestroyToolTip(), ColAtPos(), ColPos(), SelectedCol(), IsDisplayPosVisible(), LastDisplayPos(), GetDisplayCols(), GetDisplayColsWidth(), GetPaintCols(), Eval(), SafeEval(), BrwFitSize(), CancelEdit(), CheckSortCbx(), DelRepos(), DrawLine(), EraseData(), GetDlgCode(), HasBorder(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), HorzLine(), MouseAtHeader(), MouseAtFooter(), MouseColPos(), MouseRowPos(), EraseData(), KeyDown(), KeyChar(), HScroll(), VScroll(), VUpdatePos(), VUpdateAll(), VSetPos(), VThumbPos(), VGetPos(), VGetMax(), VGoDown(), VGoUp(), VGetThumbPos(), VGoBottom(), VGoTop(), GetDisplayCols(), GetVisibleCols(), GetDisplayColsWidth(), IsDisplayPosVisible(), LastDisplayPos(), BrwWidth(), GridWidth(), BrwHeight(), HeaderHeight(), FooterHeight(), CalcHdrHeight(), RowCount(), FirstRow(), LastRow(), FooterRow(), DataHeight(), BrwFitSize(), CancelEdit(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoFltRow(), SaveState(), RestoreState(), OldRestoreState(), Lock(), UnLock(), SaveData(), ShowSeek(), Seek(), Adjust(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(): A massive category of internal helper methods used for various tasks like calculations, drawing, size adjustments, event handling, and data manipulation. They are not typically called directly by users but are essential for the internal workings of TXBrowse.
Analogy: These are like the nuts, bolts, wires, and smaller components that make up the car's engine, chassis, and electrical system. They are essential for the car to function correctly, but you don't interact with them directly as a driver.
10. Accessor Methods (SET/GET for DATA members):
Many DATA members have associated ACCESS and ASSIGN methods (often INLINE) that provide controlled access to their values. For example, lSeekBar, lGetBar, l2007, lFlatStyle, l2000, lMultiSelect, lIncrSearch, BookMark, KeyNo, Skip, Bof, Eof, GoFltRow, SaveState, RestoreState, OldRestoreState, Lock, UnLock, SaveData, ShowSeek, Seek, Adjust, Check_oSeek, SetSortBmp, AutoFit, CheckSize, Resize, Change, MakeTotals, SaveTotals, ReCalcTotals, Eval, Report, ToWord, ToHTML, ToCSV, ToExcel, ToXlsx, ToCalc, ToArray, CurrentRow, AddBitmap, aBitmap, Initiate, Display, Paint, DrawBorder, CheckSortCbx, GetPaintCols, PaintHDivider, PaintVDivider, PaintHeader, PaintTopBar, PaintFooter, Refresh, CalcRowSelPos, DelRepos, KeyCount, BookMark, KeyNo, Skip, Bof, Eof, GoTop, GoBottom, GoUp, GoDown, PageUp, PageDown, GoLeft, GoRight, GoLeftMost, GoRightMost, GoFirstEditCol, HandleEvent, HandleGesture, GesturePan().
Analogy: These are like the car's gauges and controls on the dashboard. They allow you to monitor and adjust certain aspects of the car's behavior (browse control's properties).
Interrelationships in Action (Example Workflow):
Let's consider a user sorting a TXBrowse by clicking a header:
User Clicks Header: Mouse click event is captured by HandleEvent().
Header Click Detection: MouseAtHeader() determines the click is in the header area and identifies the clicked column.
Sorting Initiation: HeaderLButtonUp() is called for the clicked column (TxBrwColumn object).
SetOrder() is Called: The SetOrder() method of the TxBrwColumn is invoked, which:
Determines the sort order (ascending/descending).
Updates the cOrder DATA member of the column.
Calls the SetOrder() method of the TXBrowse class.
SetOrder() in TXBrowse Class:
Calls SortArrayData() (if array data source) or initiates SQL sorting (if RDD/SQLRDD).
Sets the lAutoSort flag to .T..
Sets the aSortBmp bitmaps to indicate sort order in header.
Refresh() is Called: Triggers a full refresh of the browse to reflect the sorted data.
Paint() is Called: Redraws the entire browse control, including the sorted data and sort indicator bitmaps in the header.
This example illustrates how various methods from different categories work together to handle a single user action. Many other workflows, like navigation, editing, and filtering, involve similar interactions between different sets of methods.
This detailed breakdown should provide a better understanding of how the numerous methods within the TXBrowse class are interconnected and contribute to its overall functionality. Let me know if you have any specific methods or categories you'd like to explore further!
]]>Code: Select all | Expand
You're right to ask about how these methods are related! The sheer number of methods in TXBrowse can be overwhelming, but they are designed to work together to provide a rich and functional browse control.
Let's break down how these methods are related by categorizing them based on their roles and interactions:
1. Lifecycle Management (Creation, Destruction, Initialization):
New() and Destroy(): These are the fundamental methods that control the lifespan of a TXBrowse object. New() creates an instance, setting up default properties and resources. Destroy() cleans up and releases those resources when the object is no longer needed.
Initiate( hDlg ): Called internally during the creation process. It sets up scrollbars, default colors, and initializes data-related codeblocks.
Adjust(): Crucially linked to data loading and display. It's called after data is set (via SetRDD, SetArray, etc.) to calculate sizes of rows, columns, headers, footers, and prepare the browse for rendering. It also triggers CheckSize() and CalcHdrHeight() to ensure correct layout.
CheckSize() & CalcHdrHeight() & CalcRowSelPos(): These are helper methods called by Adjust() and Refresh() to recalculate dimensions and positions based on data and style settings. They ensure the browse layout is consistent and correct after data or style changes.
Think of it like building a house: New() is like laying the foundation, Initiate() is like building the basic structure, Adjust() is like fitting windows and doors and ensuring everything is properly sized, and Destroy() is like demolishing the house when it's no longer needed.
2. Data Source Management (Setting and Resetting Data):
SetRDD(), SetArray(), SetoDbf(), SetExcelRange(), SetAdo(), SetTree(), SetColsForTree(), SetDolphin(), SetMySql(): These methods are the entry points for connecting the TXBrowse to different data sources. They are mutually exclusive – you'll use one of them depending on your data origin. They all ultimately trigger Adjust() after setting up the data connection to prepare the browse for display.
ResetData( uSrc, aCols ) & ResetBrowse(): Used to clear the existing data and columns and optionally load new data. ResetBrowse() is a more general reset, while ResetData() specifically handles switching data sources.
Analogy: These methods are like choosing the type of fuel and engine for your car (TXBrowse). You choose one (RDD, Array, etc.) to power the data display. ResetData is like changing the engine entirely, while ResetBrowse is more like just turning off the engine and clearing the dashboard.
3. Navigation Methods (Cursor Movement and Position):
GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), Skip(): These methods provide different ways to move the browse cursor through the data. They are all interconnected as different forms of navigation.
BookMark(), KeyNo(): These methods manage the bookmark and key number (scrollbar position) of the browse. They are often used in conjunction with navigation methods to remember or jump to specific positions.
GoFltRow(n), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(): These methods offer more specialized navigation, like moving to a specific filtered row or navigating horizontally.
Analogy: These are like the steering wheel, pedals, gear shift, and GPS of your car. They allow you to control where you are in the data (the road).
4. Selection Management (Row Selection and Multiselect):
Select( nOperation ), SelectAll(), SelectNone(), SelectRow( nOperation ), IsSelectedRow(): These methods are focused on row selection, especially in multi-select mode. Select() is the core method, with others being convenience wrappers.
SetMultiSelectCol( uCol, lFooter ): Enables multi-selection and links it to a specific column, triggering the use of the selection methods.
Analogy: These are like the car's seatbelt and door locks – features that manage how you interact with the car's contents (data).
5. Editing and Data Modification:
Edit(), EditSource(), EditBrowse(), EditDateTime(): These methods provide different ways to edit data, typically in modal dialogs or in-place (depending on column settings). Edit() acts as a dispatcher, choosing the appropriate editing method.
CancelEdit(): Cancels any ongoing edit operation.
Delete( lMsg ): Deletes the currently selected record.
SaveData( lRefresh ): Saves changes made during editing back to the data source.
ArrCellSet(), ArrCell(): Methods for direct manipulation of array data source cells.
Lock(), UnLock(): Methods for controlling data modification by locking/unlocking the browse.
Analogy: These are like the tools you use to repair or modify your car – wrenches, paintbrushes, etc. They allow you to change the data (car's components).
6. Display and Appearance Methods:
Display(), Paint(), Refresh( lComplete ), RefreshCurrent(), RefreshHeaders(), RefreshFooters(), DrawBorder(), DrawLine(), EraseData(), FullPaint(): These methods are responsible for rendering the browse control visually. Refresh() is the main method for redrawing, while others handle specific parts of the display or optimize refresh operations.
SetStyle(), SetDarkTheme(), SetFont(), FontSize(), SetRecSelBmp(), SetRecSelSl(), SetBackGround(), SetColor(), SetGroupHeader(), SetGroupTotal(), SetMultiSelectCol(), SetChecks(), SetProgBar(): These methods control the visual appearance of the browse, including styles, colors, fonts, bitmaps, and various display elements.
ShowMessage(), CloseMessage(): Methods for displaying and closing temporary message boxes within the browse.
DrawChart(), DrawChartInRect(), PaintBmpAndText(), PaintHeader(), PaintFooter(), PaintHDivider(), PaintVDivider(), PaintTopBar(), PaintCellBack(), PaintCell(), PaintCellBtn(), PaintCellImage(), PaintCellBarCode(): These are lower-level painting methods used internally by Paint() to draw specific elements of the browse, like headers, footers, cells, bitmaps, and various visual styles.
Analogy: These are like the paint job, interior design, and lights of your car – everything that makes it look and present information to the user.
7. Exporting Methods:
ToExcel(), ToXlsx(), ToCalc(), ToWord(), ToHTML(), ToCSV(), ToArray(), ClpRow(), Copy(): These methods provide ways to export the data displayed in the browse to various formats.
Analogy: These are like the car's ability to transport cargo – taking the data (cargo) and putting it in a different format (destination).
8. Event Handling Methods:
HandleEvent(), HandleGesture(), GesturePan(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), KeyDown(), KeyChar(), MouseLeave(), NcMouseMove(): These methods handle various Windows messages and events, allowing the TXBrowse to respond to user interactions (mouse clicks, keyboard input, scrolling, gestures) and system events.
Analogy: These are like the car's sensors and controls that respond to the driver's actions and the environment.
9. Utility/Helper Methods:
MakeBlock(), ArrCalcWidths(), CalcHdrHeight(), CalcRowSelPos(), Check_oSeek(), CheckSize(), ColStretch(), DestroyToolTip(), ColAtPos(), ColPos(), SelectedCol(), IsDisplayPosVisible(), LastDisplayPos(), GetDisplayCols(), GetDisplayColsWidth(), GetPaintCols(), Eval(), SafeEval(), BrwFitSize(), CancelEdit(), CheckSortCbx(), DelRepos(), DrawLine(), EraseData(), GetDlgCode(), HasBorder(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), HorzLine(), MouseAtHeader(), MouseAtFooter(), MouseColPos(), MouseRowPos(), EraseData(), KeyDown(), KeyChar(), HScroll(), VScroll(), VUpdatePos(), VUpdateAll(), VSetPos(), VThumbPos(), VGetPos(), VGetMax(), VGoDown(), VGoUp(), VGetThumbPos(), VGoBottom(), VGoTop(), GetDisplayCols(), GetVisibleCols(), GetDisplayColsWidth(), IsDisplayPosVisible(), LastDisplayPos(), BrwWidth(), GridWidth(), BrwHeight(), HeaderHeight(), FooterHeight(), CalcHdrHeight(), RowCount(), FirstRow(), LastRow(), FooterRow(), DataHeight(), BrwFitSize(), CancelEdit(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoFltRow(), SaveState(), RestoreState(), OldRestoreState(), Lock(), UnLock(), SaveData(), ShowSeek(), Seek(), Adjust(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(): A massive category of internal helper methods used for various tasks like calculations, drawing, size adjustments, event handling, and data manipulation. They are not typically called directly by users but are essential for the internal workings of TXBrowse.
Analogy: These are like the nuts, bolts, wires, and smaller components that make up the car's engine, chassis, and electrical system. They are essential for the car to function correctly, but you don't interact with them directly as a driver.
10. Accessor Methods (SET/GET for DATA members):
Many DATA members have associated ACCESS and ASSIGN methods (often INLINE) that provide controlled access to their values. For example, lSeekBar, lGetBar, l2007, lFlatStyle, l2000, lMultiSelect, lIncrSearch, BookMark, KeyNo, Skip, Bof, Eof, GoFltRow, SaveState, RestoreState, OldRestoreState, Lock, UnLock, SaveData, ShowSeek, Seek, Adjust, Check_oSeek, SetSortBmp, AutoFit, CheckSize, Resize, Change, MakeTotals, SaveTotals, ReCalcTotals, Eval, Report, ToWord, ToHTML, ToCSV, ToExcel, ToXlsx, ToCalc, ToArray, CurrentRow, AddBitmap, aBitmap, Initiate, Display, Paint, DrawBorder, CheckSortCbx, GetPaintCols, PaintHDivider, PaintVDivider, PaintHeader, PaintTopBar, PaintFooter, Refresh, CalcRowSelPos, DelRepos, KeyCount, BookMark, KeyNo, Skip, Bof, Eof, GoTop, GoBottom, GoUp, GoDown, PageUp, PageDown, GoLeft, GoRight, GoLeftMost, GoRightMost, GoFirstEditCol, HandleEvent, HandleGesture, GesturePan().
Analogy: These are like the car's gauges and controls on the dashboard. They allow you to monitor and adjust certain aspects of the car's behavior (browse control's properties).
Interrelationships in Action (Example Workflow):
Let's consider a user sorting a TXBrowse by clicking a header:
User Clicks Header: Mouse click event is captured by HandleEvent().
Header Click Detection: MouseAtHeader() determines the click is in the header area and identifies the clicked column.
Sorting Initiation: HeaderLButtonUp() is called for the clicked column (TxBrwColumn object).
SetOrder() is Called: The SetOrder() method of the TxBrwColumn is invoked, which:
Determines the sort order (ascending/descending).
Updates the cOrder DATA member of the column.
Calls the SetOrder() method of the TXBrowse class.
SetOrder() in TXBrowse Class:
Calls SortArrayData() (if array data source) or initiates SQL sorting (if RDD/SQLRDD).
Sets the lAutoSort flag to .T..
Sets the aSortBmp bitmaps to indicate sort order in header.
Refresh() is Called: Triggers a full refresh of the browse to reflect the sorted data.
Paint() is Called: Redraws the entire browse control, including the sorted data and sort indicator bitmaps in the header.
This example illustrates how various methods from different categories work together to handle a single user action. Many other workflows, like navigation, editing, and filtering, involve similar interactions between different sets of methods.
This detailed breakdown should provide a better understanding of how the numerous methods within the TXBrowse class are interconnected and contribute to its overall functionality. Let me know if you have any specific methods or categories you'd like to explore further!
]]>Code: Select all | Expand
Get-ChildItem -Path c:\www\htdocs\fwforum\data\forumsext\POST_TEXT_memo -Recurse -Filter *.txt | Select-String -Pattern "My program creates a PDF" | ForEach-Object { $_.Path } | Out-File -FilePath "search_results.txt" -Encoding ASCII
Code: Select all | Expand
Get-ChildItem -Path c:\www\htdocs\fwforum\data\forumsext\POST_TEXT_memo -Recurse -Filter *.txt | Select-String -Pattern "My program creates a PDF" | ForEach-Object { $_.Path } | Out-File -FilePath "search_results.txt" -Encoding ASCII
Code: Select all | Expand
// The example shows two approaches for building a custom index.
// In the first approach, the controlling index is a regular index
// which allows for relative database navigation. The second approach
// uses the custome index as controlling index and requires absolute
// database navigation. The first five logical records and physical records
// are added to the custome index.
REQUEST Dbfcdx
PROCEDURE Main
USE Customer VIA "DBFCDX"
INDEX ON Upper(LastName+FirstName) TAG NAME TO Cust01
INDEX ON Upper(LastName+FirstName) TAG NAMESET TO Cust01t CUSTOM
// relative navigation with non-custom index
OrdSetFocus( "NAME" )
GO TOP
FOR i:=1 TO 5
OrdKeyAdd( "NAMESET" )
SKIP
NEXT
GO TOP
Browse()
// absolute navigation with custom index
OrdSetFocus( "NAMESET" )
FOR i:=1 TO 5
DbGoto( i )
OrdKeyAdd( "NAMESET" )
NEXT
GO TOP
Browse()
USE
RETURN
]]>OrdKeyAdd()
Adds an index key to a custom built index.
Syntax
OrdKeyAdd( [<nOrder>|<cIndexName>], ;
[<cIndexFile>] , ;
[<xIndexValue>] ) --> lSuccess
Arguments
<nOrder>
A numeric value specifying the ordinal position of the custom index open in a work area. Indexes are numbered in the sequence of opening, beginning with 1. The value zero identifies the controlling index.
<cIndexName>
Alternatively, a character string holding the symbolic name of the open custom index can be passed. It is analogous to the alias name of a work area. Support for <cIndexName> depends on the RDD used to open the index. Usually, RDDs that are able to maintain multiple indexes in one index file support symbolic index names, such as DBFCDX, for example.
<cIndexFile>
<cIndexFile> is a character string with the name of the file that stores the custom index. It is only required when multiple index files are open that contain indexes having the same <cIndexName>.
<xIndexValue>
This is the index value to be added to the index for the current record. It must be of the same data type as the value returned by the index expression. If omitted, <xIndexValue> is obtained by evaluating the index expression with the data of the current record. Return
The function returns .T. (true) if the current record is successfully included in the index, otherwise .F. (false) is returned.
Description
OrdKeyAdd() is used to build a custom index whose entries are programmatically added and deleted. Custom built indexes are not automatically updated by the RDD but are initially empty. OrdKeyAdd() adds the current record to the custom index and OrdKeyDel() removes it. It is possible to add multiple index values to the index for the same record, so that the same record is found when different search values are passed to DbSeek().
If no parameters are passed, OrdKeyAdd() evaluates the index expresssion with the data of the current record to obtain <xIndexValue>. The record is added to the index when it matches the FOR condition and scoping restrictions, if they are defined. When <xIndexValue> is specified, it must have the same data type as the value of the expression &(OrdKey()).
OrdKeyAdd() fails if the record pointer is positioned on Eof(), if the specified index is not a custom index, or if the specified index does not exist.
This is important when the custom index is the controlling index. Since a custome index is initially empty, relative database navigation with SKIP positions the record pointer always at Eof(). To include records to a controlling custom index, they must be physically navigated to using DbGoto().
The recommended way of creating a custom index is to use a non-custom index as the controlling index, skip through the database and specify <cIndexName> for OrdListAdd() when the current record meets the conditions for being included in the custom index.
Code: Select all | Expand
// The example shows two approaches for building a custom index.
// In the first approach, the controlling index is a regular index
// which allows for relative database navigation. The second approach
// uses the custome index as controlling index and requires absolute
// database navigation. The first five logical records and physical records
// are added to the custome index.
REQUEST Dbfcdx
PROCEDURE Main
USE Customer VIA "DBFCDX"
INDEX ON Upper(LastName+FirstName) TAG NAME TO Cust01
INDEX ON Upper(LastName+FirstName) TAG NAMESET TO Cust01t CUSTOM
// relative navigation with non-custom index
OrdSetFocus( "NAME" )
GO TOP
FOR i:=1 TO 5
OrdKeyAdd( "NAMESET" )
SKIP
NEXT
GO TOP
Browse()
// absolute navigation with custom index
OrdSetFocus( "NAMESET" )
FOR i:=1 TO 5
DbGoto( i )
OrdKeyAdd( "NAMESET" )
NEXT
GO TOP
Browse()
USE
RETURN
]]>OrdKeyAdd()
Adds an index key to a custom built index.
Syntax
OrdKeyAdd( [<nOrder>|<cIndexName>], ;
[<cIndexFile>] , ;
[<xIndexValue>] ) --> lSuccess
Arguments
<nOrder>
A numeric value specifying the ordinal position of the custom index open in a work area. Indexes are numbered in the sequence of opening, beginning with 1. The value zero identifies the controlling index.
<cIndexName>
Alternatively, a character string holding the symbolic name of the open custom index can be passed. It is analogous to the alias name of a work area. Support for <cIndexName> depends on the RDD used to open the index. Usually, RDDs that are able to maintain multiple indexes in one index file support symbolic index names, such as DBFCDX, for example.
<cIndexFile>
<cIndexFile> is a character string with the name of the file that stores the custom index. It is only required when multiple index files are open that contain indexes having the same <cIndexName>.
<xIndexValue>
This is the index value to be added to the index for the current record. It must be of the same data type as the value returned by the index expression. If omitted, <xIndexValue> is obtained by evaluating the index expression with the data of the current record. Return
The function returns .T. (true) if the current record is successfully included in the index, otherwise .F. (false) is returned.
Description
OrdKeyAdd() is used to build a custom index whose entries are programmatically added and deleted. Custom built indexes are not automatically updated by the RDD but are initially empty. OrdKeyAdd() adds the current record to the custom index and OrdKeyDel() removes it. It is possible to add multiple index values to the index for the same record, so that the same record is found when different search values are passed to DbSeek().
If no parameters are passed, OrdKeyAdd() evaluates the index expresssion with the data of the current record to obtain <xIndexValue>. The record is added to the index when it matches the FOR condition and scoping restrictions, if they are defined. When <xIndexValue> is specified, it must have the same data type as the value of the expression &(OrdKey()).
OrdKeyAdd() fails if the record pointer is positioned on Eof(), if the specified index is not a custom index, or if the specified index does not exist.
This is important when the custom index is the controlling index. Since a custome index is initially empty, relative database navigation with SKIP positions the record pointer always at Eof(). To include records to a controlling custom index, they must be physically navigated to using DbGoto().
The recommended way of creating a custom index is to use a non-custom index as the controlling index, skip through the database and specify <cIndexName> for OrdListAdd() when the current record meets the conditions for being included in the custom index.
Code: Select all | Expand
#include "fivewin.ch"
REQUEST DBFCDX
REQUEST DBFFPT
static nCount := 0
function main
local cDBF_Dir := ".\dataTest\pages"
local cDBF_file_noPath := "c:\fwh\samples\DataTest"
local cDBF_file_memo := ""
local cDBF_fil_new := "PAGES_NEW"
local aStruc := {}
local cTmpDbf := ""
local cSrc := "c:\forumposts\forums.dbf" // "c:\fwh\samples\DataTest\PAGES.DBF"
local cDst := "c:\forumposts\forumsext.dbf" // "c:\fwh\samples\DataTest\PAGESext.dbf"
local cTempMatchcode := ""
local aFeld := {}
local aField := {}
local nField
local cFieldSubdir
local cDBF_memofiles := ""
use (cSrc) new
aStruc := DBStruct()
use
//cFilePath( cSrc ) // returns path of a filename
//cFileNoExt( cSrc ) // returns the filename without ext
cDBF_memofiles := cFilePath( cSrc ) + cFileNoExt( cSrc ) + "ext"
IF lisdir(cDBF_memofiles) = .f.
lmkdir(cDBF_memofiles)
ENDIF
// Adjust structure: Replace memo fields with character fields of length 50 and add prefix M_
FOR EACH aField IN aStruc
IF aField[2] == "M"
aField[1] := "M_" + aField[1] // Add prefix M_
aField[2] := "C"
aField[3] := 50
ENDIF
NEXT
if file(cDst) = .F.
DbCreate(cDst, aStruc)
endif
use
use(cDst) new ALIAS neuedbf
use(cSrc) new ALIAS altedbf
select altedbf
do while .not. eof()
aFeld := getrec()
// Export memo fields to txt files and save the file name in the character field
FOR nField := 1 TO fcount()
IF fieldType(nField) == "M"
cFieldSubdir := cDBF_memofiles + "\" + fieldName(nField) + "_memo"
// Create subdirectory for the memo field if not existing
IF lisdir(cFieldSubdir) = .f.
lmkdir(cFieldSubdir)
ENDIF
nCount += 1
cTempMatchcode := alltrim(str(recno())) + "-" + ShortUniqueIDNUM() + ALLTRIM( STR(nCount) )
MEMOWRIT(cFieldSubdir + "\" + cTempMatchcode + ".txt", fieldGet(nField), .F. )
aFeld[nField] := cTempMatchcode
ENDIF
NEXT
select neuedbf
APPEND_BLANK()
saverec(aFeld)
select altedbf
skip
enddo
? "Ende"
return
INIT PROCEDURE PrgInit
SET CENTURY ON
SET EPOCH TO YEAR(DATE())-98
SET DELETED ON
SET EXCLUSIVE OFF
REQUEST HB_Lang_DE
HB_LangSelect("DE")
SET DATE TO GERMAN
rddsetdefault("DBFCDX")
EXTERN DESCEND
RETURN
//----------------------------------------------------------------------------//
FUNCTION ShortUniqueIDNUM()
local cUniqueIDNUM := substr(dtos(date()),3) + "_" +;
substr(time(),1,2) + ;
substr(time(),4,2) + ;
substr(time(),7,2)
return (cUniqueIDNUM)
//----------------------------------------------------------------------------//
FUNCTION RLOK
if rlock()
RETURN ""
endif
DO WHILE .T.
if rlock()
exit
else
MsgInfo("Infobox","Datensatz gesperrt!")
endif
INKEY(.01)
ENDDO
RETURN ""
FUNCTION FLOK
if flock()
RETURN ""
endif
DO WHILE .T.
if flock()
exit
else
MsgInfo("Infobox","Datensatz gesperrt!")
endif
INKEY(.01)
ENDDO
RETURN ""
//----------------------------------------------------------------------------//
FUNCTION APPEND_BLANK
APPEND BLANK
DO WHILE NETERR()
APPEND BLANK
INKEY(.1)
ENDDO
unlock
rlok()
RETURN ""
//----------------------------------------------------------------------------//
FUNCTION unlok
unlock
RETURN (NIL)
//----------------------------------------------------------------------------//
FUNCTION net_use(vcFile,vlExclus,vnWait,vcAlias)
* tries to open a file for exclusive or shared use
*
* Syntax: NET_USE(expC1,expL1,expN1,expC2)
* where: expC1 = database to use, character string
* expL1 = .T. to use file exclusively, .F. for multi-user
* expN1 = seconds to wait if file isnt opened (0=forever), if >0,
* the calling routine must be constructed to handle cases
* where the file is not opened!
* expC2 = data driver
*
local forever := (vnWait=0)
*
do while (forever .or. vnWait>0)
if vlExclus && exclusive
use (vcFile) exclusive new
else
use (vcFile) shared new
endif
if .not. neterr() && USE succeeds
RETURN (.T.)
endif
*
inkey(1) && wait 1 second
vnWait--
ENDDO
RETURN (.F.) && database opening unsuccessful!
//----------------------------------------------------------------------------//
FUNCTION getRec()
local ary := {}
local nFcnt, nFnum
nFcnt = fcount()
FOR nFnum = 1 to nFcnt
aAdd(ary, fieldGet(nFnum))
NEXT
RETURN (ary)
//----------------------------------------------------------------------------//
FUNCTION saveRec(ary)
local nFcnt, nFnum
nFcnt = fcount()
FOR nFnum = 1 to nFcnt
fieldPut(nFnum, ary[nFnum])
NEXT
RETURN (NIL)
//----------------------------------------------------------------------------//
Code: Select all | Expand
# Pfade zu den zu durchsuchenden Verzeichnissen
$verzeichnisse = @(
"C:\www\htdocs\fwforum\data\forumsext\Dir1",
"C:\www\htdocs\fwforum\data\forumsext\Dir2",
"C:\www\htdocs\fwforum\data\forumsext\Dir3",
"C:\www\htdocs\fwforum\data\forumsext\Dir4",
"C:\www\htdocs\fwforum\data\forumsext\Dir5",
"C:\www\htdocs\fwforum\data\forumsext\Dir6",
"C:\www\htdocs\fwforum\data\forumsext\Dir7",
"C:\www\htdocs\fwforum\data\forumsext\Dir8"
)
# Pfad zur Indexdatei
$indexFile = "C:\suchergebnis\index.txt"
# Ergebnisverzeichnis sicherstellen
$ergebnisVerzeichnis = "C:\suchergebnis"
if (-not (Test-Path -Path $ergebnisVerzeichnis)) {
New-Item -ItemType Directory -Path $ergebnisVerzeichnis | Out-Null
}
# Indexdatei initialisieren (leeren oder erstellen)
if (Test-Path $indexFile) {
Clear-Content $indexFile
} else {
New-Item -Path $indexFile -ItemType File | Out-Null
}
# Funktion zur Indexerstellung
function Build-Index {
param (
[string[]]$Directories,
[string]$IndexPath
)
foreach ($dir in $Directories) {
Write-Host "Indexiere Verzeichnis: $dir" -ForegroundColor Green
# Alle .prg und .txt Dateien durchsuchen
$files = Get-ChildItem -Path $dir -Recurse -Include *.prg, *.txt -File
foreach ($file in $files) {
Write-Host " Verarbeite Datei: $($file.FullName)" -ForegroundColor Yellow
try {
# Dateiinhalt lesen
$content = Get-Content -Path $file.FullName -Raw
# Tokenisierung: Wörter extrahieren (nur alphanumerische Zeichen)
$words = $content -split '\W+' | Where-Object { $_ -match '\w+' } | ForEach-Object { $_.ToLower() }
# Einzigartige Wörter
$uniqueWords = $words | Sort-Object -Unique
foreach ($word in $uniqueWords) {
# Indexzeile: Wort<TAB>Dateipfad
"$word`t$($file.FullName)" | Out-File -FilePath $IndexPath -Append -Encoding ASCII
}
}
catch {
Write-Host " Fehler beim Verarbeiten von $($file.FullName): $_" -ForegroundColor Red
}
}
}
Write-Host "Indexierung abgeschlossen." -ForegroundColor Green
}
# Funktion zur Suche im Index
function Search-Index {
param (
[string]$SearchTerm,
[string]$IndexPath
)
$searchTerm = $SearchTerm.ToLower()
Write-Host "Suche nach: '$searchTerm'" -ForegroundColor Cyan
# Suche nach dem Wort am Anfang der Zeile (um genaue Übereinstimmung zu gewährleisten)
$pattern = "^$searchTerm`t"
$results = Select-String -Path $IndexPath -Pattern $pattern | ForEach-Object { $_.Line.Split("`t")[1] }
# Ausgabe der gefundenen Dateien
if ($results) {
Write-Host "Gefundene Dateien:" -ForegroundColor Green
$results | Sort-Object -Unique | ForEach-Object { Write-Host $_ }
}
else {
Write-Host "Keine Treffer gefunden." -ForegroundColor Yellow
}
return $results
}
# Zeitmessung starten
$startzeit = Get-Date
# Index erstellen
Build-Index -Directories $verzeichnisse -IndexPath $indexFile
# Zeitmessung beenden
$endzeit = Get-Date
$dauer = $endzeit - $startzeit
# Dauer anzeigen
Write-Host "Indexierungsdauer: $($dauer.TotalSeconds) Sekunden" -ForegroundColor Cyan
# Größe der Indexdatei messen
$indexSize = (Get-Item $indexFile).Length
Write-Host "Größe der Indexdatei: $indexSize Bytes" -ForegroundColor Cyan
# Beispielhafte Suchanfrage
$searchBegriff = "volltxtSearch"
$gefunden = Search-Index -SearchTerm $searchBegriff -IndexPath $indexFile
# Größe der Originaldateien messen
$originalSize = ($verzeichnisse | ForEach-Object {
Get-ChildItem -Path $_ -Recurse -Include *.prg, *.txt -File | Measure-Object -Property Length -Sum
}).Sum
Write-Host "Gesamtgröße der Originaldateien: $originalSize Bytes" -ForegroundColor Cyan
# Vergleich der Größen
$sizeRatio = [math]::Round(($indexSize / $originalSize) * 100, 2)
Write-Host "Indexgröße als Prozentsatz der Originaldateien: $sizeRatio%" -ForegroundColor Cyan
Code: Select all | Expand
#include "fivewin.ch"
REQUEST DBFCDX
REQUEST DBFFPT
static nCount := 0
function main
local cDBF_Dir := ".\dataTest\pages"
local cDBF_file_noPath := "c:\fwh\samples\DataTest"
local cDBF_file_memo := ""
local cDBF_fil_new := "PAGES_NEW"
local aStruc := {}
local cTmpDbf := ""
local cSrc := "c:\forumposts\forums.dbf" // "c:\fwh\samples\DataTest\PAGES.DBF"
local cDst := "c:\forumposts\forumsext.dbf" // "c:\fwh\samples\DataTest\PAGESext.dbf"
local cTempMatchcode := ""
local aFeld := {}
local aField := {}
local nField
local cFieldSubdir
local cDBF_memofiles := ""
use (cSrc) new
aStruc := DBStruct()
use
//cFilePath( cSrc ) // returns path of a filename
//cFileNoExt( cSrc ) // returns the filename without ext
cDBF_memofiles := cFilePath( cSrc ) + cFileNoExt( cSrc ) + "ext"
IF lisdir(cDBF_memofiles) = .f.
lmkdir(cDBF_memofiles)
ENDIF
// Adjust structure: Replace memo fields with character fields of length 50 and add prefix M_
FOR EACH aField IN aStruc
IF aField[2] == "M"
aField[1] := "M_" + aField[1] // Add prefix M_
aField[2] := "C"
aField[3] := 50
ENDIF
NEXT
if file(cDst) = .F.
DbCreate(cDst, aStruc)
endif
use
use(cDst) new ALIAS neuedbf
use(cSrc) new ALIAS altedbf
select altedbf
do while .not. eof()
aFeld := getrec()
// Export memo fields to txt files and save the file name in the character field
FOR nField := 1 TO fcount()
IF fieldType(nField) == "M"
cFieldSubdir := cDBF_memofiles + "\" + fieldName(nField) + "_memo"
// Create subdirectory for the memo field if not existing
IF lisdir(cFieldSubdir) = .f.
lmkdir(cFieldSubdir)
ENDIF
nCount += 1
cTempMatchcode := alltrim(str(recno())) + "-" + ShortUniqueIDNUM() + ALLTRIM( STR(nCount) )
MEMOWRIT(cFieldSubdir + "\" + cTempMatchcode + ".txt", fieldGet(nField), .F. )
aFeld[nField] := cTempMatchcode
ENDIF
NEXT
select neuedbf
APPEND_BLANK()
saverec(aFeld)
select altedbf
skip
enddo
? "Ende"
return
INIT PROCEDURE PrgInit
SET CENTURY ON
SET EPOCH TO YEAR(DATE())-98
SET DELETED ON
SET EXCLUSIVE OFF
REQUEST HB_Lang_DE
HB_LangSelect("DE")
SET DATE TO GERMAN
rddsetdefault("DBFCDX")
EXTERN DESCEND
RETURN
//----------------------------------------------------------------------------//
FUNCTION ShortUniqueIDNUM()
local cUniqueIDNUM := substr(dtos(date()),3) + "_" +;
substr(time(),1,2) + ;
substr(time(),4,2) + ;
substr(time(),7,2)
return (cUniqueIDNUM)
//----------------------------------------------------------------------------//
FUNCTION RLOK
if rlock()
RETURN ""
endif
DO WHILE .T.
if rlock()
exit
else
MsgInfo("Infobox","Datensatz gesperrt!")
endif
INKEY(.01)
ENDDO
RETURN ""
FUNCTION FLOK
if flock()
RETURN ""
endif
DO WHILE .T.
if flock()
exit
else
MsgInfo("Infobox","Datensatz gesperrt!")
endif
INKEY(.01)
ENDDO
RETURN ""
//----------------------------------------------------------------------------//
FUNCTION APPEND_BLANK
APPEND BLANK
DO WHILE NETERR()
APPEND BLANK
INKEY(.1)
ENDDO
unlock
rlok()
RETURN ""
//----------------------------------------------------------------------------//
FUNCTION unlok
unlock
RETURN (NIL)
//----------------------------------------------------------------------------//
FUNCTION net_use(vcFile,vlExclus,vnWait,vcAlias)
* tries to open a file for exclusive or shared use
*
* Syntax: NET_USE(expC1,expL1,expN1,expC2)
* where: expC1 = database to use, character string
* expL1 = .T. to use file exclusively, .F. for multi-user
* expN1 = seconds to wait if file isnt opened (0=forever), if >0,
* the calling routine must be constructed to handle cases
* where the file is not opened!
* expC2 = data driver
*
local forever := (vnWait=0)
*
do while (forever .or. vnWait>0)
if vlExclus && exclusive
use (vcFile) exclusive new
else
use (vcFile) shared new
endif
if .not. neterr() && USE succeeds
RETURN (.T.)
endif
*
inkey(1) && wait 1 second
vnWait--
ENDDO
RETURN (.F.) && database opening unsuccessful!
//----------------------------------------------------------------------------//
FUNCTION getRec()
local ary := {}
local nFcnt, nFnum
nFcnt = fcount()
FOR nFnum = 1 to nFcnt
aAdd(ary, fieldGet(nFnum))
NEXT
RETURN (ary)
//----------------------------------------------------------------------------//
FUNCTION saveRec(ary)
local nFcnt, nFnum
nFcnt = fcount()
FOR nFnum = 1 to nFcnt
fieldPut(nFnum, ary[nFnum])
NEXT
RETURN (NIL)
//----------------------------------------------------------------------------//
Code: Select all | Expand
# Pfade zu den zu durchsuchenden Verzeichnissen
$verzeichnisse = @(
"C:\www\htdocs\fwforum\data\forumsext\Dir1",
"C:\www\htdocs\fwforum\data\forumsext\Dir2",
"C:\www\htdocs\fwforum\data\forumsext\Dir3",
"C:\www\htdocs\fwforum\data\forumsext\Dir4",
"C:\www\htdocs\fwforum\data\forumsext\Dir5",
"C:\www\htdocs\fwforum\data\forumsext\Dir6",
"C:\www\htdocs\fwforum\data\forumsext\Dir7",
"C:\www\htdocs\fwforum\data\forumsext\Dir8"
)
# Pfad zur Indexdatei
$indexFile = "C:\suchergebnis\index.txt"
# Ergebnisverzeichnis sicherstellen
$ergebnisVerzeichnis = "C:\suchergebnis"
if (-not (Test-Path -Path $ergebnisVerzeichnis)) {
New-Item -ItemType Directory -Path $ergebnisVerzeichnis | Out-Null
}
# Indexdatei initialisieren (leeren oder erstellen)
if (Test-Path $indexFile) {
Clear-Content $indexFile
} else {
New-Item -Path $indexFile -ItemType File | Out-Null
}
# Funktion zur Indexerstellung
function Build-Index {
param (
[string[]]$Directories,
[string]$IndexPath
)
foreach ($dir in $Directories) {
Write-Host "Indexiere Verzeichnis: $dir" -ForegroundColor Green
# Alle .prg und .txt Dateien durchsuchen
$files = Get-ChildItem -Path $dir -Recurse -Include *.prg, *.txt -File
foreach ($file in $files) {
Write-Host " Verarbeite Datei: $($file.FullName)" -ForegroundColor Yellow
try {
# Dateiinhalt lesen
$content = Get-Content -Path $file.FullName -Raw
# Tokenisierung: Wörter extrahieren (nur alphanumerische Zeichen)
$words = $content -split '\W+' | Where-Object { $_ -match '\w+' } | ForEach-Object { $_.ToLower() }
# Einzigartige Wörter
$uniqueWords = $words | Sort-Object -Unique
foreach ($word in $uniqueWords) {
# Indexzeile: Wort<TAB>Dateipfad
"$word`t$($file.FullName)" | Out-File -FilePath $IndexPath -Append -Encoding ASCII
}
}
catch {
Write-Host " Fehler beim Verarbeiten von $($file.FullName): $_" -ForegroundColor Red
}
}
}
Write-Host "Indexierung abgeschlossen." -ForegroundColor Green
}
# Funktion zur Suche im Index
function Search-Index {
param (
[string]$SearchTerm,
[string]$IndexPath
)
$searchTerm = $SearchTerm.ToLower()
Write-Host "Suche nach: '$searchTerm'" -ForegroundColor Cyan
# Suche nach dem Wort am Anfang der Zeile (um genaue Übereinstimmung zu gewährleisten)
$pattern = "^$searchTerm`t"
$results = Select-String -Path $IndexPath -Pattern $pattern | ForEach-Object { $_.Line.Split("`t")[1] }
# Ausgabe der gefundenen Dateien
if ($results) {
Write-Host "Gefundene Dateien:" -ForegroundColor Green
$results | Sort-Object -Unique | ForEach-Object { Write-Host $_ }
}
else {
Write-Host "Keine Treffer gefunden." -ForegroundColor Yellow
}
return $results
}
# Zeitmessung starten
$startzeit = Get-Date
# Index erstellen
Build-Index -Directories $verzeichnisse -IndexPath $indexFile
# Zeitmessung beenden
$endzeit = Get-Date
$dauer = $endzeit - $startzeit
# Dauer anzeigen
Write-Host "Indexierungsdauer: $($dauer.TotalSeconds) Sekunden" -ForegroundColor Cyan
# Größe der Indexdatei messen
$indexSize = (Get-Item $indexFile).Length
Write-Host "Größe der Indexdatei: $indexSize Bytes" -ForegroundColor Cyan
# Beispielhafte Suchanfrage
$searchBegriff = "volltxtSearch"
$gefunden = Search-Index -SearchTerm $searchBegriff -IndexPath $indexFile
# Größe der Originaldateien messen
$originalSize = ($verzeichnisse | ForEach-Object {
Get-ChildItem -Path $_ -Recurse -Include *.prg, *.txt -File | Measure-Object -Property Length -Sum
}).Sum
Write-Host "Gesamtgröße der Originaldateien: $originalSize Bytes" -ForegroundColor Cyan
# Vergleich der Größen
$sizeRatio = [math]::Round(($indexSize / $originalSize) * 100, 2)
Write-Host "Indexgröße als Prozentsatz der Originaldateien: $sizeRatio%" -ForegroundColor Cyan
Code: Select all | Expand
cNombre := "SARAH"
fast_filter( "*"+ alltrim( cNombre ) + "?", 4, 22, 28 )
Browse()
Ahora, ya estaría el filtro activado basado en subindices.
/*
Sustituto de SET FILTER
cExpr
Expresion a buscar que forme parte del indice, podemos
poner *Texto? , para buscar palabra que forme parte
nOrder
Sobre que indice activo vamos a recorrer la lista.
Por defecto es el indice activo.
nRow, nCol
Posicion fila,columna para mostrar progreso. Se ejecuta en
un hilo aparte
Return: Indice anterior
*/
function fast_filter( cExpr, nOrder, nRow, nCol )
local PantaAnt := savescreen(0,0,MaxRow(),MaxCol())
Local p := hb_threadStart( @Pajaritos(), nRow, nCol )
Local nIndice := OrdNumber()
DEFAULT nOrder TO OrdNumber()
set order to nOrder
INDEX ON &(IndexKey()) TAG _TEMP_ TO tHarbourt ;
CUSTOM ADDITIVE MEMORY
set order to nOrder
go top
DO WHILE OrdWildSeek( cExpr, .T. )
OrdKeyAdd( "_TEMP_" )
ENDDO
OrdSetFocus( "_TEMP_" )
hb_threadTerminateAll()
restscreen(0 ,0 ,MaxRow(), MaxCol(), PantaAnt)
return nIndice
PROCEDURE Pajaritos( nRow, nCol )
Local pajarito := "|",n := 0
DEFAULT nRow := MaxRow(), nCol := 1
DO WHILE .T.
do case
case n = 1
pajarito = "|"
case n = 2
pajarito = "/"
case n = 3
pajarito = "-"
case n = 4
pajarito = "\"
Otherwise
n := 0
end case
DispOutAt( nRow, nCol, "Generando Consulta....[ " + pajarito +" ]" ) //, "GR+/N" )
ThreadSleep( 500 )
n++
ENDDO
RETURN
Code: Select all | Expand
cNombre := "SARAH"
fast_filter( "*"+ alltrim( cNombre ) + "?", 4, 22, 28 )
Browse()
Ahora, ya estaría el filtro activado basado en subindices.
/*
Sustituto de SET FILTER
cExpr
Expresion a buscar que forme parte del indice, podemos
poner *Texto? , para buscar palabra que forme parte
nOrder
Sobre que indice activo vamos a recorrer la lista.
Por defecto es el indice activo.
nRow, nCol
Posicion fila,columna para mostrar progreso. Se ejecuta en
un hilo aparte
Return: Indice anterior
*/
function fast_filter( cExpr, nOrder, nRow, nCol )
local PantaAnt := savescreen(0,0,MaxRow(),MaxCol())
Local p := hb_threadStart( @Pajaritos(), nRow, nCol )
Local nIndice := OrdNumber()
DEFAULT nOrder TO OrdNumber()
set order to nOrder
INDEX ON &(IndexKey()) TAG _TEMP_ TO tHarbourt ;
CUSTOM ADDITIVE MEMORY
set order to nOrder
go top
DO WHILE OrdWildSeek( cExpr, .T. )
OrdKeyAdd( "_TEMP_" )
ENDDO
OrdSetFocus( "_TEMP_" )
hb_threadTerminateAll()
restscreen(0 ,0 ,MaxRow(), MaxCol(), PantaAnt)
return nIndice
PROCEDURE Pajaritos( nRow, nCol )
Local pajarito := "|",n := 0
DEFAULT nRow := MaxRow(), nCol := 1
DO WHILE .T.
do case
case n = 1
pajarito = "|"
case n = 2
pajarito = "/"
case n = 3
pajarito = "-"
case n = 4
pajarito = "\"
Otherwise
n := 0
end case
DispOutAt( nRow, nCol, "Generando Consulta....[ " + pajarito +" ]" ) //, "GR+/N" )
ThreadSleep( 500 )
n++
ENDDO
RETURN
]]>giuliano wrote: Tue Jul 02, 2024 2:08 pm Hi Reinaldo,
here my experience using mod_harbour + ADS on Linux
I have been using mod harbour + ADS in a Linux machine for 2 years .
It's faster, stable and easy to maintain/config .
I use also Postgres driver to connect on particular Database . It's fast and stable.
If you want some help don't esitate to contact me here in the forum or via mail .
I think the only limitation now is ADS support . I use ADS 11 release .
I agree with you . ADS works well well well ... Mod_Harbour too .
Thanks to Antonio and all the modharbour team.
Giuliano
]]>giuliano wrote: Tue Jul 02, 2024 2:08 pm Hi Reinaldo,
here my experience using mod_harbour + ADS on Linux
I have been using mod harbour + ADS in a Linux machine for 2 years .
It's faster, stable and easy to maintain/config .
I use also Postgres driver to connect on particular Database . It's fast and stable.
If you want some help don't esitate to contact me here in the forum or via mail .
I think the only limitation now is ADS support . I use ADS 11 release .
I agree with you . ADS works well well well ... Mod_Harbour too .
Thanks to Antonio and all the modharbour team.
Giuliano
]]>giuliano wrote: Mon Jan 20, 2025 8:24 am Hi Lailton ,
i'm using ADS client on Linux machine ( Ubuntu distrib. ) .
My apps connect to ADS SERVER 11 release install on Windows Server-
I use it with Harbour applications and MOD_HARBOUR web site .
Both applications are faster, stable and easy to maintain/config .
I think all of this is compatible with Debian distrib.
Bye
]]>giuliano wrote: Mon Jan 20, 2025 8:24 am Hi Lailton ,
i'm using ADS client on Linux machine ( Ubuntu distrib. ) .
My apps connect to ADS SERVER 11 release install on Windows Server-
I use it with Harbour applications and MOD_HARBOUR web site .
Both applications are faster, stable and easy to maintain/config .
I think all of this is compatible with Debian distrib.
Bye
]]>Procedimientos Almacenados / stored Procedures
Creamos el procedimiento almacenado desde el cliente mysql de nuestra preferencia
DELIMITER $
DROP PROCEDURE IF EXISTS born_in_year;
CREATE PROCEDURE born_in_year( year_of_birth INT )
BEGIN
SELECT first_name, last_name, birth, death from president where year( birth ) = year_of_birth;
END $
DELIMITER ;
para ejecutarlo simplemento lo hacenmos pro medio de un query
cText = "CALL born_in_year( 1908 )"
oQry := oServer:Query( cText )
el siguiente llamdo es importante para "terminar" el proceso
oServer:NextResult()
veammos el ejemplo completo
#include "tdolphin.ch"
#define CRLF Chr( 13 ) + Chr( 10 )
PROCEDURE Main()
LOCAL cText := ""
LOCAL oQry, oServer
SET CENTURY ON
SET DATE FORMAT "dd/mm/yyyy"
D_SetCaseSensitive( .T. )
IF ( oServer := ConnectTo() ) == NIL
RETURN NIL
ENDIF
cls
cText = "CALL born_in_year( 1908 )"
oQry := oServer:Query( cText )
DolphinBrw( oQry, "Test" )
oServer:NextResult()
oQry:End()
cText = "CALL born_in_year( 1913 )"
oQry := oServer:Query( cText )
DolphinBrw( oQry, "Test" )
oServer:NextResult()
oQry:End()
cText = "call count_born_in_year( 1913, @count )"
oQry := oServer:Execute( cText )
oServer:NextResult()
oQry := oServer:Query( "select @count as count" )
? "count is:"
?? oQry:count
oQry:End()
RETURN
esto verifica que no exista otro query con resultado (por motivos de posibles multiples sentencias en los precedimeintos) y cierra el ciclo de existir otro query con resultado deberiamos hacer lo siguiente
oQry:LoadNextQuery( )
asi cargamnos automaticamente el proximo resultado de un query para multi sentencias
ejemplo de multiples sentencias
#include "tdolphin.ch"
FUNCTION Main()
LOCAL oServer, oQry
D_SetCaseSensitive( .T. )
Set_MyLang( "esp" )
IF ( oServer := ConnectTo() ) == NIL
RETURN NIL
ENDIF
oQry = oServer:Query( "select * from president; select * from student" )
DolphinBrw( oQry, "President" )
oQry:LoadNextQuery( )
DolphinBrw( oQry, "Student" )
oQry = NIL
oServer:End()
RETURN NIL
#include "connto.prg"
#include "brw.prg"
]]>Procedimientos Almacenados / stored Procedures
Creamos el procedimiento almacenado desde el cliente mysql de nuestra preferencia
DELIMITER $
DROP PROCEDURE IF EXISTS born_in_year;
CREATE PROCEDURE born_in_year( year_of_birth INT )
BEGIN
SELECT first_name, last_name, birth, death from president where year( birth ) = year_of_birth;
END $
DELIMITER ;
para ejecutarlo simplemento lo hacenmos pro medio de un query
cText = "CALL born_in_year( 1908 )"
oQry := oServer:Query( cText )
el siguiente llamdo es importante para "terminar" el proceso
oServer:NextResult()
veammos el ejemplo completo
#include "tdolphin.ch"
#define CRLF Chr( 13 ) + Chr( 10 )
PROCEDURE Main()
LOCAL cText := ""
LOCAL oQry, oServer
SET CENTURY ON
SET DATE FORMAT "dd/mm/yyyy"
D_SetCaseSensitive( .T. )
IF ( oServer := ConnectTo() ) == NIL
RETURN NIL
ENDIF
cls
cText = "CALL born_in_year( 1908 )"
oQry := oServer:Query( cText )
DolphinBrw( oQry, "Test" )
oServer:NextResult()
oQry:End()
cText = "CALL born_in_year( 1913 )"
oQry := oServer:Query( cText )
DolphinBrw( oQry, "Test" )
oServer:NextResult()
oQry:End()
cText = "call count_born_in_year( 1913, @count )"
oQry := oServer:Execute( cText )
oServer:NextResult()
oQry := oServer:Query( "select @count as count" )
? "count is:"
?? oQry:count
oQry:End()
RETURN
esto verifica que no exista otro query con resultado (por motivos de posibles multiples sentencias en los precedimeintos) y cierra el ciclo de existir otro query con resultado deberiamos hacer lo siguiente
oQry:LoadNextQuery( )
asi cargamnos automaticamente el proximo resultado de un query para multi sentencias
ejemplo de multiples sentencias
#include "tdolphin.ch"
FUNCTION Main()
LOCAL oServer, oQry
D_SetCaseSensitive( .T. )
Set_MyLang( "esp" )
IF ( oServer := ConnectTo() ) == NIL
RETURN NIL
ENDIF
oQry = oServer:Query( "select * from president; select * from student" )
DolphinBrw( oQry, "President" )
oQry:LoadNextQuery( )
DolphinBrw( oQry, "Student" )
oQry = NIL
oServer:End()
RETURN NIL
#include "connto.prg"
#include "brw.prg"
Code: Select all | Expand
// Our first DialogBox sample
#include "FiveWin.ch"
#include "ttitle.ch"
#define HTTPREQUEST_PROXYSETTING_PROXY 2
// Para xHarbour
#ifdef __XHARBOUR__
#xtranslate hb_DateTime([<x,...>]) => DateTime(<x>)
#xtranslate hb_tstostr([<x>]) => TToS(<x>)
#xtranslate hb_stot([<x>]) => SToT(<x>)
#xtranslate hb_ttod([<x>]) => TToD(<x>)
#xtranslate hb_hour([<x>]) => Hour(<x>)
#xtranslate hb_minute([<x>]) => Minute(<x>)
#xtranslate hb_sec([<x>]) => Secs(<x>)
#xtranslate hb_NumToHex([<x>]) => NumToHex(<x>)
#xtranslate hb_StrFormat([<x,...>]) => StrFormat(<x>)
#xtranslate <x>:__EnumIndex => hb_EnumIndex
#endif
MEMVAR SEQUENC
FUNCTION Main()
LOCAL obmp , cBmp
LOCAL oDlg, oIco
LOCAL ofont
LOCAL cCode := space( 440 ) // maximo de 440 caracteres por qrcode.
// Master Mastintin: con 431 caracteres el formato es invalido, porque?
// Que me falta? Prueba porfa
SEQUENC := "35141146377222003730599000004630001158179941|20141105134922|10.00|61694805808|m+4o8FY1lig1zcy6VU3t7INVwE6kiA/ykLXKDFZfb9gu0g4wl3Fk2HYaRhSt8G+yk9mP/R65m3R7V2IO8CxnmO1oVtlamB6UKA+UZZqDNEqtYlhQzLySNzMG0thaNMZsq5RxmQ3eQLPw8LLez3MqWvUveFXNSSq6AGEX2+KOdavteo3K2L06SQoVIjwkmcgRzqhfHP3y8t2wfr1nw/WAnaCF9ZY/K4dTykk3hsXcan/MKCTBlcSOhNgSh3sdsQHpl2w2tmbLBsYBLFkuvKlwzHarNJQ1RfRznGdojHglQH1KVtbAUXKke54pdRt3JL7nJlR+Lbmtd2tjcT2vRyTepw=="
cCode := ALLTRIM( SEQUENC )
DEFINE Font ofont NAME "Verdana" SIZE 0, 14
DEFINE ICON oIco FILE "..\icons\fivewin.ico"
DEFINE DIALOG oDlg TITLE "AdaptaPro Qrcode Generator" ;
ICON oIco SIZE 350, 440
@ 30, 24 IMAGE oBmp FILE cBmp OF oDlg size 128, 128 pixel NOBORDER
oBmp:lTransparent := .T.
// cargaBmp( "hola",oBmp )
@ 160, 10 SAY "Introduce el codigo a generar :" size 100, 12 ;
FONT oFont pixel OF oDlg
@ 170, 10 GET cCode size 120, 12 FONT oFont pixel OF oDlg MEMO
@ 205, 85 BUTTON "&Buscar" SIZE 40, 12 OF oDlg pixel ;
FONT oFont ;
ACTION cargaBmp( alltrim( cCode ) , oBmp )
@ 205, 130 BUTTON "&Salir" SIZE 40, 12 pixel OF oDlg;
FONT oFont ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT DlgBarTitle( oDlg, " Generador de Qrcode", "" , 44 ) ;
ON PAINT DlgStatusBar( oDlg, 68, , .T. )
RETURN nil
//------------------------------------------------------------------------------
FUNCTION cargaBmp( cCode, oImage )
LOCAL cResp, hDib
LOCAL nZeroZeroClr
LOCAL ogbmp := GdiBmp():new()
LOCAL nHeight := 248
LOCAL nWidth := 248
LOCAL cUrl := "http://api.qrserver.com/v1/create-qr-code/?data="
LOCAL nQuality := 1
cUrl += GetSafeURL( hb_strtoutf8( cCode ) )
cUrl += "&size=" + alltrim( str( nWidth ) ) + "x" + alltrim( str( nHeight ) )
cResp := loadBmp( cUrl )
IF !Empty( cResp )
oGbmp:hbmp := GDIPLUSIMAGELOADPNGFROMSTR( cResp, len( cResp ) )
oImage:hBitmap := oGBmp:GetGDIHbitmap()
oImage:HasAlpha()
oImage:Refresh()
IF msgYesNo( " ¨ quiere grabar el codigo QR a Disco ?" )
// oGBmp:save(".\qrcode.png" ) // FORMATO INVALIDO ?
oImage:SaveImage( "qrcode.bmp", 0, nQuality )
ENDIF
oGbmp:End()
ENDIF
RETURN nil
STATIC FUNCTION GetSafeURL( cUrl )
LOCAL cAsc
LOCAL nChr
LOCAL sHex
LOCAL i
LOCAL cGetSafeURL := ""
FOR i = 1 TO Len( cUrl )
cASC := substr( cUrl, i, 1 )
nChr := Asc( cASC )
IF ( nChr > 47 .AND. nChr < 58 ) .OR. ( nChr > 64 .AND. nChr < 91 ) .OR. ( nChr > 96 .AND. nChr < 123 )
cGetSafeURL += cASC
ELSE
sHex := hb_NumtoHex( nChr )
IF Len( sHex ) = 1
cGetSafeURL += "%0" + sHex
ELSE
cGetSafeURL += "%" + sHex
End IF
End IF
NEXT
RETURN cGetSafeURL
//------------------------------------------------------------------------------
FUNCTION loadBmp( cUrl )
LOCAL oHttp
LOCAL cResp := nil
// Try
oHttp := CreateObject( "winhttp.winhttprequest.5.1" )
oHttp:Open( "GET", cUrl, .F. )
oHttp:Send()
cResp := oHttp:ResponseBody()
// Catch
// MsgStop( "Error" )
// Return cResp
// End Try
RETURN cResp
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
FUNCTION DlgStatusBar( oDlg, nHeight, nCorrec , lColor )
LOCAL nDlgHeight := oDlg:nHeight
LOCAL aColor := { { 0.40, nRGB( 200, 200, 200 ), nRGB( 184, 184, 184 ) }, ;
{ 0.60, nRGB( 184, 184, 184 ), nRGB( 150, 150, 150 ) } }
DEFAULT nHeight := 72
DEFAULT nCorrec := 0
DEFAULT lColor := .F.
nDlgHeight := nDlgHeight + ncorrec
IF lColor
GradienTfill( oDlg:hDC, nDlgHeight - ( nHeight - 2 ), 0, nDlgHeight - 20, oDlg:nWidth, aColor , .T. )
WndBoxIn( oDlg:hDc, nDlgHeight - ( nHeight - 1 ), 0, nDlgHeight - ( nHeight ), oDlg:nWidth )
ELSE
WndBoxIn( oDlg:hDc, nDlgHeight - ( nHeight - 1 ), 4, nDlgHeight - ( nHeight ), oDlg:nWidth - 10 )
ENDIF
RETURN Nil
//------------------------------------------------------------------------------
FUNCTION DlgBarTitle( oWnd, cTitle, cBmp , nHeight )
LOCAL oFont
LOCAL oTitle
LOCAL nColText := 180
LOCAL nRowImg := 0
DEFAULT cTitle := ""
DEFAULT nHeight := 48
IF nHeight < 48
nColText := 60
nRowImg := 12
DEFINE FONT oFont NAME "Arial" size 10, 30
ELSE
DEFINE FONT oFont NAME "Arial" size 12, 30
ENDIF
@ - 1, - 1 TITLE oTitle size oWnd:nWidth + 1, nHeight + 1 of oWnd SHADOWSIZE 0
@ nRowImg, 10 TITLEIMG OF oTitle BITMAP cBmp SIZE 48, 48 REFLEX ;
TRANSPARENT
@ nRowImg - 2 , nColText TITLETEXT OF oTitle TEXT cTitle COLOR CLR_BLACK FONT oFont
oTitle:aGrdBack := { { 1, RGB( 255, 255, 255 ), RGB( 229, 233, 238 ) } }
oTitle:nShadowIntensity = 0
oTitle:nShadow = 0
oTitle:nClrLine1 := nrgb( 0, 0, 0 )
oTitle:nClrLine2 := RGB( 229, 233, 238 )
oWnd:oTop := oTitle
RETURN oTitle
Code: Select all | Expand
// Our first DialogBox sample
#include "FiveWin.ch"
#include "ttitle.ch"
#define HTTPREQUEST_PROXYSETTING_PROXY 2
// Para xHarbour
#ifdef __XHARBOUR__
#xtranslate hb_DateTime([<x,...>]) => DateTime(<x>)
#xtranslate hb_tstostr([<x>]) => TToS(<x>)
#xtranslate hb_stot([<x>]) => SToT(<x>)
#xtranslate hb_ttod([<x>]) => TToD(<x>)
#xtranslate hb_hour([<x>]) => Hour(<x>)
#xtranslate hb_minute([<x>]) => Minute(<x>)
#xtranslate hb_sec([<x>]) => Secs(<x>)
#xtranslate hb_NumToHex([<x>]) => NumToHex(<x>)
#xtranslate hb_StrFormat([<x,...>]) => StrFormat(<x>)
#xtranslate <x>:__EnumIndex => hb_EnumIndex
#endif
MEMVAR SEQUENC
FUNCTION Main()
LOCAL obmp , cBmp
LOCAL oDlg, oIco
LOCAL ofont
LOCAL cCode := space( 440 ) // maximo de 440 caracteres por qrcode.
// Master Mastintin: con 431 caracteres el formato es invalido, porque?
// Que me falta? Prueba porfa
SEQUENC := "35141146377222003730599000004630001158179941|20141105134922|10.00|61694805808|m+4o8FY1lig1zcy6VU3t7INVwE6kiA/ykLXKDFZfb9gu0g4wl3Fk2HYaRhSt8G+yk9mP/R65m3R7V2IO8CxnmO1oVtlamB6UKA+UZZqDNEqtYlhQzLySNzMG0thaNMZsq5RxmQ3eQLPw8LLez3MqWvUveFXNSSq6AGEX2+KOdavteo3K2L06SQoVIjwkmcgRzqhfHP3y8t2wfr1nw/WAnaCF9ZY/K4dTykk3hsXcan/MKCTBlcSOhNgSh3sdsQHpl2w2tmbLBsYBLFkuvKlwzHarNJQ1RfRznGdojHglQH1KVtbAUXKke54pdRt3JL7nJlR+Lbmtd2tjcT2vRyTepw=="
cCode := ALLTRIM( SEQUENC )
DEFINE Font ofont NAME "Verdana" SIZE 0, 14
DEFINE ICON oIco FILE "..\icons\fivewin.ico"
DEFINE DIALOG oDlg TITLE "AdaptaPro Qrcode Generator" ;
ICON oIco SIZE 350, 440
@ 30, 24 IMAGE oBmp FILE cBmp OF oDlg size 128, 128 pixel NOBORDER
oBmp:lTransparent := .T.
// cargaBmp( "hola",oBmp )
@ 160, 10 SAY "Introduce el codigo a generar :" size 100, 12 ;
FONT oFont pixel OF oDlg
@ 170, 10 GET cCode size 120, 12 FONT oFont pixel OF oDlg MEMO
@ 205, 85 BUTTON "&Buscar" SIZE 40, 12 OF oDlg pixel ;
FONT oFont ;
ACTION cargaBmp( alltrim( cCode ) , oBmp )
@ 205, 130 BUTTON "&Salir" SIZE 40, 12 pixel OF oDlg;
FONT oFont ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT DlgBarTitle( oDlg, " Generador de Qrcode", "" , 44 ) ;
ON PAINT DlgStatusBar( oDlg, 68, , .T. )
RETURN nil
//------------------------------------------------------------------------------
FUNCTION cargaBmp( cCode, oImage )
LOCAL cResp, hDib
LOCAL nZeroZeroClr
LOCAL ogbmp := GdiBmp():new()
LOCAL nHeight := 248
LOCAL nWidth := 248
LOCAL cUrl := "http://api.qrserver.com/v1/create-qr-code/?data="
LOCAL nQuality := 1
cUrl += GetSafeURL( hb_strtoutf8( cCode ) )
cUrl += "&size=" + alltrim( str( nWidth ) ) + "x" + alltrim( str( nHeight ) )
cResp := loadBmp( cUrl )
IF !Empty( cResp )
oGbmp:hbmp := GDIPLUSIMAGELOADPNGFROMSTR( cResp, len( cResp ) )
oImage:hBitmap := oGBmp:GetGDIHbitmap()
oImage:HasAlpha()
oImage:Refresh()
IF msgYesNo( " ¨ quiere grabar el codigo QR a Disco ?" )
// oGBmp:save(".\qrcode.png" ) // FORMATO INVALIDO ?
oImage:SaveImage( "qrcode.bmp", 0, nQuality )
ENDIF
oGbmp:End()
ENDIF
RETURN nil
STATIC FUNCTION GetSafeURL( cUrl )
LOCAL cAsc
LOCAL nChr
LOCAL sHex
LOCAL i
LOCAL cGetSafeURL := ""
FOR i = 1 TO Len( cUrl )
cASC := substr( cUrl, i, 1 )
nChr := Asc( cASC )
IF ( nChr > 47 .AND. nChr < 58 ) .OR. ( nChr > 64 .AND. nChr < 91 ) .OR. ( nChr > 96 .AND. nChr < 123 )
cGetSafeURL += cASC
ELSE
sHex := hb_NumtoHex( nChr )
IF Len( sHex ) = 1
cGetSafeURL += "%0" + sHex
ELSE
cGetSafeURL += "%" + sHex
End IF
End IF
NEXT
RETURN cGetSafeURL
//------------------------------------------------------------------------------
FUNCTION loadBmp( cUrl )
LOCAL oHttp
LOCAL cResp := nil
// Try
oHttp := CreateObject( "winhttp.winhttprequest.5.1" )
oHttp:Open( "GET", cUrl, .F. )
oHttp:Send()
cResp := oHttp:ResponseBody()
// Catch
// MsgStop( "Error" )
// Return cResp
// End Try
RETURN cResp
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
FUNCTION DlgStatusBar( oDlg, nHeight, nCorrec , lColor )
LOCAL nDlgHeight := oDlg:nHeight
LOCAL aColor := { { 0.40, nRGB( 200, 200, 200 ), nRGB( 184, 184, 184 ) }, ;
{ 0.60, nRGB( 184, 184, 184 ), nRGB( 150, 150, 150 ) } }
DEFAULT nHeight := 72
DEFAULT nCorrec := 0
DEFAULT lColor := .F.
nDlgHeight := nDlgHeight + ncorrec
IF lColor
GradienTfill( oDlg:hDC, nDlgHeight - ( nHeight - 2 ), 0, nDlgHeight - 20, oDlg:nWidth, aColor , .T. )
WndBoxIn( oDlg:hDc, nDlgHeight - ( nHeight - 1 ), 0, nDlgHeight - ( nHeight ), oDlg:nWidth )
ELSE
WndBoxIn( oDlg:hDc, nDlgHeight - ( nHeight - 1 ), 4, nDlgHeight - ( nHeight ), oDlg:nWidth - 10 )
ENDIF
RETURN Nil
//------------------------------------------------------------------------------
FUNCTION DlgBarTitle( oWnd, cTitle, cBmp , nHeight )
LOCAL oFont
LOCAL oTitle
LOCAL nColText := 180
LOCAL nRowImg := 0
DEFAULT cTitle := ""
DEFAULT nHeight := 48
IF nHeight < 48
nColText := 60
nRowImg := 12
DEFINE FONT oFont NAME "Arial" size 10, 30
ELSE
DEFINE FONT oFont NAME "Arial" size 12, 30
ENDIF
@ - 1, - 1 TITLE oTitle size oWnd:nWidth + 1, nHeight + 1 of oWnd SHADOWSIZE 0
@ nRowImg, 10 TITLEIMG OF oTitle BITMAP cBmp SIZE 48, 48 REFLEX ;
TRANSPARENT
@ nRowImg - 2 , nColText TITLETEXT OF oTitle TEXT cTitle COLOR CLR_BLACK FONT oFont
oTitle:aGrdBack := { { 1, RGB( 255, 255, 255 ), RGB( 229, 233, 238 ) } }
oTitle:nShadowIntensity = 0
oTitle:nShadow = 0
oTitle:nClrLine1 := nrgb( 0, 0, 0 )
oTitle:nClrLine2 := RGB( 229, 233, 238 )
oWnd:oTop := oTitle
RETURN oTitle
Code: Select all | Expand
Pasta de c:\XHBBCC77\lib
09/10/2024 10:55 53.248 hbzebra.lib
Regards, saludos.]]>Code: Select all | Expand
Pasta de c:\XHBBCC77\lib
09/10/2024 10:55 53.248 hbzebra.lib
Regards, saludos.]]>Code: Select all | Expand
#INCLUDE <fivewin.ch>
STATIC oPrn
STATIC nRow
STATIC nRowStep
STATIC nColStep
STATIC nWidthPage := 80
STATIC nHightPage := 66
FUNCTION Main()
LOCAL cCia := "SysCtrl Software"
LOCAL cCalle := "CERRA CORAL SN"
LOCAL cColonia := "RESIDENCIAL DEL NORTE"
LOCAL cLocalidad := "CDMX"
LOCAL cUrl := "sysctrl.com.mx"
LOCAL oFont,oFontBig, oPen
nRow := 1
PRINTER oPrn PREVIEW NAME 'SysCtrl Report'
oPrn:lPrvModal := .t.
oPrn:SetPage(1) // carta
oPrn:SetPortrait()
if ! oPrn:setup()
return nil
endif
DEFINE FONT oFont NAME "TAHOME" SIZE 0, -20 OF oPrn BOLD
DEFINE FONT oFontBig NAME "TAHOME" SIZE 0, -28 OF oPrn BOLD
DEFINE PEN oPen COLOR CLR_BLACK OF oPrn
nRowStep := oPrn:nVertRes() / nHightPage
nColStep := oPrn:nHorzRes() / nWidthPage
IF Empty( oPrn:hDC )
oPrn:end()
MSGINFO( "No hay impresoras instaladas...", "Usuario ..." )
RETURN NIL
ENDIF
PAGE
nRow += nRowStep * 2
SayQR(cUrl, oPrn, nRow, nColStep*10, 4,4,"PIXEL", "QR-CODE" )
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCia )/2)), cCia, oFontBig )
nRow += nRowStep * 4
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCalle )/2)), cCalle, oFont )
nRow += nRowStep * 2
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cColonia )/2)), cColonia, oFont )
nRow += nRowStep * 2
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cLocalidad )/2)), cLocalidad, oFont )
nRow += nRowStep * 3
oPrn:Line( nRow, nColStep*1, nRow , nColStep * (nWidthPage-1), oPen )
nRow += nRowStep*.5
ENDPAGE
ENDPRINT
RETURN (.T.)
FUNCTION SayQR( cText, oPrn, nRow, nCol, nAncho, nAlto, cUnits, cType )
LOCAL aTam := oPrn:Cmtr2Pix(nAncho,nAlto)
oPrn:PrintBarcode( cText, nRow, nCol, aTam[1], aTam[2], cUnits, cType )
RETURN NIL
INIT PROCEDURE Setup()
REQUEST FWZEBRA //codigos de barra o QR tipo zebra
RETURN
Code: Select all | Expand
#INCLUDE <fivewin.ch>
STATIC oPrn
STATIC nRow
STATIC nRowStep
STATIC nColStep
STATIC nWidthPage := 80
STATIC nHightPage := 66
FUNCTION Main()
LOCAL cCia := "SysCtrl Software"
LOCAL cCalle := "CERRA CORAL SN"
LOCAL cColonia := "RESIDENCIAL DEL NORTE"
LOCAL cLocalidad := "CDMX"
LOCAL cUrl := "sysctrl.com.mx"
LOCAL oFont,oFontBig, oPen
nRow := 1
PRINTER oPrn PREVIEW NAME 'SysCtrl Report'
oPrn:lPrvModal := .t.
oPrn:SetPage(1) // carta
oPrn:SetPortrait()
if ! oPrn:setup()
return nil
endif
DEFINE FONT oFont NAME "TAHOME" SIZE 0, -20 OF oPrn BOLD
DEFINE FONT oFontBig NAME "TAHOME" SIZE 0, -28 OF oPrn BOLD
DEFINE PEN oPen COLOR CLR_BLACK OF oPrn
nRowStep := oPrn:nVertRes() / nHightPage
nColStep := oPrn:nHorzRes() / nWidthPage
IF Empty( oPrn:hDC )
oPrn:end()
MSGINFO( "No hay impresoras instaladas...", "Usuario ..." )
RETURN NIL
ENDIF
PAGE
nRow += nRowStep * 2
SayQR(cUrl, oPrn, nRow, nColStep*10, 4,4,"PIXEL", "QR-CODE" )
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCia )/2)), cCia, oFontBig )
nRow += nRowStep * 4
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCalle )/2)), cCalle, oFont )
nRow += nRowStep * 2
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cColonia )/2)), cColonia, oFont )
nRow += nRowStep * 2
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cLocalidad )/2)), cLocalidad, oFont )
nRow += nRowStep * 3
oPrn:Line( nRow, nColStep*1, nRow , nColStep * (nWidthPage-1), oPen )
nRow += nRowStep*.5
ENDPAGE
ENDPRINT
RETURN (.T.)
FUNCTION SayQR( cText, oPrn, nRow, nCol, nAncho, nAlto, cUnits, cType )
LOCAL aTam := oPrn:Cmtr2Pix(nAncho,nAlto)
oPrn:PrintBarcode( cText, nRow, nCol, aTam[1], aTam[2], cUnits, cType )
RETURN NIL
INIT PROCEDURE Setup()
REQUEST FWZEBRA //codigos de barra o QR tipo zebra
RETURN
Code: Select all | Expand
// https://forums.fivetechsupport.com/viewtopic.php?p=276837#p276837
// C:\FWH\SAMPLES\QRCODE4.PRG
#Include "fivewin.ch"
STATIC oPrn, nRow, nRowStep, nColStep
STATIC nWidthPage := 80
STATIC nHightPage := 66
FUNCTION Main()
LOCAL cCia := "SysCtrl Software"
LOCAL cCalle := "CERRA CORAL SN"
LOCAL cColonia := "RESIDENCIAL DEL NORTE"
LOCAL cLocalidad := "CDMX"
LOCAL cUrl := "sysctrl.com.mx"
LOCAL oFont, oFontBig, oPen
nRow := 1
PRINTER oPrn PREVIEW NAME 'SysCtrl Report'
oPrn:lPrvModal := .t.
oPrn:SetPage(1) // carta
oPrn:SetPortrait()
IF .NOT. oPrn:Setup()
RETURN NIL
ENDIF
DEFINE FONT oFont NAME "TAHOME" SIZE 0, -20 OF oPrn BOLD
DEFINE FONT oFontBig NAME "TAHOME" SIZE 0, -28 OF oPrn BOLD
DEFINE PEN oPen COLOR CLR_BLACK OF oPrn
nRowStep := oPrn:nVertRes() / nHightPage
nColStep := oPrn:nHorzRes() / nWidthPage
IF Empty( oPrn:hDC )
oPrn:end()
MSGINFO( "No hay impresoras instaladas...", "Usuario ..." )
RETURN NIL
ENDIF
PAGE
nRow += nRowStep * 2
SayQR(cUrl, oPrn, nRow, nColStep*10, 4,4,"PIXEL", "QR-CODE" )
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCia )/2)), cCia, oFontBig )
nRow += nRowStep * 4
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCalle )/2)), cCalle, oFont )
nRow += nRowStep * 2
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cColonia )/2)), cColonia, oFont )
nRow += nRowStep * 2
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cLocalidad )/2)), cLocalidad, oFont )
nRow += nRowStep * 3
oPrn:Line( nRow, nColStep*1, nRow , nColStep * (nWidthPage-1), oPen )
nRow += nRowStep*.5
ENDPAGE
ENDPRINT
oFont:End()
oFontBig:End()
oPen:End()
RETURN NIL // (.T.)
FUNCTION SayQR( cText, oPrn, nRow, nCol, nAncho, nAlto, cUnits, cType )
LOCAL aTam := oPrn:Cmtr2Pix(nAncho,nAlto)
oPrn:PrintBarcode( cText, nRow, nCol, aTam[1], aTam[2], cUnits, cType )
RETURN NIL
INIT PROCEDURE Setup()
REQUEST FWZEBRA // codigos de barra o QR tipo zebra
RETURN
// FIN / END
Code: Select all | Expand
// https://forums.fivetechsupport.com/viewtopic.php?p=276837#p276837
// C:\FWH\SAMPLES\QRCODE4.PRG
#Include "fivewin.ch"
STATIC oPrn, nRow, nRowStep, nColStep
STATIC nWidthPage := 80
STATIC nHightPage := 66
FUNCTION Main()
LOCAL cCia := "SysCtrl Software"
LOCAL cCalle := "CERRA CORAL SN"
LOCAL cColonia := "RESIDENCIAL DEL NORTE"
LOCAL cLocalidad := "CDMX"
LOCAL cUrl := "sysctrl.com.mx"
LOCAL oFont, oFontBig, oPen
nRow := 1
PRINTER oPrn PREVIEW NAME 'SysCtrl Report'
oPrn:lPrvModal := .t.
oPrn:SetPage(1) // carta
oPrn:SetPortrait()
IF .NOT. oPrn:Setup()
RETURN NIL
ENDIF
DEFINE FONT oFont NAME "TAHOME" SIZE 0, -20 OF oPrn BOLD
DEFINE FONT oFontBig NAME "TAHOME" SIZE 0, -28 OF oPrn BOLD
DEFINE PEN oPen COLOR CLR_BLACK OF oPrn
nRowStep := oPrn:nVertRes() / nHightPage
nColStep := oPrn:nHorzRes() / nWidthPage
IF Empty( oPrn:hDC )
oPrn:end()
MSGINFO( "No hay impresoras instaladas...", "Usuario ..." )
RETURN NIL
ENDIF
PAGE
nRow += nRowStep * 2
SayQR(cUrl, oPrn, nRow, nColStep*10, 4,4,"PIXEL", "QR-CODE" )
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCia )/2)), cCia, oFontBig )
nRow += nRowStep * 4
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cCalle )/2)), cCalle, oFont )
nRow += nRowStep * 2
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cColonia )/2)), cColonia, oFont )
nRow += nRowStep * 2
oPrn:Say( nRow, nColStep * (5+(nWidthPage/2)-(Len( cLocalidad )/2)), cLocalidad, oFont )
nRow += nRowStep * 3
oPrn:Line( nRow, nColStep*1, nRow , nColStep * (nWidthPage-1), oPen )
nRow += nRowStep*.5
ENDPAGE
ENDPRINT
oFont:End()
oFontBig:End()
oPen:End()
RETURN NIL // (.T.)
FUNCTION SayQR( cText, oPrn, nRow, nCol, nAncho, nAlto, cUnits, cType )
LOCAL aTam := oPrn:Cmtr2Pix(nAncho,nAlto)
oPrn:PrintBarcode( cText, nRow, nCol, aTam[1], aTam[2], cUnits, cType )
RETURN NIL
INIT PROCEDURE Setup()
REQUEST FWZEBRA // codigos de barra o QR tipo zebra
RETURN
// FIN / END
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oChat := TDeepSeek():New()
local dummy := FW_SetUnicode( .T. )
local cDatabase := "foros_antiguos"
local oCn := maria_Connect( "localhost," + cDatabase + ",fivetec1_antonio,1234", .T. )
local aTables, cTable
local hDatabase := { => }, cJson
if oCn == nil
MsgAlert( "Error connecting to database" )
return nil
endif
aTables = oCn:ListBaseTables()
for each cTable in aTables
hDatabase[ cTable ] = oCn:ListColumns( cTable )
next
oChat:Send( "tell me the SQL sentence to list the 10 more active users in the forums using this info," + ;
" give me the SQL sentence, no explanations. Remove the '''SQL from the beginning and the ''' from the end: " + ;
hb_jsonEncode( hDatabase ) )
XBrowser( oCn:Execute( oChat:GetValue() ) )
oChat:End()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oChat := TDeepSeek():New()
local dummy := FW_SetUnicode( .T. )
local cDatabase := "foros_antiguos"
local oCn := maria_Connect( "localhost," + cDatabase + ",fivetec1_antonio,1234", .T. )
local aTables, cTable
local hDatabase := { => }, cJson
if oCn == nil
MsgAlert( "Error connecting to database" )
return nil
endif
aTables = oCn:ListBaseTables()
for each cTable in aTables
hDatabase[ cTable ] = oCn:ListColumns( cTable )
next
oChat:Send( "tell me the SQL sentence to list the 10 more active users in the forums using this info," + ;
" give me the SQL sentence, no explanations. Remove the '''SQL from the beginning and the ''' from the end: " + ;
hb_jsonEncode( hDatabase ) )
XBrowser( oCn:Execute( oChat:GetValue() ) )
oChat:End()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oChat := TDeepSeek():New()
oChat:Send( "Using MySQL how to list all tables ? write just the simplest SQL sentence, no explanations" )
? oChat:GetValue()
oChat:End()
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oChat := TDeepSeek():New()
oChat:Send( "Using MySQL how to list all tables ? write just the simplest SQL sentence, no explanations" )
? oChat:GetValue()
oChat:End()
return nil
Code: Select all | Expand
// Based on https://api-docs.deepseek.com
// Remember to register in https://deepseek.com/ and get your API key
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
CLASS TDeepSeek
DATA cKey INIT ""
DATA cModel INIT "deepseek-chat"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD Send( cPrompt )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TDeepSeek
if Empty( cKey )
::cKey = GetEnv( "DEEPSEEK_API_KEY" )
else
::cKey = cKey
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.deepseek.com/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TDeepSeek
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TDeepSeek
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
TRY
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
CATCH
uValue = uValue[ "error" ][ "message" ]
END
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD Send( cPrompt ) CLASS TDeepSeek
local aHeaders, cJson, hRequest := { => }, hMessage1 := { => }, hMessage2 := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, '' )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hRequest[ "model" ] = ::cModel
hMessage1[ "role" ] = "system"
hMessage1[ "content" ] = "You are a helpfull assistant."
hMessage2[ "role" ] = "user"
hMessage2[ "content" ] = cPrompt
hRequest[ "messages" ] = { hMessage1, hMessage2 }
hRequest[ "stream" ] = .F.
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
]]>Code: Select all | Expand
// Based on https://api-docs.deepseek.com
// Remember to register in https://deepseek.com/ and get your API key
#include "FiveWin.ch"
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
//----------------------------------------------------------------------------//
CLASS TDeepSeek
DATA cKey INIT ""
DATA cModel INIT "deepseek-chat"
DATA cResponse
DATA cUrl
DATA hCurl
DATA nError INIT 0
DATA nHttpCode INIT 0
METHOD New( cKey, cModel )
METHOD Send( cPrompt )
METHOD End()
METHOD GetValue( cHKey )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cKey, cModel ) CLASS TDeepSeek
if Empty( cKey )
::cKey = GetEnv( "DEEPSEEK_API_KEY" )
else
::cKey = cKey
endif
if ! Empty( cModel )
::cModel = cModel
endif
::cUrl = "https://api.deepseek.com/chat/completions"
::hCurl = curl_easy_init()
return Self
//----------------------------------------------------------------------------//
METHOD End() CLASS TDeepSeek
curl_easy_cleanup( ::hCurl )
::hCurl = nil
return nil
//----------------------------------------------------------------------------//
METHOD GetValue( cHKey ) CLASS TDeepSeek
local aKeys := hb_AParams(), cKey
local uValue := hb_jsonDecode( ::cResponse )
hb_default( @cHKey, "content" )
if cHKey == "content"
TRY
uValue = uValue[ "choices" ][ 1 ][ "message" ][ "content" ]
CATCH
uValue = uValue[ "error" ][ "message" ]
END
endif
TRY
for each cKey in aKeys
if ValType( uValue[ cKey ] ) == "A"
uValue = uValue[ cKey ][ 1 ][ "choices" ][ 1 ][ "message" ][ "content" ]
else
uValue = uValue[ cKey ]
endif
next
CATCH
XBrowser( uValue )
END
return uValue
//----------------------------------------------------------------------------//
METHOD Send( cPrompt ) CLASS TDeepSeek
local aHeaders, cJson, hRequest := { => }, hMessage1 := { => }, hMessage2 := { => }
curl_easy_setopt( ::hCurl, HB_CURLOPT_POST, .T. )
curl_easy_setopt( ::hCurl, HB_CURLOPT_URL, ::cUrl )
aHeaders := { "Content-Type: application/json", ;
"Authorization: Bearer " + ::cKey }
curl_easy_setopt( ::hCurl, HB_CURLOPT_HTTPHEADER, aHeaders )
curl_easy_setopt( ::hCurl, HB_CURLOPT_USERNAME, '' )
curl_easy_setopt( ::hCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( ::hCurl, HB_CURLOPT_SSL_VERIFYPEER, .F. )
hRequest[ "model" ] = ::cModel
hMessage1[ "role" ] = "system"
hMessage1[ "content" ] = "You are a helpfull assistant."
hMessage2[ "role" ] = "user"
hMessage2[ "content" ] = cPrompt
hRequest[ "messages" ] = { hMessage1, hMessage2 }
hRequest[ "stream" ] = .F.
cJson = hb_jsonEncode( hRequest )
curl_easy_setopt( ::hCurl, HB_CURLOPT_POSTFIELDS, cJson )
::nError = curl_easy_perform( ::hCurl )
curl_easy_getinfo( ::hCurl, HB_CURLINFO_RESPONSE_CODE, @::nHttpCode )
if ::nError == HB_CURLE_OK
::cResponse = curl_easy_dl_buff_get( ::hCurl )
else
::cResponse := "Error code " + Str( ::nError )
endif
return ::cResponse
//----------------------------------------------------------------------------//
]]>]]>Armando wrote:Master Antonio:
Este es el contenido de CheckRes.Txt
SaludosCode: Select all | Expand
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,-570093934,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(215)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,453317101,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(220)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,-33222578,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(225)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,1090850343,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(266)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,251990033,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(277)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,1174736286,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(283)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-301657948,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(367)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-838529548,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(372)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-100331320,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(377)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1409618529,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(383)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1610282077,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(388)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1258623205,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(394)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,553980494,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(399)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1225066575,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(404)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-788196856,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(410)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1174074071,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(415)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1812271508,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(421)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-351989856,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(427)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- FONT,67766313,TMDIFRAME:GETFONT(3129)->TMDICLIENT:GETFONT(3106)->TMDICLIENT:NEW(147)->TMDIFRAME:NEW(181)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BRUSH,-871362216,TMSGBAR:SETCOLOR(2904)->TMSGBAR:DEFAULT(292)->TMSGBAR:NEW(183)->MAIN(160) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1124405330,TMDIFRAME:DRAWITEM(1265)->TMDIFRAME:HANDLEEVENT(0)->_FWH(3693)->SHOWWINDOW(0)->TMDIFRAME:ACTIVATE(1094)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1073412436,TMSGBAR:PAINT(653)->(b)TMSGBAR(72)->TMSGBAR:DISPLAY(0)->TMSGBAR:HANDLEEVENT(1823)->_FWH(3693)->UPDATEWINDOW(0)->TMDIFRAME:ACTIVATE(1095)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BRUSH,-1357901224,TBAR:SETCOLOR(2904)->TBAR:SETGRADIENTS(269)->TBAR:NEW(186)->LABARRA(529)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-49999279,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(543)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1208290985,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(550)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-301657861,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(557)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,923078749,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(567)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,889524267,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(574)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1426395794,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(584)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1057296597,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(591)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-2012934955,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(598)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1208290805,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(605)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-955969209,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(612)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1443172058,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(619)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-670756749,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(626)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,637865975,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(633)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-570094001,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(640)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,251989948,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(647)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1090187741,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(654)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1442508697,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(661)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1711608410,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(670)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- ICON,8260005,EDITAR(808)->(b)SIRSE01A(351)->TBTNBMP:CLICK(792)->TBTNBMP:LBUTTONUP(1083)->TCONTROL:HANDLEEVENT(1847)->TBTNBMP:HANDLEEVENT(2135)->_FWH(3693)->WINRUN(0)->TMDIFRAME:ACTIVATE(1118)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- ====================================================================================================
]]>Armando wrote:Master Antonio:
Este es el contenido de CheckRes.Txt
SaludosCode: Select all | Expand
14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,-570093934,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(215)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,453317101,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(220)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,-33222578,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(225)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,1090850343,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(266)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,251990033,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(277)->MAIN(158) 14/12/2024 17:46:32: D:\Sirse30\Sirse30.Exe -- BMP,1174736286,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(283)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-301657948,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(367)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-838529548,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(372)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-100331320,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(377)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1409618529,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(383)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1610282077,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(388)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1258623205,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(394)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,553980494,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(399)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1225066575,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(404)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-788196856,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(410)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1174074071,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(415)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1812271508,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(421)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-351989856,TMENUITEM:NEW(470)->MENUADDITEM(380)->HAZMENU(427)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- FONT,67766313,TMDIFRAME:GETFONT(3129)->TMDICLIENT:GETFONT(3106)->TMDICLIENT:NEW(147)->TMDIFRAME:NEW(181)->MAIN(158) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BRUSH,-871362216,TMSGBAR:SETCOLOR(2904)->TMSGBAR:DEFAULT(292)->TMSGBAR:NEW(183)->MAIN(160) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1124405330,TMDIFRAME:DRAWITEM(1265)->TMDIFRAME:HANDLEEVENT(0)->_FWH(3693)->SHOWWINDOW(0)->TMDIFRAME:ACTIVATE(1094)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1073412436,TMSGBAR:PAINT(653)->(b)TMSGBAR(72)->TMSGBAR:DISPLAY(0)->TMSGBAR:HANDLEEVENT(1823)->_FWH(3693)->UPDATEWINDOW(0)->TMDIFRAME:ACTIVATE(1095)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BRUSH,-1357901224,TBAR:SETCOLOR(2904)->TBAR:SETGRADIENTS(269)->TBAR:NEW(186)->LABARRA(529)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-49999279,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(543)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1208290985,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(550)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-301657861,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(557)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,923078749,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(567)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,889524267,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(574)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1426395794,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(584)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1057296597,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(591)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-2012934955,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(598)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1208290805,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(605)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-955969209,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(612)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1443172058,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(619)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-670756749,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(626)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,637865975,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(633)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-570094001,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(640)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,251989948,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(647)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1090187741,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(654)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,-1442508697,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(661)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- BMP,1711608410,(b)TWINDOW(604)->TBTNBMP:READIMAGE(0)->TBTNBMP:SETIMAGES(1219)->TBTNBMP:LOADBITMAPS(1247)->TBTNBMP:NEWBAR(589)->LABARRA(670)->(b)MAIN(178)->TMDIFRAME:ACTIVATE(1104)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- ICON,8260005,EDITAR(808)->(b)SIRSE01A(351)->TBTNBMP:CLICK(792)->TBTNBMP:LBUTTONUP(1083)->TCONTROL:HANDLEEVENT(1847)->TBTNBMP:HANDLEEVENT(2135)->_FWH(3693)->WINRUN(0)->TMDIFRAME:ACTIVATE(1118)->MAIN(178) 14/12/2024 17:46:34: D:\Sirse30\Sirse30.Exe -- ====================================================================================================
Code: Select all | Expand
STATIC FUNCTION LaBarra( oWindow )
LOCAL oBarra
LOCAL oCursor
DEFINE CURSOR oCursor RESOURCE "Dedo"
DEFINE BUTTONBAR oBarra SIZE 45, 45 OF oWindow CURSOR oCursor 2007
oBarra:bClrGrad = { | lInvert | IF( ! lInvert, ;
{ { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) }, ;
{ 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } }, ;
{ { 0.50, nRGB( 139, 166, 193 ), nRGB( 69, 119, 170 ) }, ;
{ 0.50, nRGB( 52, 104, 152 ), nRGB( 50, 107, 162 ) } } ) }
oBarra:nClrText = nRGB( 255, 255, 255 )
* -----------------------------------------------------------------------------*
IF aAblM1[01] .AND. aAblM1[02]
DEFINE BUTTON aBtns1[01] OF oBarra RESOURCE "Rec32" cBorde ;
ACTION SirseWin01a(oWindow);
MESSAGE "Registro e impresión de facturas"
aBtns1[01] :cToolTip := { "Registro de facturas", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[03]
DEFINE BUTTON aBtns1[02] OF oBarra RESOURCE "Cos32" cBorde ;
ACTION SirseWin01b(oWindow);
MESSAGE "Consultar órdenes de servicio"
aBtns1[02] :cToolTip := { "Consultar órdenes", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[04]
DEFINE BUTTON aBtns1[03] OF oBarra RESOURCE "Rep32" cBorde ;
ACTION SirseWin01c(oWindow);
MESSAGE "Asignar reparación"
aBtns1[03] :cToolTip := { "Asignar reparación", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[05]
DEFINE BUTTON aBtns1[04] OF oBarra RESOURCE "Pdr32" cBorde ;
ACTION SirseWin01d(oWindow);
MESSAGE "Reporte de órdenes pendientes de reparar"
aBtns1[04] :cToolTip := { "Reporte de pendientes de reparar", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[06]
DEFINE BUTTON aBtns1[05] OF oBarra RESOURCE "Rne32" cBorde ;
ACTION SirseWin01e(oWindow);
MESSAGE "Reporte de órdenes reparadas pendientes de entregar"
aBtns1[05] :cToolTip := { "Reporte de reparadas no entregadas", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[07]
DEFINE BUTTON aBtns1[06] OF oBarra RESOURCE "Pre32" cBorde ;
ACTION SirseWin01f(oWindow);
MESSAGE "Elaborar e imprimir prespuestos"
aBtns1[06] :cToolTip := { "Presupuestos", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM2[01] .AND. aAblM2[02]
DEFINE BUTTON aBtns2[01] OF oBarra RESOURCE "Vdr32" cBorde ;
GROUP;
ACTION SirseWin02a(oWindow);
MESSAGE "Venta de refacciones"
aBtns2[01] :cToolTip := { "Venta de refacciones", "Ventas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM2[01] .AND. aAblM2[03]
DEFINE BUTTON aBtns2[02] OF oBarra RESOURCE "Ddv32" cBorde ;
ACTION SirseWin02b(oWindow);
MESSAGE "Reporte diario de ventas"
aBtns2[02] :cToolTip := { "Diario de ventas", "Ventas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM4[01] .AND. aAblM4[02]
DEFINE BUTTON aBtns4[01] OF oBarra RESOURCE "Vda32" cBorde ;
GROUP;
ACTION SirseWin03a(oWindow);
MESSAGE "Vales de almacén"
aBtns4[01] :cToolTip := { "Movimientos de almacén", "Inventario", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM4[01] .AND. aAblM4[03]
DEFINE BUTTON aBtns4[02] OF oBarra RESOURCE "Edm32" cBorde ;
ACTION SirseWin03b(oWindow);
MESSAGE "Estadistico de movimientos"
aBtns4[02] :cToolTip := { "Estadistico de movimientos", "Inventario", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM6[01] .AND. aAblM6[02]
DEFINE BUTTON aBtns6[01] OF oBarra RESOURCE "Com32" cBorde ;
GROUP;
ACTION SirseWin04a(oWindow);
MESSAGE "Reporte para pago de comisiones"
aBtns6[01] :cToolTip := { "Reporte para pagar comisiones", "Comisiones", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM7[01] .AND. aAblM7[02]
DEFINE BUTTON aBtns7[01] OF oBarra RESOURCE "Par32" cBorde ;
GROUP;
ACTION SirseWin05a(oWindow) ;
MESSAGE "Mantenimiento a partes"
aBtns7[01] :cToolTip := { "Archivos", "Partes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[03]
DEFINE BUTTON aBtns7[02] OF oBarra RESOURCE "Mod32" cBorde ;
ACTION SirseWin05b(oWindow) ;
MESSAGE "Mantenimiento a modelos de aparatos"
aBtns7[02] :cToolTip := { "Archivos", "Modelos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[04]
DEFINE BUTTON aBtns7[03] OF oBarra RESOURCE "Gps32" cBorde ;
ACTION SirseWin05c(oWindow) ;
MESSAGE "Mantenimiento a grupos de mano de obra"
aBtns7[03] :cToolTip := { "Archivos", "Grupos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[05]
DEFINE BUTTON aBtns7[04] OF oBarra RESOURCE "Mca32" cBorde ;
ACTION SirseWin05d(oWindow) ;
MESSAGE "Mantenimiento a marcas"
aBtns7[04] :cToolTip := { "Archivos", "Marcas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[06]
DEFINE BUTTON aBtns7[05] OF oBarra RESOURCE "Def32" cBorde ;
ACTION SirseWin05e(oWindow) ;
MESSAGE "Claves de defectos"
aBtns7[05] :cToolTip := { "Archivos", "Defectos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[07]
DEFINE BUTTON aBtns7[06] OF oBarra RESOURCE "Cli32" cBorde ;
ACTION SirseWin05f(oWindow) ;
MESSAGE "Clientes frecuentes"
aBtns7[06] :cToolTip := { "Archivos", "Clientes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[08]
DEFINE BUTTON aBtns7[07] OF oBarra RESOURCE "Tec32" cBorde ;
ACTION SirseWin05g(oWindow);
MESSAGE "Técnicos y empleados"
aBtns7[07] :cToolTip := { "Archivos", "Técnicos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[09]
DEFINE BUTTON aBtns7[08] OF oBarra RESOURCE "Pdu32" cBorde ;
ACTION SirseWin05h(oWindow);
MESSAGE "Porcentajes de utilidad"
aBtns7[08] :cToolTip := { "Archivos", "Porcentajes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[10]
DEFINE BUTTON aBtns7[09] OF oBarra RESOURCE "Tdo32" cBorde ;
ACTION SirseWin05i(oWindow);
MESSAGE "Tipos de órdenes"
aBtns7[09] :cToolTip := { "Archivos", "Tipos de órdenes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[11]
DEFINE BUTTON aBtns7[10] OF oBarra RESOURCE "Tdg32" cBorde ;
ACTION SirseWin05j(oWindow);
MESSAGE "Tipos de garantías"
aBtns7[10] :cToolTip := { "Archivos", "Tipos de garantías", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[12]
DEFINE BUTTON aBtns7[11] OF oBarra RESOURCE "Dia32" cBorde ;
ACTION SirseWin05k(oWindow);
MESSAGE "Manuales y diagramas"
aBtns7[11] :cToolTip := { "Archivos", "Manuales y diagramas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[13]
DEFINE BUTTON aBtns7[12] OF oBarra RESOURCE "Cfg32" cBorde ;
ACTION SirseWin05l(oWindow);
MESSAGE "Configurar el sistema"
aBtns7[12] :cToolTip := { "Archivos", "Configurar el sistema", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM8[01] .AND. aAblM8[02]
DEFINE BUTTON aBtns8[01] OF oBarra RESOURCE "Dsg32" cBorde ;
GROUP;
ACTION WaitRun(".\VRD.EXE");
MESSAGE "Diseñador de formatos"
aBtns8[01] :cToolTip := { "Soporte", "Diseñador", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
DEFINE BUTTON aBtns8[01] OF oBarra RESOURCE "Sal32" cBorde ;
GROUP;
ACTION oWindow:END( ) ;
MESSAGE "Salir de la aplicación"
aBtns8[01] :cToolTip := { "Salir de la aplicación", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
RETURN ( .T. )
Code: Select all | Expand
STATIC FUNCTION LaBarra( oWindow )
LOCAL oBarra
LOCAL oCursor
DEFINE CURSOR oCursor RESOURCE "Dedo"
DEFINE BUTTONBAR oBarra SIZE 45, 45 OF oWindow CURSOR oCursor 2007
oBarra:bClrGrad = { | lInvert | IF( ! lInvert, ;
{ { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) }, ;
{ 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } }, ;
{ { 0.50, nRGB( 139, 166, 193 ), nRGB( 69, 119, 170 ) }, ;
{ 0.50, nRGB( 52, 104, 152 ), nRGB( 50, 107, 162 ) } } ) }
oBarra:nClrText = nRGB( 255, 255, 255 )
* -----------------------------------------------------------------------------*
IF aAblM1[01] .AND. aAblM1[02]
DEFINE BUTTON aBtns1[01] OF oBarra RESOURCE "Rec32" cBorde ;
ACTION SirseWin01a(oWindow);
MESSAGE "Registro e impresión de facturas"
aBtns1[01] :cToolTip := { "Registro de facturas", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[03]
DEFINE BUTTON aBtns1[02] OF oBarra RESOURCE "Cos32" cBorde ;
ACTION SirseWin01b(oWindow);
MESSAGE "Consultar órdenes de servicio"
aBtns1[02] :cToolTip := { "Consultar órdenes", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[04]
DEFINE BUTTON aBtns1[03] OF oBarra RESOURCE "Rep32" cBorde ;
ACTION SirseWin01c(oWindow);
MESSAGE "Asignar reparación"
aBtns1[03] :cToolTip := { "Asignar reparación", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[05]
DEFINE BUTTON aBtns1[04] OF oBarra RESOURCE "Pdr32" cBorde ;
ACTION SirseWin01d(oWindow);
MESSAGE "Reporte de órdenes pendientes de reparar"
aBtns1[04] :cToolTip := { "Reporte de pendientes de reparar", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[06]
DEFINE BUTTON aBtns1[05] OF oBarra RESOURCE "Rne32" cBorde ;
ACTION SirseWin01e(oWindow);
MESSAGE "Reporte de órdenes reparadas pendientes de entregar"
aBtns1[05] :cToolTip := { "Reporte de reparadas no entregadas", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM1[01] .AND. aAblM1[07]
DEFINE BUTTON aBtns1[06] OF oBarra RESOURCE "Pre32" cBorde ;
ACTION SirseWin01f(oWindow);
MESSAGE "Elaborar e imprimir prespuestos"
aBtns1[06] :cToolTip := { "Presupuestos", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM2[01] .AND. aAblM2[02]
DEFINE BUTTON aBtns2[01] OF oBarra RESOURCE "Vdr32" cBorde ;
GROUP;
ACTION SirseWin02a(oWindow);
MESSAGE "Venta de refacciones"
aBtns2[01] :cToolTip := { "Venta de refacciones", "Ventas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM2[01] .AND. aAblM2[03]
DEFINE BUTTON aBtns2[02] OF oBarra RESOURCE "Ddv32" cBorde ;
ACTION SirseWin02b(oWindow);
MESSAGE "Reporte diario de ventas"
aBtns2[02] :cToolTip := { "Diario de ventas", "Ventas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM4[01] .AND. aAblM4[02]
DEFINE BUTTON aBtns4[01] OF oBarra RESOURCE "Vda32" cBorde ;
GROUP;
ACTION SirseWin03a(oWindow);
MESSAGE "Vales de almacén"
aBtns4[01] :cToolTip := { "Movimientos de almacén", "Inventario", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM4[01] .AND. aAblM4[03]
DEFINE BUTTON aBtns4[02] OF oBarra RESOURCE "Edm32" cBorde ;
ACTION SirseWin03b(oWindow);
MESSAGE "Estadistico de movimientos"
aBtns4[02] :cToolTip := { "Estadistico de movimientos", "Inventario", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM6[01] .AND. aAblM6[02]
DEFINE BUTTON aBtns6[01] OF oBarra RESOURCE "Com32" cBorde ;
GROUP;
ACTION SirseWin04a(oWindow);
MESSAGE "Reporte para pago de comisiones"
aBtns6[01] :cToolTip := { "Reporte para pagar comisiones", "Comisiones", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM7[01] .AND. aAblM7[02]
DEFINE BUTTON aBtns7[01] OF oBarra RESOURCE "Par32" cBorde ;
GROUP;
ACTION SirseWin05a(oWindow) ;
MESSAGE "Mantenimiento a partes"
aBtns7[01] :cToolTip := { "Archivos", "Partes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[03]
DEFINE BUTTON aBtns7[02] OF oBarra RESOURCE "Mod32" cBorde ;
ACTION SirseWin05b(oWindow) ;
MESSAGE "Mantenimiento a modelos de aparatos"
aBtns7[02] :cToolTip := { "Archivos", "Modelos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[04]
DEFINE BUTTON aBtns7[03] OF oBarra RESOURCE "Gps32" cBorde ;
ACTION SirseWin05c(oWindow) ;
MESSAGE "Mantenimiento a grupos de mano de obra"
aBtns7[03] :cToolTip := { "Archivos", "Grupos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[05]
DEFINE BUTTON aBtns7[04] OF oBarra RESOURCE "Mca32" cBorde ;
ACTION SirseWin05d(oWindow) ;
MESSAGE "Mantenimiento a marcas"
aBtns7[04] :cToolTip := { "Archivos", "Marcas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[06]
DEFINE BUTTON aBtns7[05] OF oBarra RESOURCE "Def32" cBorde ;
ACTION SirseWin05e(oWindow) ;
MESSAGE "Claves de defectos"
aBtns7[05] :cToolTip := { "Archivos", "Defectos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[07]
DEFINE BUTTON aBtns7[06] OF oBarra RESOURCE "Cli32" cBorde ;
ACTION SirseWin05f(oWindow) ;
MESSAGE "Clientes frecuentes"
aBtns7[06] :cToolTip := { "Archivos", "Clientes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[08]
DEFINE BUTTON aBtns7[07] OF oBarra RESOURCE "Tec32" cBorde ;
ACTION SirseWin05g(oWindow);
MESSAGE "Técnicos y empleados"
aBtns7[07] :cToolTip := { "Archivos", "Técnicos", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[09]
DEFINE BUTTON aBtns7[08] OF oBarra RESOURCE "Pdu32" cBorde ;
ACTION SirseWin05h(oWindow);
MESSAGE "Porcentajes de utilidad"
aBtns7[08] :cToolTip := { "Archivos", "Porcentajes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[10]
DEFINE BUTTON aBtns7[09] OF oBarra RESOURCE "Tdo32" cBorde ;
ACTION SirseWin05i(oWindow);
MESSAGE "Tipos de órdenes"
aBtns7[09] :cToolTip := { "Archivos", "Tipos de órdenes", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[11]
DEFINE BUTTON aBtns7[10] OF oBarra RESOURCE "Tdg32" cBorde ;
ACTION SirseWin05j(oWindow);
MESSAGE "Tipos de garantías"
aBtns7[10] :cToolTip := { "Archivos", "Tipos de garantías", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[12]
DEFINE BUTTON aBtns7[11] OF oBarra RESOURCE "Dia32" cBorde ;
ACTION SirseWin05k(oWindow);
MESSAGE "Manuales y diagramas"
aBtns7[11] :cToolTip := { "Archivos", "Manuales y diagramas", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
IF aAblM7[01] .AND. aAblM7[13]
DEFINE BUTTON aBtns7[12] OF oBarra RESOURCE "Cfg32" cBorde ;
ACTION SirseWin05l(oWindow);
MESSAGE "Configurar el sistema"
aBtns7[12] :cToolTip := { "Archivos", "Configurar el sistema", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
IF aAblM8[01] .AND. aAblM8[02]
DEFINE BUTTON aBtns8[01] OF oBarra RESOURCE "Dsg32" cBorde ;
GROUP;
ACTION WaitRun(".\VRD.EXE");
MESSAGE "Diseñador de formatos"
aBtns8[01] :cToolTip := { "Soporte", "Diseñador", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
ENDIF
* -----------------------------------------------------------------------------*
DEFINE BUTTON aBtns8[01] OF oBarra RESOURCE "Sal32" cBorde ;
GROUP;
ACTION oWindow:END( ) ;
MESSAGE "Salir de la aplicación"
aBtns8[01] :cToolTip := { "Salir de la aplicación", "Servicio", nIcono, oApp:cClrForTol, oApp:cClrBakTol }
RETURN ( .T. )
Code: Select all | Expand
IF aAblM7[01] .AND. aAblM7[04]
DEFINE BUTTON aBtns7[03] OF oBarra RESOURCE "Gps32" cBorde ;
ACTION SirseWin05c(oWindow) ;
MESSAGE "Mantenimiento a grupos de mano de obra"
aBtns7[03] :cToolTip := { "Archivos", "Grupos", nIcono, oApp:cClrForTol, oApp:cClrBakTol } // Línea 529
ENDIF
Code: Select all | Expand
IF aAblM7[01] .AND. aAblM7[04]
DEFINE BUTTON aBtns7[03] OF oBarra RESOURCE "Gps32" cBorde ;
ACTION SirseWin05c(oWindow) ;
MESSAGE "Mantenimiento a grupos de mano de obra"
aBtns7[03] :cToolTip := { "Archivos", "Grupos", nIcono, oApp:cClrForTol, oApp:cClrBakTol } // Línea 529
ENDIF
Code: Select all | Expand
STATIC FUNCTION LaBarra( oWindow )
LOCAL oBarra
LOCAL oCursor
DEFINE CURSOR oCursor RESOURCE "Dedo"
DEFINE BUTTONBAR oBarra SIZE 45, 45 OF oWindow CURSOR oCursor 2007
oBarra:bClrGrad = { | lInvert | IF( ! lInvert, ;
{ { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) }, ;
{ 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } }, ;
{ { 0.50, nRGB( 139, 166, 193 ), nRGB( 69, 119, 170 ) }, ;
{ 0.50, nRGB( 52, 104, 152 ), nRGB( 50, 107, 162 ) } } ) }
oBarra:nClrText = nRGB( 255, 255, 255 )
Code: Select all | Expand
ACTIVATE WINDOW oWindow MAXIMIZED ON INIT ( LaBarra( oWindow ), oWindow:Refresh( ) ) VALID Salir()
Code: Select all | Expand
STATIC FUNCTION LaBarra( oWindow )
LOCAL oBarra
LOCAL oCursor
DEFINE CURSOR oCursor RESOURCE "Dedo"
DEFINE BUTTONBAR oBarra SIZE 45, 45 OF oWindow CURSOR oCursor 2007
oBarra:bClrGrad = { | lInvert | IF( ! lInvert, ;
{ { 0.50, nRGB( 178, 187, 202 ), nRGB( 137, 155, 179 ) }, ;
{ 0.50, nRGB( 129, 149, 174 ), nRGB( 114, 132, 156 ) } }, ;
{ { 0.50, nRGB( 139, 166, 193 ), nRGB( 69, 119, 170 ) }, ;
{ 0.50, nRGB( 52, 104, 152 ), nRGB( 50, 107, 162 ) } } ) }
oBarra:nClrText = nRGB( 255, 255, 255 )
Code: Select all | Expand
ACTIVATE WINDOW oWindow MAXIMIZED ON INIT ( LaBarra( oWindow ), oWindow:Refresh( ) ) VALID Salir()
Code: Select all | Expand
STATIC FUNCTION Salir( )
IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) // + " " + oApp:cVersion)
SET RESOURCES TO
WinHelp( GetHelpFile( ), 2 )
MEMORY( - 1 )
oApp:oCon:Close( )
oWindow:oBar:End()
CheckRes()
RETURN ( .T. )
ELSE
RETURN ( .F. )
ENDIF
RETURN ( .F. )
Code: Select all | Expand
STATIC FUNCTION Salir( )
IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) // + " " + oApp:cVersion)
SET RESOURCES TO
WinHelp( GetHelpFile( ), 2 )
MEMORY( - 1 )
oApp:oCon:Close( )
oWindow:oBar:End()
CheckRes()
RETURN ( .T. )
ELSE
RETURN ( .F. )
ENDIF
RETURN ( .F. )
Code: Select all | Expand
STATIC FUNCTION Salir( )
IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) // + " " + oApp:cVersion)
SET RESOURCES TO
WinHelp( GetHelpFile( ), 2 )
MEMORY( - 1 )
oApp:oCon:Close( )
AEval( oWindow:oBar:aControls, { | oCtrl | oCtrl:End() } )
CheckRes()
RETURN ( .T. )
ELSE
RETURN ( .F. )
ENDIF
RETURN ( .F. )
Code: Select all | Expand
STATIC FUNCTION Salir( )
IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) // + " " + oApp:cVersion)
SET RESOURCES TO
WinHelp( GetHelpFile( ), 2 )
MEMORY( - 1 )
oApp:oCon:Close( )
AEval( oWindow:oBar:aControls, { | oCtrl | oCtrl:End() } )
CheckRes()
RETURN ( .T. )
ELSE
RETURN ( .F. )
ENDIF
RETURN ( .F. )
Code: Select all | Expand
STATIC FUNCTION Salir( )
IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) // + " " + oApp:cVersion)
// FONTES aqui:
// RELEASE BRUSH oBrush
// RELEASE FONT oFont
DbCommitAll()
DbUnLockAll()
DbCloseAll()
FreeResources() // SET RESOURCES TO
Release All
SysRefresh()
HB_GCALL( .T. ) // .T. -> Forca a limpeza de lixo(basuras).
CLEAR MEMORY
WinHelp( GetHelpFile(), 2 )
// MEMORY( - 1 ) // ESTO NO FUNCIONA MAS
oApp:oCon:Close( ) // ??
oWindow:oBar:End() // ???
// oWnd:End() // ??
IF FILE( "checkres.txt" )
FErase( "checkres.txt" )
ENDIF
CheckRes()
PostQuitMessage( 0 )
QUIT
RETURN ( .T. )
ELSE
RETURN ( .F. )
ENDIF
RETURN( .F. )
Code: Select all | Expand
STATIC FUNCTION Salir( )
IF MsgNoYes( "Seguro desea salir de la aplicación ?", oApp:cAplicacion) // + " " + oApp:cVersion)
// FONTES aqui:
// RELEASE BRUSH oBrush
// RELEASE FONT oFont
DbCommitAll()
DbUnLockAll()
DbCloseAll()
FreeResources() // SET RESOURCES TO
Release All
SysRefresh()
HB_GCALL( .T. ) // .T. -> Forca a limpeza de lixo(basuras).
CLEAR MEMORY
WinHelp( GetHelpFile(), 2 )
// MEMORY( - 1 ) // ESTO NO FUNCIONA MAS
oApp:oCon:Close( ) // ??
oWindow:oBar:End() // ???
// oWnd:End() // ??
IF FILE( "checkres.txt" )
FErase( "checkres.txt" )
ENDIF
CheckRes()
PostQuitMessage( 0 )
QUIT
RETURN ( .T. )
ELSE
RETURN ( .F. )
ENDIF
RETURN( .F. )
Code: Select all | Expand
#include "FiveWin.ch"
static oWebView
function Main( ... )
local oWnd, cResult, Btn_Div, Btn_Sal
Local aParams := hb_aParams() //recuperamos parametros
Local cIdenti := space(0)
Local cDian := space(0)
Local cInfo := space(0)
Local hConvierte := hash()
Local hDatos := hash()
Local lCapturado := .F.
Local cbRecuperainfo := <|cJson|
hb_jsondecode(cJson ,@hConvierte )
if hConvierte[1]
lCapturado := .T.
hDatos["tipo_tercero"] := hConvierte[2]
hDatos["tercero"] := hConvierte[3]
hDatos["estado"] := hConvierte[4]
hDatos["dv"] := hConvierte[5]
if hConvierte[2]=="NIT"
hDatos["razon_social"] := hConvierte[6]
else
hDatos["primer_nombre"] := hConvierte[6]
hDatos["segundo_nombre"] := hConvierte[7]
hDatos["primer_apellido"] := hConvierte[8]
hDatos["segundo_apellido"] := hConvierte[9]
endif
else
lCapturado := .F.
endif
oWnd:End()
>
Local hInfo := {=>}
Local cFec := dtos(date())
Local cTim := strtran(subs(time(),1,8),":","")
Local cRutaJson := "elnombredeljsonconlainfo.json"
Local cDevuelveInfo := <||
hInfo["capturado"] := lCapturado
hInfo["datos"] := hDatos
memowrit( cRutaJson , hb_jsonEncode( hInfo ) ,.F.)
>
if len(aParams)>0
cIdenti := alltrim(aParams[1])
cDian := "consultaDIAN( '"+cIdenti+"' )"
TEXT INTO cResult
var inputEstado = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado');
if (inputEstado) {
var inputNIT = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit');
var cNit = inputNIT.value;
if(cNit.length==9){
[ true,'NIT',document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit' ).value,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:dv' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:razonSocial' ).innerHTML ]
}else{
[ true,'OTRO',document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit' ).value,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:dv' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:primerNombre' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:otrosNombres' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:primerApellido' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:segundoApellido' ).innerHTML ]
}
} else {
[false]
}
ENDTEXT
DEFINE WINDOW oWnd TITLE "Consultar estado NIT plataforma DIAN " SIZE 830, 700 PIXEL ICON ".\res\favicon-48x48.ico"
oWebView = TWebView2():New( oWnd )
//oWebView:bOnNavigationCompleted = { | cUrl, hWebView | If( "sessionid" $ cUrl, oWebView:Eval( cResult ),) }
oWebView:Navigate( "https://muisca.dian.gov.co/WebRutMuisca/DefConsultaEstadoRUT.faces" )
oWebView:InjectJavascript( JavaScript() )
//oWebView:OpenDevToolsWindow()
oWebView:bOnEval = { | cJson, hWebView | If( cJson != "null" .and. cJson != "{}", EVAL( cbRecuperainfo,cJson ),) }
oWebView:Eval( cDian )
@ oWnd:nHeight-80, 15 BUTTONBMP Btn_Sal OF oWnd PIXEL size 110, 26 PROMPT "Cancelar" TOOLTIP "Cerrar Ventana" ;
RESOURCE ".\res\icon-blue-dark-cerrar-big-16x16.png" TEXTRIGHT ACTION ( lCapturado := .F., oWnd:End() )
@ oWnd:nHeight-80, 80 BUTTONBMP Btn_Div OF oWnd PIXEL size 110, 26 PROMPT "Capturar" TOOLTIP "Capturar datos" ;
RESOURCE ".\res\icon-blue-dark-check-big-16x16.png" TEXTRIGHT ACTION (lCapturado := .T.,oWebView:Eval( cResult ))
ACTIVATE WINDOW oWnd CENTER ;
ON RESIZE (oWebView:SetSize( oWnd:nWidth, oWnd:nHeight-100 ), Btn_Div:nTop := oWnd:nHeight-80,;
Btn_Div:nLeft := oWnd:nHeight-10 ,Btn_Sal:nTop := oWnd:nHeight-80, Btn_Sal:nLeft := oWnd:nHeight-130 ) ;
VALID (EVAL(cDevuelveInfo),.T.)
oWebView:End()
else
lCapturado := .F.
EVAL(cDevuelveInfo)
//msginfo("no vienen los parametros")
endif
return nil
function Javascript()
local cCode
TEXT INTO cCode
function consultaDIAN( numeroIdentificacion )
{
var inputNIT = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit');
if (inputNIT) {
inputNIT.value = numeroIdentificacion;
} else {
console.error('No se encontró el campo de entrada para el NIT');
return;
}
}
ENDTEXT
return cCode
Code: Select all | Expand
#include "FiveWin.ch"
static oWebView
function Main( ... )
local oWnd, cResult, Btn_Div, Btn_Sal
Local aParams := hb_aParams() //recuperamos parametros
Local cIdenti := space(0)
Local cDian := space(0)
Local cInfo := space(0)
Local hConvierte := hash()
Local hDatos := hash()
Local lCapturado := .F.
Local cbRecuperainfo := <|cJson|
hb_jsondecode(cJson ,@hConvierte )
if hConvierte[1]
lCapturado := .T.
hDatos["tipo_tercero"] := hConvierte[2]
hDatos["tercero"] := hConvierte[3]
hDatos["estado"] := hConvierte[4]
hDatos["dv"] := hConvierte[5]
if hConvierte[2]=="NIT"
hDatos["razon_social"] := hConvierte[6]
else
hDatos["primer_nombre"] := hConvierte[6]
hDatos["segundo_nombre"] := hConvierte[7]
hDatos["primer_apellido"] := hConvierte[8]
hDatos["segundo_apellido"] := hConvierte[9]
endif
else
lCapturado := .F.
endif
oWnd:End()
>
Local hInfo := {=>}
Local cFec := dtos(date())
Local cTim := strtran(subs(time(),1,8),":","")
Local cRutaJson := "elnombredeljsonconlainfo.json"
Local cDevuelveInfo := <||
hInfo["capturado"] := lCapturado
hInfo["datos"] := hDatos
memowrit( cRutaJson , hb_jsonEncode( hInfo ) ,.F.)
>
if len(aParams)>0
cIdenti := alltrim(aParams[1])
cDian := "consultaDIAN( '"+cIdenti+"' )"
TEXT INTO cResult
var inputEstado = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado');
if (inputEstado) {
var inputNIT = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit');
var cNit = inputNIT.value;
if(cNit.length==9){
[ true,'NIT',document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit' ).value,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:dv' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:razonSocial' ).innerHTML ]
}else{
[ true,'OTRO',document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit' ).value,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:estado' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:dv' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:primerNombre' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:otrosNombres' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:primerApellido' ).innerHTML,
document.getElementById( 'vistaConsultaEstadoRUT:formConsultaEstadoRUT:segundoApellido' ).innerHTML ]
}
} else {
[false]
}
ENDTEXT
DEFINE WINDOW oWnd TITLE "Consultar estado NIT plataforma DIAN " SIZE 830, 700 PIXEL ICON ".\res\favicon-48x48.ico"
oWebView = TWebView2():New( oWnd )
//oWebView:bOnNavigationCompleted = { | cUrl, hWebView | If( "sessionid" $ cUrl, oWebView:Eval( cResult ),) }
oWebView:Navigate( "https://muisca.dian.gov.co/WebRutMuisca/DefConsultaEstadoRUT.faces" )
oWebView:InjectJavascript( JavaScript() )
//oWebView:OpenDevToolsWindow()
oWebView:bOnEval = { | cJson, hWebView | If( cJson != "null" .and. cJson != "{}", EVAL( cbRecuperainfo,cJson ),) }
oWebView:Eval( cDian )
@ oWnd:nHeight-80, 15 BUTTONBMP Btn_Sal OF oWnd PIXEL size 110, 26 PROMPT "Cancelar" TOOLTIP "Cerrar Ventana" ;
RESOURCE ".\res\icon-blue-dark-cerrar-big-16x16.png" TEXTRIGHT ACTION ( lCapturado := .F., oWnd:End() )
@ oWnd:nHeight-80, 80 BUTTONBMP Btn_Div OF oWnd PIXEL size 110, 26 PROMPT "Capturar" TOOLTIP "Capturar datos" ;
RESOURCE ".\res\icon-blue-dark-check-big-16x16.png" TEXTRIGHT ACTION (lCapturado := .T.,oWebView:Eval( cResult ))
ACTIVATE WINDOW oWnd CENTER ;
ON RESIZE (oWebView:SetSize( oWnd:nWidth, oWnd:nHeight-100 ), Btn_Div:nTop := oWnd:nHeight-80,;
Btn_Div:nLeft := oWnd:nHeight-10 ,Btn_Sal:nTop := oWnd:nHeight-80, Btn_Sal:nLeft := oWnd:nHeight-130 ) ;
VALID (EVAL(cDevuelveInfo),.T.)
oWebView:End()
else
lCapturado := .F.
EVAL(cDevuelveInfo)
//msginfo("no vienen los parametros")
endif
return nil
function Javascript()
local cCode
TEXT INTO cCode
function consultaDIAN( numeroIdentificacion )
{
var inputNIT = document.getElementById('vistaConsultaEstadoRUT:formConsultaEstadoRUT:numNit');
if (inputNIT) {
inputNIT.value = numeroIdentificacion;
} else {
console.error('No se encontró el campo de entrada para el NIT');
return;
}
}
ENDTEXT
return cCode
Code: Select all | Expand
oLbxFoto:bChange:={|| (IIf( File(DBFUN:Foto),oImage:SetSource(DBFUN:Foto), oImage:SetSource(rfemp+"0.JPG")) ) }
Code: Select all | Expand
oLbxFoto:bChange:={|| (IIf( File(DBFUN:Foto),oImage:SetSource(DBFUN:Foto), oImage:SetSource(rfemp+"0.JPG")) ) }
Code: Select all | Expand
#ifdef __XHARBOUR__ // FUNCIONA PERFECTO!
STRUCTURE oCep // "hbstruct.ch"
Member lFound INIT .F.
Member cNome, cCompl, cBair, cCid, cUf
Member cTipo
ENDSTRUCTURE
#else
// ESTO NO FUNCIONA EM HARBOUR, NO ENTENDI? COMO HAGO?
STRUCTURE oCep
Member lFound INIT .F.
Member cNome, cCompl, cBair, cCid, cUf
Member cTipo
ENDSTRUCTURE
#endif
Code: Select all | Expand
#ifdef __XHARBOUR__ // FUNCIONA PERFECTO!
STRUCTURE oCep // "hbstruct.ch"
Member lFound INIT .F.
Member cNome, cCompl, cBair, cCid, cUf
Member cTipo
ENDSTRUCTURE
#else
// ESTO NO FUNCIONA EM HARBOUR, NO ENTENDI? COMO HAGO?
STRUCTURE oCep
Member lFound INIT .F.
Member cNome, cCompl, cBair, cCid, cUf
Member cTipo
ENDSTRUCTURE
#endif
Code: Select all | Expand
// C:\FWH\SAMPLES\VIACEP02.PRG - SOMENTE XHABROUR POR ENQUANTO.
#include "Directry.ch"
#include "FiveWin.ch"
#include "hbstruct.ch" // Only xHarbour.
REQUEST HB_LANG_PT, HB_CODEPAGE_PTISO, HB_CODEPAGE_PT850
STATIC lTiraAcento := .T.
FUNCTION Main()
LOCAL cCep := "01330-000"
// FW_SetUnicode( .T. ) // NAO ADIANTOU
HB_LANGSELECT( 'PT' ) // Default language is now Portuguese
HB_SETCODEPAGE( "PT850" )
HB_CDPSELECT( "PTISO" )
// SET(_SET_CODEPAGE,"CP850")
// BASTA POR UM DIALOGO AQUI, PARA PESQUISAR O CEP.
ViaCep( cCep )
RETURN NIL
FUNCTION ViaCep( cCep )
LOCAL cLink := "http://viacep.com.br/ws/<<CEP>>/xml/"
LOCAL oOle, cXml, oCep, oXml, oTag// ,bError
#ifdef __XHARBOUR__
STRUCTURE oCep // "hbstruct.ch"
Member lFound INIT .F.
Member cNome, cCompl, cBair, cCid, cUf
Member cTipo
ENDSTRUCTURE
#else
// ISTO NAO FUNCIONA EM HARBOUR, NAO ENTENDI????
STRUCTURE oCep
Member lFound INIT .F.
Member cNome, cCompl, cBair, cCid, cUf
Member cTipo
ENDSTRUCTURE
#endif
IF Empty( cCep ); RETURN oCep; ENDIF
cCep := StrTran( cCep, ' ', '' )
IF Len( cCep ) < 8; RETURN oCep; ENDIF
cLink := StrTran( cLink, "<<CEP>>", cCep )
#ifdef __XHARBOUR__
Try
Try
oOle := CreateObject( 'Microsoft.XMLHTTP' )
Catch
oOle := CreateObject( 'MSXML2.XMLHTTP' )
End
oOle:Open("GET",cLink,.F.)
oOle:Send()
If oOle:STATUS != 200
BREAK
Endif
cXml := oOle:ResponseBody
oOle := nil
Catch
MsgInfo( 'Erro na Criação do Serviço' )
RETURN NIL
End
#else
Try
Try
oOle := win_OleCreateObject( 'MSXML2.XMLHTTP' )
Catch
oOle := win_OleCreateObject( 'Microsoft.XMLHTTP' )
End
oOle:Open("GET",cLink,.F.)
oOle:Send()
If oOle:STATUS != 200
BREAK
Endif
cXml := oOle:ResponseBody
oOle := nil
Catch
MsgInfo( 'Erro na Criação do Serviço! Com Harbour', 'Atenção!' )
RETURN NIL
End
#endif
// verifica se não encontrou o cep atraves tag "erro"
oXml := TXmlDocument():New(cXml)
oTag := oXml:findFirst("erro") //<erro>true</erro>
//Este erro so pega se o CEP tiver 8 digitos
If .NOT. Empty(oTag) .AND. oTag:cData == "true"
BREAK
Endif
// #ifdef __XHARBOUR__
oCep:lFound := .T. // NAO FUNCIONA COM HARBOUR
// #endif
oTag := oXml:findFirst("logradouro")
oCep:cNome := IIF(Empty(oTag),'',oTag:cData) //HtmlToOem(oTag:cData))
// oCep:cNome := HtmlToOeM(oCep:cNome)
// oCep:cNome := HB_Translate(oCep:cNome,"UTF8","PT850")
oCep:cNome := FW_UTF8PADCHAR(oCep:cNome,60)
oCep:cNome := Upper(oCep:cNome)
If At("AVENIDA",oCep:cNome) > 0
oCep:cTipo := "AV:"
oCep:cNome := StrTran(Upper(oCep:cNome),"AVENIDA ",'')
Endif
If At("RUA",oCep:cNome) > 0
oCep:cTipo := "RUA"
oCep:cNome := StrTran(Upper(oCep:cNome),"RUA ",'')
Endif
If At("PRAÇA",oCep:cNome) > 0
oCep:cTipo := "PC:"
oCep:cNome := StrTran(Upper(oCep:cNome),"PRAÇA ",'')
Endif
If At("TRAVESSA",oCep:cNome) > 0
oCep:cTipo := "TV:"
oCep:cNome := StrTran(Upper(oCep:cNome),"TRAVESSA ",'')
Endif
If At("ALAMEDA",oCep:cNome) > 0
oCep:cTipo := "AL:"
oCep:cNome := StrTran(Upper(oCep:cNome),"ALAMEDA ",'')
Endif
// ASSIM NAO FUNCIONA
// oCep:cNome := oCep:cNome:RemoveAcentos():Upper()
oCep:cNome := RemoveAcentos( oCep:cNome )
// oCep:cNome := SubStr(oCep:cNome,1,40) //ERRO TABCEP 60 E NO CADASTRO 40
// oTag := oXml:findFirst("complemento")
// oCep:cCompl := IIF(Empty(oTag),'',oTag:cData) //UPPER DA ERRO SE VAZIO
oTag := oXml:findFirst("bairro")
oCep:cBair := IIF(Empty(oTag),'',oTag:cData)
oCep:cBair := FW_UTF8PADCHAR(oCep:cBair,30)
oCep:cBair := Upper(oCep:cBair)
oCep:cBair := PadL(Upper(oCep:cBair),30)
oCep:cBair := PadL(Upper(oCep:cBair),30)
// oCep:cBair := oCep:cBair:RemoveAcentos():Upper()
oCep:cBair := RemoveAcentos( oCep:cBair )
// oCep:cBair := Upper(oCep:cBair)
// Alert(Asc(SubStr(oCep:cBair,Len(oCep:cBair)-1)))
oCep:cCompl := IIF(Empty(oTag),'',oTag:cData)
oCep:cCompl:= UPPER( oCep:cCompl ) // AGORA SIM, PERFEITO! POHHA. KKKK
oTag := oXml:findFirst("localidade")
oCep:cCid := IIF(Empty(oTag),'',oTag:cData)
oCep:cCid := FW_UTF8PADCHAR( oCep:cCid,30)
oCep:cCid := Upper(oCep:cCid)
oCep:cCid := PadL(oCep:cCid,30)
// ASSIM NAO FUNCIONA - NAO ENTENDI ESSA LOGICA.
// oCep:cCid := oCep:cCid:RemoveAcentos():Upper() // ????
oCep:cCid := RemoveAcentos( oCep:cCid ) // NAO USAR UPPER JUMA!
oTag := oXml:findFirst("uf")
oCep:cUf := IIF(Empty(oTag),Space(2),oTag:cData)
xBrowse( oCep )
RETURN oCep
FUNCTION RemoveAcentos(cText)
cText := strtran(cText,'á','a')
cText := strtran(cText,'é','e')
cText := strtran(cText,'í','i')
cText := strtran(cText,'ó','o')
cText := strtran(cText,'ú','u')
cText := strtran(cText,'Á','A')
cText := strtran(cText,'à','A') // 224
cText := strtran(cText,'á','A') // 225
cText := strtran(cText,'â','A') // 226
cText := strtran(cText,'ã','A') // 227
cText := strtran(cText,'ä','A') // 228
cText := strtran(cText,'å','A') // 229
cText := strtran(cText,"Æ",'A')
cText := strtran(cText,"Â",'A')
cText := strtran(cText,"µ",'A')
cText := strtran(cText,"…",'A')
cText := strtran(cText,"·",'A')
cText := strtran(cText,"ƒ",'A') // 131 ?
cText := strtran(cText,"„",'A') // 132 ?
cText := strtran(cText,"…",'A') // 133 ?
cText := strtran(cText,"†",'A') // 134 ?
cText := strtran(cText,'À','A')
cText := strtran(cText,'Ã','A') // AQUI - SÆO PAULO
cText := strtran(cText,"£",'') // Ã £ AQUI METO UM BRANCO - YES!
cText := strtran(cText,'É','E')
cText := strtran(cText,'Í','I')
cText := strtran(cText,'Ó','O')
cText := strtran(cText,'Ú','U')
cText := strtran(cText,'Ô','O')
cText := strtran(cText,'Ò','O')
cText := strtran(cText,'Ö','O')
cText := strtran(cText,'ä','a')
cText := strtran(cText,'â','a')
cText := strtran(cText,'ã','a')
cText := strtran(cText,'å','a')
cText := strtran(cText,'ê','a')
cText := strtran(cText,'ë','a')
cText := strtran(cText,'ç','c')
cText := strtran(cText,'Ç','C')
RETURN( cText )
// FIN / END
Code: Select all | Expand
// C:\FWH\SAMPLES\VIACEP02.PRG - SOMENTE XHABROUR POR ENQUANTO.
#include "Directry.ch"
#include "FiveWin.ch"
#include "hbstruct.ch" // Only xHarbour.
REQUEST HB_LANG_PT, HB_CODEPAGE_PTISO, HB_CODEPAGE_PT850
STATIC lTiraAcento := .T.
FUNCTION Main()
LOCAL cCep := "01330-000"
// FW_SetUnicode( .T. ) // NAO ADIANTOU
HB_LANGSELECT( 'PT' ) // Default language is now Portuguese
HB_SETCODEPAGE( "PT850" )
HB_CDPSELECT( "PTISO" )
// SET(_SET_CODEPAGE,"CP850")
// BASTA POR UM DIALOGO AQUI, PARA PESQUISAR O CEP.
ViaCep( cCep )
RETURN NIL
FUNCTION ViaCep( cCep )
LOCAL cLink := "http://viacep.com.br/ws/<<CEP>>/xml/"
LOCAL oOle, cXml, oCep, oXml, oTag// ,bError
#ifdef __XHARBOUR__
STRUCTURE oCep // "hbstruct.ch"
Member lFound INIT .F.
Member cNome, cCompl, cBair, cCid, cUf
Member cTipo
ENDSTRUCTURE
#else
// ISTO NAO FUNCIONA EM HARBOUR, NAO ENTENDI????
STRUCTURE oCep
Member lFound INIT .F.
Member cNome, cCompl, cBair, cCid, cUf
Member cTipo
ENDSTRUCTURE
#endif
IF Empty( cCep ); RETURN oCep; ENDIF
cCep := StrTran( cCep, ' ', '' )
IF Len( cCep ) < 8; RETURN oCep; ENDIF
cLink := StrTran( cLink, "<<CEP>>", cCep )
#ifdef __XHARBOUR__
Try
Try
oOle := CreateObject( 'Microsoft.XMLHTTP' )
Catch
oOle := CreateObject( 'MSXML2.XMLHTTP' )
End
oOle:Open("GET",cLink,.F.)
oOle:Send()
If oOle:STATUS != 200
BREAK
Endif
cXml := oOle:ResponseBody
oOle := nil
Catch
MsgInfo( 'Erro na Criação do Serviço' )
RETURN NIL
End
#else
Try
Try
oOle := win_OleCreateObject( 'MSXML2.XMLHTTP' )
Catch
oOle := win_OleCreateObject( 'Microsoft.XMLHTTP' )
End
oOle:Open("GET",cLink,.F.)
oOle:Send()
If oOle:STATUS != 200
BREAK
Endif
cXml := oOle:ResponseBody
oOle := nil
Catch
MsgInfo( 'Erro na Criação do Serviço! Com Harbour', 'Atenção!' )
RETURN NIL
End
#endif
// verifica se não encontrou o cep atraves tag "erro"
oXml := TXmlDocument():New(cXml)
oTag := oXml:findFirst("erro") //<erro>true</erro>
//Este erro so pega se o CEP tiver 8 digitos
If .NOT. Empty(oTag) .AND. oTag:cData == "true"
BREAK
Endif
// #ifdef __XHARBOUR__
oCep:lFound := .T. // NAO FUNCIONA COM HARBOUR
// #endif
oTag := oXml:findFirst("logradouro")
oCep:cNome := IIF(Empty(oTag),'',oTag:cData) //HtmlToOem(oTag:cData))
// oCep:cNome := HtmlToOeM(oCep:cNome)
// oCep:cNome := HB_Translate(oCep:cNome,"UTF8","PT850")
oCep:cNome := FW_UTF8PADCHAR(oCep:cNome,60)
oCep:cNome := Upper(oCep:cNome)
If At("AVENIDA",oCep:cNome) > 0
oCep:cTipo := "AV:"
oCep:cNome := StrTran(Upper(oCep:cNome),"AVENIDA ",'')
Endif
If At("RUA",oCep:cNome) > 0
oCep:cTipo := "RUA"
oCep:cNome := StrTran(Upper(oCep:cNome),"RUA ",'')
Endif
If At("PRAÇA",oCep:cNome) > 0
oCep:cTipo := "PC:"
oCep:cNome := StrTran(Upper(oCep:cNome),"PRAÇA ",'')
Endif
If At("TRAVESSA",oCep:cNome) > 0
oCep:cTipo := "TV:"
oCep:cNome := StrTran(Upper(oCep:cNome),"TRAVESSA ",'')
Endif
If At("ALAMEDA",oCep:cNome) > 0
oCep:cTipo := "AL:"
oCep:cNome := StrTran(Upper(oCep:cNome),"ALAMEDA ",'')
Endif
// ASSIM NAO FUNCIONA
// oCep:cNome := oCep:cNome:RemoveAcentos():Upper()
oCep:cNome := RemoveAcentos( oCep:cNome )
// oCep:cNome := SubStr(oCep:cNome,1,40) //ERRO TABCEP 60 E NO CADASTRO 40
// oTag := oXml:findFirst("complemento")
// oCep:cCompl := IIF(Empty(oTag),'',oTag:cData) //UPPER DA ERRO SE VAZIO
oTag := oXml:findFirst("bairro")
oCep:cBair := IIF(Empty(oTag),'',oTag:cData)
oCep:cBair := FW_UTF8PADCHAR(oCep:cBair,30)
oCep:cBair := Upper(oCep:cBair)
oCep:cBair := PadL(Upper(oCep:cBair),30)
oCep:cBair := PadL(Upper(oCep:cBair),30)
// oCep:cBair := oCep:cBair:RemoveAcentos():Upper()
oCep:cBair := RemoveAcentos( oCep:cBair )
// oCep:cBair := Upper(oCep:cBair)
// Alert(Asc(SubStr(oCep:cBair,Len(oCep:cBair)-1)))
oCep:cCompl := IIF(Empty(oTag),'',oTag:cData)
oCep:cCompl:= UPPER( oCep:cCompl ) // AGORA SIM, PERFEITO! POHHA. KKKK
oTag := oXml:findFirst("localidade")
oCep:cCid := IIF(Empty(oTag),'',oTag:cData)
oCep:cCid := FW_UTF8PADCHAR( oCep:cCid,30)
oCep:cCid := Upper(oCep:cCid)
oCep:cCid := PadL(oCep:cCid,30)
// ASSIM NAO FUNCIONA - NAO ENTENDI ESSA LOGICA.
// oCep:cCid := oCep:cCid:RemoveAcentos():Upper() // ????
oCep:cCid := RemoveAcentos( oCep:cCid ) // NAO USAR UPPER JUMA!
oTag := oXml:findFirst("uf")
oCep:cUf := IIF(Empty(oTag),Space(2),oTag:cData)
xBrowse( oCep )
RETURN oCep
FUNCTION RemoveAcentos(cText)
cText := strtran(cText,'á','a')
cText := strtran(cText,'é','e')
cText := strtran(cText,'í','i')
cText := strtran(cText,'ó','o')
cText := strtran(cText,'ú','u')
cText := strtran(cText,'Á','A')
cText := strtran(cText,'à','A') // 224
cText := strtran(cText,'á','A') // 225
cText := strtran(cText,'â','A') // 226
cText := strtran(cText,'ã','A') // 227
cText := strtran(cText,'ä','A') // 228
cText := strtran(cText,'å','A') // 229
cText := strtran(cText,"Æ",'A')
cText := strtran(cText,"Â",'A')
cText := strtran(cText,"µ",'A')
cText := strtran(cText,"…",'A')
cText := strtran(cText,"·",'A')
cText := strtran(cText,"ƒ",'A') // 131 ?
cText := strtran(cText,"„",'A') // 132 ?
cText := strtran(cText,"…",'A') // 133 ?
cText := strtran(cText,"†",'A') // 134 ?
cText := strtran(cText,'À','A')
cText := strtran(cText,'Ã','A') // AQUI - SÆO PAULO
cText := strtran(cText,"£",'') // Ã £ AQUI METO UM BRANCO - YES!
cText := strtran(cText,'É','E')
cText := strtran(cText,'Í','I')
cText := strtran(cText,'Ó','O')
cText := strtran(cText,'Ú','U')
cText := strtran(cText,'Ô','O')
cText := strtran(cText,'Ò','O')
cText := strtran(cText,'Ö','O')
cText := strtran(cText,'ä','a')
cText := strtran(cText,'â','a')
cText := strtran(cText,'ã','a')
cText := strtran(cText,'å','a')
cText := strtran(cText,'ê','a')
cText := strtran(cText,'ë','a')
cText := strtran(cText,'ç','c')
cText := strtran(cText,'Ç','C')
RETURN( cText )
// FIN / END
Code: Select all | Expand
#include "struct.ch"
Code: Select all | Expand
#include "struct.ch"
Code: Select all | Expand
#include "Directry.ch"
#include "FiveWin.ch"
#include "hbstruct.ch" // Only xHarbour.
#include "struct.ch" // FWH/HARBOUR ??
No funciona Enrico. xHarbour es fantástico, no uso HARBOUR precisamente por estos inconvenientesCode: Select all | Expand
#include "Directry.ch"
#include "FiveWin.ch"
#include "hbstruct.ch" // Only xHarbour.
#include "struct.ch" // FWH/HARBOUR ??
No funciona Enrico. xHarbour es fantástico, no uso HARBOUR precisamente por estos inconvenientesCode: Select all | Expand
#include "hbstruct.ch"
Code: Select all | Expand
#include "hbstruct.ch"
Code: Select all | Expand
#include "hbstruct.ch"
Code: Select all | Expand
#include "hbstruct.ch"
Code: Select all | Expand
-gui
-Ic:\fwh\include
tutor04.prg
-Lc:\fwh\lib
-lFiveH32
-lFiveHC32
-lgdiplus
-lole32
-lOleDlg
-lversion
xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc
-ldflag=/NODEFAULTLIB:msvcrt
tutor04.rc
Code: Select all | Expand
// 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
//----------------------------------------------------------------------------//
function Main()
local oIco, oBar, oBmp
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() TOOLTIP "Exit this app" GROUP
DEFINE MESSAGE OF oWnd ;
PROMPT FWVERSION + " " + FWCOPYRIGHT ;
NOINSET CENTERED KEYBOARD DATE CLOCK
DEFINE BITMAP oBmp FILENAME "..\bitmaps\fiveback.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() 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 www.fivetech.com", 0 ) ;
FILENAME "..\bitmaps\16x16\explorer.bmp"
ENDMENU
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
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
//----------------------------------------------------------------------------//
Code: Select all | Expand
-gui
-Ic:\fwh\include
tutor04.prg
-Lc:\fwh\lib
-lFiveH32
-lFiveHC32
-lgdiplus
-lole32
-lOleDlg
-lversion
xhb.hbc
hbct.hbc
hbwin.hbc
hbmzip.hbc
hbziparc.hbc
hbfoxpro.hbc
-ldflag=/NODEFAULTLIB:msvcrt
tutor04.rc
Code: Select all | Expand
// 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
//----------------------------------------------------------------------------//
function Main()
local oIco, oBar, oBmp
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() TOOLTIP "Exit this app" GROUP
DEFINE MESSAGE OF oWnd ;
PROMPT FWVERSION + " " + FWCOPYRIGHT ;
NOINSET CENTERED KEYBOARD DATE CLOCK
DEFINE BITMAP oBmp FILENAME "..\bitmaps\fiveback.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() 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 www.fivetech.com", 0 ) ;
FILENAME "..\bitmaps\16x16\explorer.bmp"
ENDMENU
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
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
//----------------------------------------------------------------------------//
Code: Select all | Expand
// C:\FWH..\SAMPLES\TUTOR04.PRG Modificado por Joao Santos/Sao Paulo/Brasil.
// 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"
#Define aPubGrad {| lInvert | If( lInvert, ;
{ { 1 / 3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
{ 2 / 3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } ;
}, ;
{ { 1 / 2, nRGB( 219, 230, 244 ), nRGB( 207 - 50, 221 - 25, 255 ) }, ;
{ 1 / 2, nRGB( 201 - 50, 217 - 25, 255 ), nRGB( 231, 242, 255 ) } ;
} ) }
STATIC oWnd
FUNCTION Main()
LOCAL oIco, oBar, oBmp
hb_gcAll( .F. )
SET CENTURY ON
SET DATE BRITISH
SET TIME FORMAT TO "HH:MM:SS"
SET EPOCH TO YEAR( DATE() ) - 30
SET SOFTSEEK OFF
SET WRAP ON
SETCANCEL( .F. )
SET CONFIRM ON
SET DELETED ON
SET _3DLOOK ON
SET UNIQUE OFF
SET ESCAPE OFF
SET EXACT ON // CONTROLA O :=, = e ==
SET EXCLUSIVE OFF
SET MULTIPLE OFF
SET OPTIMIZE ON
// 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 MDI ;
TITLE "FiveWin sample" ;
MENU BuildMenu() ;
COLOR "B/W" ICON oIco
// DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd
DEFINE BUTTONBAR oBar BUTTONSIZE 64, 52 _3DLOOK TOP OF oWnd 2007
WITH OBJECT oBar // VER: ANCHO.PRG
oBar:bClrGrad := aPubGrad
// oBar:SetFont( oFont )
oBar:nClrText := CLR_HBLUE // BLACK
oBar:Adjust()
END
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( TESTGET() )
//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 2007
DEFINE BITMAP oBmp FILENAME "..\bitmaps\visual.bmp"
oWnd:bPainted = {| hDC | BmpTiled( hDC, oWnd, oBmp ) }
ACTIVATE WINDOW oWnd MAXIMIZED
/* ;
VALID MsgYesNo( "Do you want to quit ?" ) */
RETURN NIL
FUNCTION BuildMenu()
LOCAL oMenu
MENU oMenu 2007
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 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
FUNCTION TESTGET()
LOCAL oDlg, oGet
LOCAL cCad := "Testing " // pad("Testing Gets",40)
LOCAL nNum := 0
LOCAL dDat := Date()
SET CONFIRM ON
DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION
@ 1, 2 SAY "Text..:" OF oDlg
@ 1, 6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K"
@ 1.8, 2 SAY "Number:" OF oDlg
@ 2, 6 GET oGet VAR nNum OF oDlg SIZE 60, 10 PICTURE "9999999.99"
@ 2.6, 2 SAY "Date:" OF oDlg
@ 3, 6 GET oGet VAR dDat PICTURE "@E" OF oDlg SIZE 60, 10 // "@D"
@ 3, 7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()
@ 3, 16 BUTTON "&Saida" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
// TGet():SetColorFocus( nRGB( 200, 120, 120 ) )
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
// FIN / END
Regards, saludos.]]>Code: Select all | Expand
// C:\FWH..\SAMPLES\TUTOR04.PRG Modificado por Joao Santos/Sao Paulo/Brasil.
// 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"
#Define aPubGrad {| lInvert | If( lInvert, ;
{ { 1 / 3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
{ 2 / 3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } ;
}, ;
{ { 1 / 2, nRGB( 219, 230, 244 ), nRGB( 207 - 50, 221 - 25, 255 ) }, ;
{ 1 / 2, nRGB( 201 - 50, 217 - 25, 255 ), nRGB( 231, 242, 255 ) } ;
} ) }
STATIC oWnd
FUNCTION Main()
LOCAL oIco, oBar, oBmp
hb_gcAll( .F. )
SET CENTURY ON
SET DATE BRITISH
SET TIME FORMAT TO "HH:MM:SS"
SET EPOCH TO YEAR( DATE() ) - 30
SET SOFTSEEK OFF
SET WRAP ON
SETCANCEL( .F. )
SET CONFIRM ON
SET DELETED ON
SET _3DLOOK ON
SET UNIQUE OFF
SET ESCAPE OFF
SET EXACT ON // CONTROLA O :=, = e ==
SET EXCLUSIVE OFF
SET MULTIPLE OFF
SET OPTIMIZE ON
// 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 MDI ;
TITLE "FiveWin sample" ;
MENU BuildMenu() ;
COLOR "B/W" ICON oIco
// DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd
DEFINE BUTTONBAR oBar BUTTONSIZE 64, 52 _3DLOOK TOP OF oWnd 2007
WITH OBJECT oBar // VER: ANCHO.PRG
oBar:bClrGrad := aPubGrad
// oBar:SetFont( oFont )
oBar:nClrText := CLR_HBLUE // BLACK
oBar:Adjust()
END
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( TESTGET() )
//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 2007
DEFINE BITMAP oBmp FILENAME "..\bitmaps\visual.bmp"
oWnd:bPainted = {| hDC | BmpTiled( hDC, oWnd, oBmp ) }
ACTIVATE WINDOW oWnd MAXIMIZED
/* ;
VALID MsgYesNo( "Do you want to quit ?" ) */
RETURN NIL
FUNCTION BuildMenu()
LOCAL oMenu
MENU oMenu 2007
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 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
FUNCTION TESTGET()
LOCAL oDlg, oGet
LOCAL cCad := "Testing " // pad("Testing Gets",40)
LOCAL nNum := 0
LOCAL dDat := Date()
SET CONFIRM ON
DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION
@ 1, 2 SAY "Text..:" OF oDlg
@ 1, 6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K"
@ 1.8, 2 SAY "Number:" OF oDlg
@ 2, 6 GET oGet VAR nNum OF oDlg SIZE 60, 10 PICTURE "9999999.99"
@ 2.6, 2 SAY "Date:" OF oDlg
@ 3, 6 GET oGet VAR dDat PICTURE "@E" OF oDlg SIZE 60, 10 // "@D"
@ 3, 7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()
@ 3, 16 BUTTON "&Saida" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
// TGet():SetColorFocus( nRGB( 200, 120, 120 ) )
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
// FIN / END
Regards, saludos.]]>Que raro, eso no sucede nunca.La empresa de hosting modificó algo que hizo que dejase de funcionar.
Eso no es cierto, la restauración de backup NUNCA fallan, JAMÁS!!Les pedimos que restaurasen un backup y ni por esas volvió a estar como estaba.
Que raro, eso no sucede nunca.La empresa de hosting modificó algo que hizo que dejase de funcionar.
Eso no es cierto, la restauración de backup NUNCA fallan, JAMÁS!!Les pedimos que restaurasen un backup y ni por esas volvió a estar como estaba.
Code: Select all | Expand
oReport:bEnd:={|| oReport:aColumns[5]:nTotal := 0,oReport:aColumns[6]:nTotal := 0 }
Code: Select all | Expand
oReport:bEnd:={|| oReport:aColumns[5]:nTotal := 0,oReport:aColumns[6]:nTotal := 0 }
Code: Select all | Expand
:bClrStd := { || If( (cAliTab )->(oBrwFW2:KeyNo()) % 2 == 0, ;
{ RGB(0,0,0), IF( (cAliTab )->cEstProTra == "S", RGB(136,119,134), ;
IF( (cAliTab )->cEstadoTra == "I", RGB(190,224,156), RGB( 234,234,234 )) ) },;
{ RGB(0,0,0), IF((cAliTab )->cEstProTra == "S", RGB(136,119,134), ;
IF( (cAliTab )->cEstadoTra == "I", RGB(190,224,156), RGB( 255,255,242 ) ) ) } ) }
]]>Code: Select all | Expand
:bClrStd := { || If( (cAliTab )->(oBrwFW2:KeyNo()) % 2 == 0, ;
{ RGB(0,0,0), IF( (cAliTab )->cEstProTra == "S", RGB(136,119,134), ;
IF( (cAliTab )->cEstadoTra == "I", RGB(190,224,156), RGB( 234,234,234 )) ) },;
{ RGB(0,0,0), IF((cAliTab )->cEstProTra == "S", RGB(136,119,134), ;
IF( (cAliTab )->cEstadoTra == "I", RGB(190,224,156), RGB( 255,255,242 ) ) ) } ) }
]]>Code: Select all | Expand
#include "FiveWin.ch"
#include "hbcurl.ch"
function Main()
recuperainfo() //Con el este código funciona, lo montamos para comprobar que el endpoint está funcionando.
recuperainfocurl() //Pero con curl no arranca.
return nil
Function recuperainfo()
Local aHasRes
Local hInfo := {=>}
Local response := nil
Local cUrl := "https://hymplus.com/factura/ws_msvc.php"
Local cAno := transform(year(date()),"9999")
IF !IsInternet()
msginfo("No Se Pudo Comprobar La Conexión a Internet")
ELSE
user := "hymlymatest"
pass := "HymTestLeo" //TEMPORAL
cBas64 := hb_base64encode(user+":"+pass,len(user+":"+pass))
//NIT DEL AUTORIZADO
hInfo["ano"] = cAno
hInfo["usua"] := user
hInfo["pass"] := pass
enviar := hb_jsonEncode( hInfo )
ohttp := CreateObject( "MSXML2.XMLHTTP" )
ohttp:Open( "POST" ,cUrl,.F.)
oHttp:SetRequestHeader("cache-control", "no-cache")
ohttp:SetRequestHeader("content-type", "application/json" )
ohttp:SetRequestHeader("authorization", "Basic "+cBas64 )
TRY
ohttp:Send(enviar)
CATCH
msginfo("No Se Pudo Enviar Solicitud")
END
response := ohttp:responseText
if valtype(response)!="U"
aHasRes := hash()
hb_jsondecode(response ,@aHasRes)
if valtype(aHasRes)="U"
aHasRes := {=>}
endif
else
msginfo("Respuesa del servidor no valida")
endif
xbrowse(aHasRes,"SIN CURL")
ENDIF
return nil
Function recuperainfocurl()
Local aHasRes,enviar,oCurl
Local hInfo := {=>}
Local response := nil
Local cUrl := "https://hymplus.com/factura/ws_msvc.php"
Local cAno := transform(year(date()),"9999")
Local aHeader := {}
IF !IsInternet()
msginfo("No Se Pudo Comprobar La Conexión a Internet")
ELSE
user := "hymlymatest"
pass := "HymTestLeo" //TEMPORAL
cBas64 := hb_base64encode(user+":"+pass,len(user+":"+pass))
AADD(aHeader,"Authorization: Basic "+cBas64 )
AADD(aHeader,"Content-Type: application/json")
AADD(aHeader,"cache-control: no-cache")
//NIT DEL AUTORIZADO
hInfo["ano"] = cAno
hInfo["usua"] := user
hInfo["pass"] := pass
enviar := hb_jsonEncode( hInfo )
oCurl = curl_easy_init()
IF !EMPTY( cUrl )
curl_easy_setopt( oCurl, HB_CURLOPT_URL, cUrl )
curl_easy_setopt( oCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( oCurl, HB_CURLOPT_SSL_VERIFYPEER, 0 )
curl_easy_setopt( oCurl, HB_CURLOPT_POSTFIELDS, enviar )
curl_easy_setopt( oCurl, HB_CURLOPT_CUSTOMREQUEST , "POST")
curl_easy_setopt( oCurl, HB_CURLOPT_HTTPHEADER, aHeader )
IF CURL_EASY_PERFORM( oCurl ) == 0
response = curl_easy_dl_buff_get( oCurl )
ENDIF
curl_easy_cleanup( oCurl )
ENDIF
aHasRes := hash()
hb_jsondecode(response ,@aHasRes)
if valtype(aHasRes)="U"
aHasRes := {=>}
endif
xbrowse(aHasRes,"USANDO LA CURL")
ENDIF
return nil
Code: Select all | Expand
#include "FiveWin.ch"
#include "hbcurl.ch"
function Main()
recuperainfo() //Con el este código funciona, lo montamos para comprobar que el endpoint está funcionando.
recuperainfocurl() //Pero con curl no arranca.
return nil
Function recuperainfo()
Local aHasRes
Local hInfo := {=>}
Local response := nil
Local cUrl := "https://hymplus.com/factura/ws_msvc.php"
Local cAno := transform(year(date()),"9999")
IF !IsInternet()
msginfo("No Se Pudo Comprobar La Conexión a Internet")
ELSE
user := "hymlymatest"
pass := "HymTestLeo" //TEMPORAL
cBas64 := hb_base64encode(user+":"+pass,len(user+":"+pass))
//NIT DEL AUTORIZADO
hInfo["ano"] = cAno
hInfo["usua"] := user
hInfo["pass"] := pass
enviar := hb_jsonEncode( hInfo )
ohttp := CreateObject( "MSXML2.XMLHTTP" )
ohttp:Open( "POST" ,cUrl,.F.)
oHttp:SetRequestHeader("cache-control", "no-cache")
ohttp:SetRequestHeader("content-type", "application/json" )
ohttp:SetRequestHeader("authorization", "Basic "+cBas64 )
TRY
ohttp:Send(enviar)
CATCH
msginfo("No Se Pudo Enviar Solicitud")
END
response := ohttp:responseText
if valtype(response)!="U"
aHasRes := hash()
hb_jsondecode(response ,@aHasRes)
if valtype(aHasRes)="U"
aHasRes := {=>}
endif
else
msginfo("Respuesa del servidor no valida")
endif
xbrowse(aHasRes,"SIN CURL")
ENDIF
return nil
Function recuperainfocurl()
Local aHasRes,enviar,oCurl
Local hInfo := {=>}
Local response := nil
Local cUrl := "https://hymplus.com/factura/ws_msvc.php"
Local cAno := transform(year(date()),"9999")
Local aHeader := {}
IF !IsInternet()
msginfo("No Se Pudo Comprobar La Conexión a Internet")
ELSE
user := "hymlymatest"
pass := "HymTestLeo" //TEMPORAL
cBas64 := hb_base64encode(user+":"+pass,len(user+":"+pass))
AADD(aHeader,"Authorization: Basic "+cBas64 )
AADD(aHeader,"Content-Type: application/json")
AADD(aHeader,"cache-control: no-cache")
//NIT DEL AUTORIZADO
hInfo["ano"] = cAno
hInfo["usua"] := user
hInfo["pass"] := pass
enviar := hb_jsonEncode( hInfo )
oCurl = curl_easy_init()
IF !EMPTY( cUrl )
curl_easy_setopt( oCurl, HB_CURLOPT_URL, cUrl )
curl_easy_setopt( oCurl, HB_CURLOPT_DL_BUFF_SETUP )
curl_easy_setopt( oCurl, HB_CURLOPT_SSL_VERIFYPEER, 0 )
curl_easy_setopt( oCurl, HB_CURLOPT_POSTFIELDS, enviar )
curl_easy_setopt( oCurl, HB_CURLOPT_CUSTOMREQUEST , "POST")
curl_easy_setopt( oCurl, HB_CURLOPT_HTTPHEADER, aHeader )
IF CURL_EASY_PERFORM( oCurl ) == 0
response = curl_easy_dl_buff_get( oCurl )
ENDIF
curl_easy_cleanup( oCurl )
ENDIF
aHasRes := hash()
hb_jsondecode(response ,@aHasRes)
if valtype(aHasRes)="U"
aHasRes := {=>}
endif
xbrowse(aHasRes,"USANDO LA CURL")
ENDIF
return nil
Code: Select all | Expand
@ 100, 5 XBROWSE oBrw ;
SIZE 385 ,160 OF oSelf:oDlgSpt PIXEL ;
LINES STYLE FLAT NOBORDER ;
DATASOURCE ::aRspNm AUTOCOLS
ReArrangeCols( oBrw, ::aCols1 )
WITH OBJECT oBrw
:lRecordSelector := .T.
:lHScroll := .T.
:lVScroll := .T.
:l2007 := .F.
:lFitGridHeight := .T.
:nHeaderHeight := 21
:nRowHeight := 21
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:lColDividerComplete := .t.
:nColorPen := CLR_HGRAY
:lFullGrid := .T.
:nStretchCol := STRETCHCOL_LAST
:bClrHeader := { || { CLR_WHITE, oLamcla:nClrBrwCab, CLR_HGRAY } }
:lFooter := .t.
:nFooterLines := 1
:nFooterHeight := 25
:nFreeze := 4
//:bRClicked := {|nRow, nCol | if(!::lNueva,::mRegNomi( nRow,nCol,oBrw, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbBrCmp, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) }
:bRClicked := {|nRow, nCol | ::mRegNomi( nRow,nCol,oBrw, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbBrCmp, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"] ) }
:bKeyDown := {|nKey,oGet,nCol|::TecItemNomi(nKey,oGet,nCol, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbGraba, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"])}
:nRecSelColor := RGB( 255, 255, 255 )
:bClrStd := {|| if(Len( ::aRspNm ) > 0 , ;
{ CLR_BLACK,clrEstFondo(::aRspNm[oBrw:nArrayAt]["estado"]) } ,;
{ CLR_BLACK,clrEstFondo("S") } ) }
:bClrSelFocus := {|| if(Len( ::aRspNm ) > 0 , ;
{ CLR_WHITE,clrEstSelec(::aRspNm[oBrw:nArrayAt]["estado"]) } ,;
{ CLR_WHITE,clrEstSelec("S") }) }
:SetFont( oFont1Cja )
END
WITH OBJECT oBrw
//Colocamos los titulos a las columnas
FOR j:=1 TO len(::aColTt)
:aCols[j]:cHeader := ::aColTt[j]
:aCols[j]:oHeaderFont = oFontCja
NEXT
//Ahora las especiales
:aCols[2]:cFooter = "Nro.Comp » "+alltrim(transform(len(::aRspNm),oLamcla:PIC3))
:aCols[2]:oFooterFont := oFontCja
:aCols[3]:cFooter = "TOTALES »"
:aCols[3]:oFooterFont := oFontCja
:aCols[6]:bClrStd := {|| { _CLR_GRIS, if(Len( ::aRspNm ) > 0 , colorEstado2_nm( ::aRspNm[oBrw:nArrayAt]["estado"] , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) } }
:aCols[6]:bClrSelFocus := {|| { CLR_WHITE,if(Len( ::aRspNm ) > 0 ,colorEstado_nm( ::aRspNm[oBrw:nArrayAt]["estado"] , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) } }
:aCols[6]:bStrData := { || if(Len( ::aRspNm ) > 0 , nombreEstado_nm( ::aRspNm[oBrw:nArrayAt]["estado"] ) , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ) }
:aCols[nColDev]:oFooterFont := oFontCja
:aCols[nColDev]:bClrStd = {|| {Rgb(55,55,55),nRGB(212,212,212) } }
:aCols[nColDev]:bClrSelFocus = {|| {CLR_WHITE,nRGB(139,139,139) } }
:aCols[nColDed]:oFooterFont := oFontCja
:aCols[nColDed]:bClrStd = {|| {Rgb(55,55,55),nRGB(255,187,187) } }
:aCols[nColDed]:bClrSelFocus = {|| {CLR_WHITE,nRGB(255,117,117) } }
:aCols[nColPag]:oFooterFont := oFontCja
:aCols[nColPag]:bClrStd = {|| {Rgb(55,55,55),nRGB(187,255,187) } }
:aCols[nColPag]:bClrSelFocus = {|| {CLR_WHITE,nRGB(0,210,0) } }
//Colocamos los totales en donde sea necesario
//y tambien ajustamos el ancho de las columnas
FOR i:=1 TO len(::aColTl)
if ::aColTl[i]
:aCols[i]:nFooterType := AGGR_SUM
:aCols[i]:cFooterPicture := oLamcla:PIC7
:aCols[i]:cEditPicture := oLamcla:PIC7
:aCols[i]:oFooterFont := oFontCja
endif
:aCols[i]:nWidth = ::aColAn[i]
NEXT
:MakeTotals()
//Dejamos fija la columna en la derecha
:oRightCol := :aCols[nColPag]
END
oBrw:CreateFromCode()
Code: Select all | Expand
@ 100, 5 XBROWSE oBrw ;
SIZE 385 ,160 OF oSelf:oDlgSpt PIXEL ;
LINES STYLE FLAT NOBORDER ;
DATASOURCE ::aRspNm AUTOCOLS
ReArrangeCols( oBrw, ::aCols1 )
WITH OBJECT oBrw
:lRecordSelector := .T.
:lHScroll := .T.
:lVScroll := .T.
:l2007 := .F.
:lFitGridHeight := .T.
:nHeaderHeight := 21
:nRowHeight := 21
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:lColDividerComplete := .t.
:nColorPen := CLR_HGRAY
:lFullGrid := .T.
:nStretchCol := STRETCHCOL_LAST
:bClrHeader := { || { CLR_WHITE, oLamcla:nClrBrwCab, CLR_HGRAY } }
:lFooter := .t.
:nFooterLines := 1
:nFooterHeight := 25
:nFreeze := 4
//:bRClicked := {|nRow, nCol | if(!::lNueva,::mRegNomi( nRow,nCol,oBrw, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbBrCmp, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) }
:bRClicked := {|nRow, nCol | ::mRegNomi( nRow,nCol,oBrw, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbBrCmp, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"] ) }
:bKeyDown := {|nKey,oGet,nCol|::TecItemNomi(nKey,oGet,nCol, cbModi, cbEnv, cnImpPg, cbNaj, cbAgre, cnEDian, cbGraba, cbElm, ::aRspNm[oBrw:nArrayAt]["rfidnm"])}
:nRecSelColor := RGB( 255, 255, 255 )
:bClrStd := {|| if(Len( ::aRspNm ) > 0 , ;
{ CLR_BLACK,clrEstFondo(::aRspNm[oBrw:nArrayAt]["estado"]) } ,;
{ CLR_BLACK,clrEstFondo("S") } ) }
:bClrSelFocus := {|| if(Len( ::aRspNm ) > 0 , ;
{ CLR_WHITE,clrEstSelec(::aRspNm[oBrw:nArrayAt]["estado"]) } ,;
{ CLR_WHITE,clrEstSelec("S") }) }
:SetFont( oFont1Cja )
END
WITH OBJECT oBrw
//Colocamos los titulos a las columnas
FOR j:=1 TO len(::aColTt)
:aCols[j]:cHeader := ::aColTt[j]
:aCols[j]:oHeaderFont = oFontCja
NEXT
//Ahora las especiales
:aCols[2]:cFooter = "Nro.Comp » "+alltrim(transform(len(::aRspNm),oLamcla:PIC3))
:aCols[2]:oFooterFont := oFontCja
:aCols[3]:cFooter = "TOTALES »"
:aCols[3]:oFooterFont := oFontCja
:aCols[6]:bClrStd := {|| { _CLR_GRIS, if(Len( ::aRspNm ) > 0 , colorEstado2_nm( ::aRspNm[oBrw:nArrayAt]["estado"] , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) } }
:aCols[6]:bClrSelFocus := {|| { CLR_WHITE,if(Len( ::aRspNm ) > 0 ,colorEstado_nm( ::aRspNm[oBrw:nArrayAt]["estado"] , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ),) } }
:aCols[6]:bStrData := { || if(Len( ::aRspNm ) > 0 , nombreEstado_nm( ::aRspNm[oBrw:nArrayAt]["estado"] ) , ::aRspNm[oBrw:nArrayAt]["rfidnm"] ) }
:aCols[nColDev]:oFooterFont := oFontCja
:aCols[nColDev]:bClrStd = {|| {Rgb(55,55,55),nRGB(212,212,212) } }
:aCols[nColDev]:bClrSelFocus = {|| {CLR_WHITE,nRGB(139,139,139) } }
:aCols[nColDed]:oFooterFont := oFontCja
:aCols[nColDed]:bClrStd = {|| {Rgb(55,55,55),nRGB(255,187,187) } }
:aCols[nColDed]:bClrSelFocus = {|| {CLR_WHITE,nRGB(255,117,117) } }
:aCols[nColPag]:oFooterFont := oFontCja
:aCols[nColPag]:bClrStd = {|| {Rgb(55,55,55),nRGB(187,255,187) } }
:aCols[nColPag]:bClrSelFocus = {|| {CLR_WHITE,nRGB(0,210,0) } }
//Colocamos los totales en donde sea necesario
//y tambien ajustamos el ancho de las columnas
FOR i:=1 TO len(::aColTl)
if ::aColTl[i]
:aCols[i]:nFooterType := AGGR_SUM
:aCols[i]:cFooterPicture := oLamcla:PIC7
:aCols[i]:cEditPicture := oLamcla:PIC7
:aCols[i]:oFooterFont := oFontCja
endif
:aCols[i]:nWidth = ::aColAn[i]
NEXT
:MakeTotals()
//Dejamos fija la columna en la derecha
:oRightCol := :aCols[nColPag]
END
oBrw:CreateFromCode()
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
Local nSalario := 2032212
Local nDias := 30 //Si lo cambiamos a 30 salen los asteriscos
Local nTotal := (nSalario/30) * nDias
msginfo(nTotal)
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
Local nSalario := 2032212
Local nDias := 30 //Si lo cambiamos a 30 salen los asteriscos
Local nTotal := (nSalario/30) * nDias
msginfo(nTotal)
return nil
Code: Select all | Expand
// Testing GETs - C:\FWH..\SAMPLES\TESTGET.PRG y TESTGET.RC
#include "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg, oGet, oGet2, oGet3, oGet4
LOCAL cCad := "Testing " // pad("Testing Gets",40)
LOCAL cText := " "
LOCAL nNum := 0
LOCAL dDat := Date()
LOCAL nSalario := 2032212
LOCAL nDias := 30 // Si lo cambiamos a 30 salen los asteriscos
LOCAL nTotal := 0
LOCAL nTotSal := nSalario / 30
nTotal := nTotSal * nDias // Aqui Leandro, prueba.
nNum := nTotal
SET CENTURY ON
SET DATE BRITISH
SET TIME FORMAT TO "HH:MM:SS"
SET EPOCH TO YEAR( DATE() ) - 30
SET SOFTSEEK OFF
SET WRAP ON
SETCANCEL( .F. )
SET CONFIRM ON
SET DELETED ON
SET _3DLOOK ON
SET UNIQUE OFF
SET ESCAPE OFF
SET EXACT ON // CONTROLA O :=, = e ==
SET EXCLUSIVE OFF
SET MULTIPLE OFF
SET OPTIMIZE ON
DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION
oDlg:lHelpIcon := .F.
@ 1, 2 SAY "Text..:" OF oDlg
@ 1, 6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K" ;
PLACEHOLDER "CueBanner" // NO FUNCIONA.
@ 1.8, 2 SAY "Salario:" OF oDlg
@ 2, 6 GET oGet2 VAR nNum OF oDlg SIZE 60, 12 PICTURE "@E 9,999,999,999.99" RIGHT
@ 2.6, 2 SAY "Date:" OF oDlg
@ 3, 6 GET oGet3 VAR dDat PICTURE "@D 99/99/9999" OF oDlg SIZE 60, 10 CENTER
@ 4, 2 SAY "Text..:" OF oDlg
@ 4, 6 GET oGet4 VAR cText PICTURE "@!" OF oDlg SIZE 80, 10 ;
PLACEHOLDER "CueBanner" // FUNCIONA.
@ 4, 7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()
@ 4, 16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
TGet():SetColorFocus( nRGB( 200, 120, 120 ) )
ACTIVATE DIALOG oDlg CENTERED
SET CONFIRM OFF
RETURN NIL
// ------------------------------------------------------------------------//
PROCEDURE appsys // XBase++ requirement
RETURN
/*
// TESTGET.RC
#ifndef __64__
1 24 "C:\FWH\SAMPLES\winxp\WindowsXP.Manifest"
#endif
#ifdef __64__
1 24 "winxp\WindowsXP.Manifest64"
#endif
*/
Code: Select all | Expand
// Testing GETs - C:\FWH..\SAMPLES\TESTGET.PRG y TESTGET.RC
#include "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg, oGet, oGet2, oGet3, oGet4
LOCAL cCad := "Testing " // pad("Testing Gets",40)
LOCAL cText := " "
LOCAL nNum := 0
LOCAL dDat := Date()
LOCAL nSalario := 2032212
LOCAL nDias := 30 // Si lo cambiamos a 30 salen los asteriscos
LOCAL nTotal := 0
LOCAL nTotSal := nSalario / 30
nTotal := nTotSal * nDias // Aqui Leandro, prueba.
nNum := nTotal
SET CENTURY ON
SET DATE BRITISH
SET TIME FORMAT TO "HH:MM:SS"
SET EPOCH TO YEAR( DATE() ) - 30
SET SOFTSEEK OFF
SET WRAP ON
SETCANCEL( .F. )
SET CONFIRM ON
SET DELETED ON
SET _3DLOOK ON
SET UNIQUE OFF
SET ESCAPE OFF
SET EXACT ON // CONTROLA O :=, = e ==
SET EXCLUSIVE OFF
SET MULTIPLE OFF
SET OPTIMIZE ON
DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION
oDlg:lHelpIcon := .F.
@ 1, 2 SAY "Text..:" OF oDlg
@ 1, 6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K" ;
PLACEHOLDER "CueBanner" // NO FUNCIONA.
@ 1.8, 2 SAY "Salario:" OF oDlg
@ 2, 6 GET oGet2 VAR nNum OF oDlg SIZE 60, 12 PICTURE "@E 9,999,999,999.99" RIGHT
@ 2.6, 2 SAY "Date:" OF oDlg
@ 3, 6 GET oGet3 VAR dDat PICTURE "@D 99/99/9999" OF oDlg SIZE 60, 10 CENTER
@ 4, 2 SAY "Text..:" OF oDlg
@ 4, 6 GET oGet4 VAR cText PICTURE "@!" OF oDlg SIZE 80, 10 ;
PLACEHOLDER "CueBanner" // FUNCIONA.
@ 4, 7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()
@ 4, 16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
TGet():SetColorFocus( nRGB( 200, 120, 120 ) )
ACTIVATE DIALOG oDlg CENTERED
SET CONFIRM OFF
RETURN NIL
// ------------------------------------------------------------------------//
PROCEDURE appsys // XBase++ requirement
RETURN
/*
// TESTGET.RC
#ifndef __64__
1 24 "C:\FWH\SAMPLES\winxp\WindowsXP.Manifest"
#endif
#ifdef __64__
1 24 "winxp\WindowsXP.Manifest64"
#endif
*/
Code: Select all | Expand
FUNCTION MAIN()
? 2032212 / 30 * 30
INKEY( 0 )
RETURN NIL
Code: Select all | Expand
FUNCTION MAIN()
? 2032212 / 30 * 30
INKEY( 0 )
RETURN NIL
Code: Select all | Expand
case HB_P_PUSHDOUBLE:
hb_vmPushDoubleConst( HB_PCODE_MKDOUBLE( &pCode[ 1 ] ),
( int ) *( const unsigned char * ) &pCode[ 1 + sizeof( double ) ],
( int ) *( const unsigned char * ) &pCode[ 2 + sizeof( double ) ] );
pCode += 3 + sizeof( double );
break;
xHarbour this way:
Code: Select all | Expand
case HB_P_PUSHDOUBLE:
HB_TRACE( HB_TR_DEBUG, ( "HB_P_PUSHDOUBLE" ) );
hb_vmPushDoubleConst( HB_PCODE_MKDOUBLE( &pCode[ w + 1 ] ),
( int ) *( BYTE * ) &pCode[ w + 1 + sizeof( double ) ],
( int ) *( BYTE * ) &pCode[ w + 1 + sizeof( double ) + sizeof( BYTE ) ] );
w += 1 + sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE );
break;
Code: Select all | Expand
case HB_P_PUSHDOUBLE:
hb_vmPushDoubleConst( HB_PCODE_MKDOUBLE( &pCode[ 1 ] ),
( int ) *( const unsigned char * ) &pCode[ 1 + sizeof( double ) ],
( int ) *( const unsigned char * ) &pCode[ 2 + sizeof( double ) ] );
pCode += 3 + sizeof( double );
break;
xHarbour this way:
Code: Select all | Expand
case HB_P_PUSHDOUBLE:
HB_TRACE( HB_TR_DEBUG, ( "HB_P_PUSHDOUBLE" ) );
hb_vmPushDoubleConst( HB_PCODE_MKDOUBLE( &pCode[ w + 1 ] ),
( int ) *( BYTE * ) &pCode[ w + 1 + sizeof( double ) ],
( int ) *( BYTE * ) &pCode[ w + 1 + sizeof( double ) + sizeof( BYTE ) ] );
w += 1 + sizeof( double ) + sizeof( BYTE ) + sizeof( BYTE );
break;
Code: Select all | Expand
static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec )
{
HB_STACK_TLS_PRELOAD
PHB_ITEM pItem = hb_stackAllocItem();
HB_TRACE( HB_TR_DEBUG, ( "hb_vmPushDoubleConst(%lf, %d, %d)", dNumber, iWidth, iDec ) );
pItem->type = HB_IT_DOUBLE;
pItem->item.asDouble.value = dNumber;
if( iDec == HB_DEFAULT_DECIMALS )
pItem->item.asDouble.decimal = ( HB_USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS;
else
pItem->item.asDouble.decimal = ( HB_USHORT ) iDec;
if( iWidth == HB_DEFAULT_WIDTH )
pItem->item.asDouble.length = HB_DBL_LENGTH( dNumber );
else
pItem->item.asDouble.length = ( HB_USHORT ) iWidth;
}
xHarbour's implementation:
Code: Select all | Expand
static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec )
{
HB_THREAD_STUB
PHB_ITEM pItem;
HB_TRACE( HB_TR_DEBUG, ( "hb_vmPushDoubleConst(%lf, %d, %d)", dNumber, iWidth, iDec ) );
pItem = hb_stackAllocItem();
pItem->type = HB_IT_DOUBLE;
pItem->item.asDouble.value = dNumber;
if( iDec == HB_DEFAULT_DECIMALS )
pItem->item.asDouble.decimal = hb_stackSetStruct()->HB_SET_DECIMALS;
else
pItem->item.asDouble.decimal = ( UINT ) iDec;
if( iWidth == HB_DEFAULT_WIDTH )
pItem->item.asDouble.length = ( UINT ) HB_DBL_LENGTH( dNumber );
else
pItem->item.asDouble.length = ( UINT ) iWidth;
}
Code: Select all | Expand
static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec )
{
HB_STACK_TLS_PRELOAD
PHB_ITEM pItem = hb_stackAllocItem();
HB_TRACE( HB_TR_DEBUG, ( "hb_vmPushDoubleConst(%lf, %d, %d)", dNumber, iWidth, iDec ) );
pItem->type = HB_IT_DOUBLE;
pItem->item.asDouble.value = dNumber;
if( iDec == HB_DEFAULT_DECIMALS )
pItem->item.asDouble.decimal = ( HB_USHORT ) hb_stackSetStruct()->HB_SET_DECIMALS;
else
pItem->item.asDouble.decimal = ( HB_USHORT ) iDec;
if( iWidth == HB_DEFAULT_WIDTH )
pItem->item.asDouble.length = HB_DBL_LENGTH( dNumber );
else
pItem->item.asDouble.length = ( HB_USHORT ) iWidth;
}
xHarbour's implementation:
Code: Select all | Expand
static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec )
{
HB_THREAD_STUB
PHB_ITEM pItem;
HB_TRACE( HB_TR_DEBUG, ( "hb_vmPushDoubleConst(%lf, %d, %d)", dNumber, iWidth, iDec ) );
pItem = hb_stackAllocItem();
pItem->type = HB_IT_DOUBLE;
pItem->item.asDouble.value = dNumber;
if( iDec == HB_DEFAULT_DECIMALS )
pItem->item.asDouble.decimal = hb_stackSetStruct()->HB_SET_DECIMALS;
else
pItem->item.asDouble.decimal = ( UINT ) iDec;
if( iWidth == HB_DEFAULT_WIDTH )
pItem->item.asDouble.length = ( UINT ) HB_DBL_LENGTH( dNumber );
else
pItem->item.asDouble.length = ( UINT ) iWidth;
}
Code: Select all | Expand
FUNCTION MAIN()
? Test( 2032212 / 30 * 30 )
INKEY( 0 )
RETURN NIL
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
#include <stdio.h>
HB_FUNC( TEST )
{
char buffer[ 50 ];
double number = hb_parnd( 1 );
sprintf( buffer, "%f", number );
OutputDebugString( buffer );
hb_retnd( number );
}
#pragma ENDDUMP
]]>Code: Select all | Expand
FUNCTION MAIN()
? Test( 2032212 / 30 * 30 )
INKEY( 0 )
RETURN NIL
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
#include <stdio.h>
HB_FUNC( TEST )
{
char buffer[ 50 ];
double number = hb_parnd( 1 );
sprintf( buffer, "%f", number );
OutputDebugString( buffer );
hb_retnd( number );
}
#pragma ENDDUMP
]]>Code: Select all | Expand
function Main()
Test( 2032212 / 30 * 30, 50, 2 )
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
#include <hbapiitm.h>
#include <stdio.h>
HB_FUNC( TEST )
{
OutputDebugString( hb_itemStr( hb_param( 1, HB_IT_DOUBLE ),
hb_param( 2, HB_IT_NUMERIC ), hb_param( 3, HB_IT_NUMERIC ) ) );
}
#pragma ENDDUMP
]]>Code: Select all | Expand
function Main()
Test( 2032212 / 30 * 30, 50, 2 )
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
#include <hbapiitm.h>
#include <stdio.h>
HB_FUNC( TEST )
{
OutputDebugString( hb_itemStr( hb_param( 1, HB_IT_DOUBLE ),
hb_param( 2, HB_IT_NUMERIC ), hb_param( 3, HB_IT_NUMERIC ) ) );
}
#pragma ENDDUMP
]]>.../* converts a numeric to a padded string iSize length and iDec number
of digits after dot.
Note: szResult has to be at least iSize + 1 length.
*/
BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec )
]]>/* Set to asterisks in case of overflow */
if( iPos < 0 )
{
memset( szResult, '*', iSize );
return FALSE;
}
.../* converts a numeric to a padded string iSize length and iDec number
of digits after dot.
Note: szResult has to be at least iSize + 1 length.
*/
BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec )
]]>/* Set to asterisks in case of overflow */
if( iPos < 0 )
{
memset( szResult, '*', iSize );
return FALSE;
}
Code: Select all | Expand
function Main()
Test( 2032212 / 30 * 30, 50, 2 )
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
#include <hbapiitm.h>
#include <stdio.h>
#define HB_FINITE_DBL( d ) ( _finite( d ) != 0 )
HB_FUNC( TEST )
{
PHB_ITEM pNumber = hb_param( 1, HB_IT_DOUBLE );
char buffer[ 100 ];
OutputDebugString( hb_itemStr( hb_param( 1, HB_IT_DOUBLE ),
hb_param( 2, HB_IT_NUMERIC ), hb_param( 3, HB_IT_NUMERIC ) ) );
sprintf (buffer, "%i", (int) pNumber->item.asDouble.length );
OutputDebugString( buffer );
if( HB_FINITE_DBL( hb_parnd( 1 ) ) )
OutputDebugString( "Finite" );
else
OutputDebugString( "Not finite" );
}
#pragma ENDDUMP
Code: Select all | Expand
function Main()
Test( 2032212 / 30 * 30, 50, 2 )
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
#include <hbapiitm.h>
#include <stdio.h>
#define HB_FINITE_DBL( d ) ( _finite( d ) != 0 )
HB_FUNC( TEST )
{
PHB_ITEM pNumber = hb_param( 1, HB_IT_DOUBLE );
char buffer[ 100 ];
OutputDebugString( hb_itemStr( hb_param( 1, HB_IT_DOUBLE ),
hb_param( 2, HB_IT_NUMERIC ), hb_param( 3, HB_IT_NUMERIC ) ) );
sprintf (buffer, "%i", (int) pNumber->item.asDouble.length );
OutputDebugString( buffer );
if( HB_FINITE_DBL( hb_parnd( 1 ) ) )
OutputDebugString( "Finite" );
else
OutputDebugString( "Not finite" );
}
#pragma ENDDUMP
Code: Select all | Expand
# Variables de rutas
PRG_PATH = src\prg
C_PATH = src\c
OBJ_PATH = obj
# Variables para los compiladores y banderas
CC = cl
CFLAGS = /I $(PRG_PATH) /I $(C_PATH) /nologo
# Archivos fuente y objetivos
PRG_FILES = $(PRG_PATH)\file1.prg $(PRG_PATH)\file2.prg
C_FILES = $(C_PATH)\main.c $(C_PATH)\utils.c
OBJ_FILES = $(OBJ_PATH)\main.obj $(OBJ_PATH)\utils.obj
# Regla para construir el programa
all: program.exe
program.exe: $(OBJ_FILES)
link /out:$@ $^
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@
# Limpieza
clean:
del /Q $(OBJ_PATH)\*.obj program.exe
Code: Select all | Expand
# Variables de rutas
PRG_PATH = src\prg
C_PATH = src\c
OBJ_PATH = obj
# Variables para los compiladores y banderas
CC = cl
CFLAGS = /I $(PRG_PATH) /I $(C_PATH) /nologo
# Archivos fuente y objetivos
PRG_FILES = $(PRG_PATH)\file1.prg $(PRG_PATH)\file2.prg
C_FILES = $(C_PATH)\main.c $(C_PATH)\utils.c
OBJ_FILES = $(OBJ_PATH)\main.obj $(OBJ_PATH)\utils.obj
# Regla para construir el programa
all: program.exe
program.exe: $(OBJ_FILES)
link /out:$@ $^
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@
# Limpieza
clean:
del /Q $(OBJ_PATH)\*.obj program.exe
Code: Select all | Expand
Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation. All rights reserved.
tutor04.mak(77) : fatal error U1001: syntax error : illegal character '^' in macro
Stop.
C:\vs2022_make>Clinica32.exe
'Clinica32.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\vs2022_make>
Code: Select all | Expand
#Microsoft VS2019 make sample, (c) FiveTech Software 2022
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=C:\vc2022\bin32
SDKDIR=C:\vc2022\bin32
# Variables de rutas
PRG_PATH = prg
C_PATH = c
OBJ_PATH = obj
# Variables para los compiladores y banderas
CC = cl
CFLAGS = /I $(PRG_PATH) /I $(C_PATH) /nologo
# Archivos fuente y objetivos
PRG_FILES = $(PRG_PATH)\Clinica32.prg $(PRG_PATH)\Clinica32Win.prg $(PRG_PATH)\TPublic.prg
C_FILES = $(C_PATH)\Clinica32.c $(C_PATH)\Clinica32Win.c $(C_PATH)\TPublic.c
OBJ_FILES = $(OBJ_PATH)\Clinica32.obj $(OBJ_PATH)\Clinica32Win.obj $(OBJ_PATH)\TPublic.obj
# Regla para construir el programa
all: program.exe
# link /OUT:Clinica32.exe @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:msvcrt
program.exe: $(OBJ_FILES)
echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbdebug.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbpp.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbwin.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbcplr.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\xhb.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbpcre.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbct.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbcpage.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbzlib.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\png.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbmzip.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\minizip.lib >> msvc.tmp
echo kernel32.lib >> msvc.tmp
echo user32.lib >> msvc.tmp
echo gdi32.lib >> msvc.tmp
echo winspool.lib >> msvc.tmp
echo comctl32.lib >> msvc.tmp
echo comdlg32.lib >> msvc.tmp
echo advapi32.lib >> msvc.tmp
echo shell32.lib >> msvc.tmp
echo ole32.lib >> msvc.tmp
echo oleaut32.lib >> msvc.tmp
echo uuid.lib >> msvc.tmp
echo odbc32.lib >> msvc.tmp
echo odbccp32.lib >> msvc.tmp
echo iphlpapi.lib >> msvc.tmp
echo mpr.lib >> msvc.tmp
echo version.lib >> msvc.tmp
echo wsock32.lib >> msvc.tmp
echo msimg32.lib >> msvc.tmp
echo oledlg.lib >> msvc.tmp
echo psapi.lib >> msvc.tmp
echo gdiplus.lib >> msvc.tmp
echo winmm.lib >> msvc.tmp
echo ws2_32.lib >> msvc.tmp
link /out:$@ $^
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@
Code: Select all | Expand
Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation. All rights reserved.
tutor04.mak(77) : fatal error U1001: syntax error : illegal character '^' in macro
Stop.
C:\vs2022_make>Clinica32.exe
'Clinica32.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\vs2022_make>
Code: Select all | Expand
#Microsoft VS2019 make sample, (c) FiveTech Software 2022
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=C:\vc2022\bin32
SDKDIR=C:\vc2022\bin32
# Variables de rutas
PRG_PATH = prg
C_PATH = c
OBJ_PATH = obj
# Variables para los compiladores y banderas
CC = cl
CFLAGS = /I $(PRG_PATH) /I $(C_PATH) /nologo
# Archivos fuente y objetivos
PRG_FILES = $(PRG_PATH)\Clinica32.prg $(PRG_PATH)\Clinica32Win.prg $(PRG_PATH)\TPublic.prg
C_FILES = $(C_PATH)\Clinica32.c $(C_PATH)\Clinica32Win.c $(C_PATH)\TPublic.c
OBJ_FILES = $(OBJ_PATH)\Clinica32.obj $(OBJ_PATH)\Clinica32Win.obj $(OBJ_PATH)\TPublic.obj
# Regla para construir el programa
all: program.exe
# link /OUT:Clinica32.exe @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:msvcrt
program.exe: $(OBJ_FILES)
echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbdebug.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbpp.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbwin.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbcplr.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\xhb.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbpcre.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbct.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbcpage.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbzlib.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\png.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\hbmzip.lib >> msvc.tmp
echo $(HBDIR)\lib\win\msvc\minizip.lib >> msvc.tmp
echo kernel32.lib >> msvc.tmp
echo user32.lib >> msvc.tmp
echo gdi32.lib >> msvc.tmp
echo winspool.lib >> msvc.tmp
echo comctl32.lib >> msvc.tmp
echo comdlg32.lib >> msvc.tmp
echo advapi32.lib >> msvc.tmp
echo shell32.lib >> msvc.tmp
echo ole32.lib >> msvc.tmp
echo oleaut32.lib >> msvc.tmp
echo uuid.lib >> msvc.tmp
echo odbc32.lib >> msvc.tmp
echo odbccp32.lib >> msvc.tmp
echo iphlpapi.lib >> msvc.tmp
echo mpr.lib >> msvc.tmp
echo version.lib >> msvc.tmp
echo wsock32.lib >> msvc.tmp
echo msimg32.lib >> msvc.tmp
echo oledlg.lib >> msvc.tmp
echo psapi.lib >> msvc.tmp
echo gdiplus.lib >> msvc.tmp
echo winmm.lib >> msvc.tmp
echo ws2_32.lib >> msvc.tmp
link /out:$@ $^
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@
Code: Select all | Expand
Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation. All rights reserved.
tutor04.mak(70) : fatal error U1001: syntax error : illegal character '<' in macro
Stop.
C:\vs2022_make>Clinica32.exe
'Clinica32.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\vs2022_make>
Code: Select all | Expand
link /out:$@ $*
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@
Code: Select all | Expand
Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation. All rights reserved.
tutor04.mak(70) : fatal error U1001: syntax error : illegal character '<' in macro
Stop.
C:\vs2022_make>Clinica32.exe
'Clinica32.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\vs2022_make>
Code: Select all | Expand
link /out:$@ $*
# Regla para compilar archivos .c
$(OBJ_PATH)\%.obj: $(C_PATH)\%.c
$(CC) $(CFLAGS) /c $< /Fo$@
Code: Select all | Expand
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : error LNK2001: unresolved external symbol WinMainCRTStartup
one.exe : fatal error LNK1120: 1 unresolved externals
Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32
.SUFFIXES: .prg .c .obj .rc .res
PRG = \
prg\one.PRG \
prg\two.PRG \
prg\three.PRG
OBJ=$(PRG:.PRG=.OBJ)
OBJS=$(OBJ:.\=.\obj\)
PROJECT: one.EXE
# Enlace final
one.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
$(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
@type link.log
one.res : one.rc
$(VCDIR)\rc.exe -r -d__FLAT__ one.rc
.prg.obj:
$(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
Code: Select all | Expand
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : error LNK2001: unresolved external symbol WinMainCRTStartup
one.exe : fatal error LNK1120: 1 unresolved externals
Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32
.SUFFIXES: .prg .c .obj .rc .res
PRG = \
prg\one.PRG \
prg\two.PRG \
prg\three.PRG
OBJ=$(PRG:.PRG=.OBJ)
OBJS=$(OBJ:.\=.\obj\)
PROJECT: one.EXE
# Enlace final
one.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
$(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
@type link.log
one.res : one.rc
$(VCDIR)\rc.exe -r -d__FLAT__ one.rc
.prg.obj:
$(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
Code: Select all | Expand
one.c
three.c
two.c
Generating Code...
echo prg\one.OBJ prg\two.OBJ prg\three.OBJ > msvc.tmp
Vinculando...
IF EXIST one.res echo one.res >> msvc.tmp
c:\vc2022\bin32\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libucrt /NODEFAULTLIB:msvcrt /force:multiple > link.log
NMAKE : fatal error U1077: 'c:\vc2022\bin32\link' : return code '0x460'
Stop.
C:\vs2022_make>one.exe
'one.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\vs2022_make>
Code: Select all | Expand
LINK : fatal error LNK1181: cannot open input file 'prg\one.OBJ'
Code: Select all | Expand
one.c
three.c
two.c
Generating Code...
echo prg\one.OBJ prg\two.OBJ prg\three.OBJ > msvc.tmp
Vinculando...
IF EXIST one.res echo one.res >> msvc.tmp
c:\vc2022\bin32\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libucrt /NODEFAULTLIB:msvcrt /force:multiple > link.log
NMAKE : fatal error U1077: 'c:\vc2022\bin32\link' : return code '0x460'
Stop.
C:\vs2022_make>one.exe
'one.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\vs2022_make>
Code: Select all | Expand
LINK : fatal error LNK1181: cannot open input file 'prg\one.OBJ'
Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32
.SUFFIXES: .prg .c .obj .rc .res
PRG = \
prg\one.PRG \
prg\two.PRG \
prg\three.PRG
# Modified to correctly reference obj folder
OBJ=$(PRG:.PRG=.obj)
OBJS=$(OBJ:prg\=obj\)
PROJECT: one.EXE
# Enlace final
one.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
$(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
@type link.log
one.res : one.rc
$(VCDIR)\rc.exe -r -d__FLAT__ one.rc
.prg.obj:
$(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
]]>Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32
.SUFFIXES: .prg .c .obj .rc .res
PRG = \
prg\one.PRG \
prg\two.PRG \
prg\three.PRG
# Modified to correctly reference obj folder
OBJ=$(PRG:.PRG=.obj)
OBJS=$(OBJ:prg\=obj\)
PROJECT: one.EXE
# Enlace final
one.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
$(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
@type link.log
one.res : one.rc
$(VCDIR)\rc.exe -r -d__FLAT__ one.rc
.prg.obj:
$(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
]]>Code: Select all | Expand
OBJS=$(OBJ:prg\=obj\)
Code: Select all | Expand
C:\vc2022_MAK>nmake one.mak
Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1073: don't know how to make 'obj\one.obj'
Stop.
C:\vc2022_MAK>one.exe
'one.exe' is not recognized as an internal or external command,
operable program or batch file.
Code: Select all | Expand
OBJS=$(OBJ:prg\=obj\)
Code: Select all | Expand
C:\vc2022_MAK>nmake one.mak
Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1073: don't know how to make 'obj\one.obj'
Stop.
C:\vc2022_MAK>one.exe
'one.exe' is not recognized as an internal or external command,
operable program or batch file.
Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32
.SUFFIXES: .prg .c .obj .rc .res
PRG = \
prg\one.PRG \
prg\two.PRG \
prg\three.PRG
OBJ=$(PRG:.PRG=.obj)
OBJS=$(OBJ:prg\=obj\)
# Crear directorio obj si no existe
!IF ![if not exist obj mkdir obj]
!ENDIF
PROJECT: one.EXE
# Enlace final
one.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
$(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
@type link.log
one.res : one.rc
$(VCDIR)\rc.exe -r -d__FLAT__ one.rc
# Regla explícita para construir obj\*.obj desde prg\*.prg
{prg\}.prg{obj\}.obj:
$(HBDIR)\bin\harbour $< /n /w /o$@ /i$(FWDIR)\include;$(HBDIR)\include
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Fo$@ $*.c
]]>Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32
.SUFFIXES: .prg .c .obj .rc .res
PRG = \
prg\one.PRG \
prg\two.PRG \
prg\three.PRG
OBJ=$(PRG:.PRG=.obj)
OBJS=$(OBJ:prg\=obj\)
# Crear directorio obj si no existe
!IF ![if not exist obj mkdir obj]
!ENDIF
PROJECT: one.EXE
# Enlace final
one.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
$(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
@type link.log
one.res : one.rc
$(VCDIR)\rc.exe -r -d__FLAT__ one.rc
# Regla explícita para construir obj\*.obj desde prg\*.prg
{prg\}.prg{obj\}.obj:
$(HBDIR)\bin\harbour $< /n /w /o$@ /i$(FWDIR)\include;$(HBDIR)\include
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Fo$@ $*.c
]]>Code: Select all | Expand
obj\one.OBJ : fatal error LNK1107: invalid or corrupt file: cannot read at 0x588
Code: Select all | Expand
obj\one.OBJ obj\two.OBJ obj\three.OBJ
c:\fwh\lib\FiveH32.lib c:\fwh\lib\FiveHC32.lib
c:\harbour_msvc\lib\win\msvc\hbrtl.lib
c:\harbour_msvc\lib\win\msvc\hbvm.lib
c:\harbour_msvc\lib\win\msvc\gtgui.lib
c:\harbour_msvc\lib\win\msvc\hblang.lib
c:\harbour_msvc\lib\win\msvc\hbmacro.lib
c:\harbour_msvc\lib\win\msvc\hbrdd.lib
c:\harbour_msvc\lib\win\msvc\rddntx.lib
c:\harbour_msvc\lib\win\msvc\rddcdx.lib
c:\harbour_msvc\lib\win\msvc\rddfpt.lib
c:\harbour_msvc\lib\win\msvc\hbsix.lib
c:\harbour_msvc\lib\win\msvc\hbdebug.lib
c:\harbour_msvc\lib\win\msvc\hbcommon.lib
c:\harbour_msvc\lib\win\msvc\hbpp.lib
c:\harbour_msvc\lib\win\msvc\hbwin.lib
c:\harbour_msvc\lib\win\msvc\hbcplr.lib
c:\harbour_msvc\lib\win\msvc\xhb.lib
c:\harbour_msvc\lib\win\msvc\hbpcre.lib
c:\harbour_msvc\lib\win\msvc\hbct.lib
c:\harbour_msvc\lib\win\msvc\hbcpage.lib
c:\harbour_msvc\lib\win\msvc\hbzlib.lib
c:\harbour_msvc\lib\win\msvc\png.lib
c:\harbour_msvc\lib\win\msvc\hbziparc.lib
c:\harbour_msvc\lib\win\msvc\hbmzip.lib
c:\harbour_msvc\lib\win\msvc\minizip.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comctl32.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
iphlpapi.lib
mpr.lib
version.lib
wsock32.lib
msimg32.lib
oledlg.lib
psapi.lib
gdiplus.lib
winmm.lib
ws2_32.lib
one.res
Code: Select all | Expand
obj\one.OBJ : fatal error LNK1107: invalid or corrupt file: cannot read at 0x588
Code: Select all | Expand
obj\one.OBJ obj\two.OBJ obj\three.OBJ
c:\fwh\lib\FiveH32.lib c:\fwh\lib\FiveHC32.lib
c:\harbour_msvc\lib\win\msvc\hbrtl.lib
c:\harbour_msvc\lib\win\msvc\hbvm.lib
c:\harbour_msvc\lib\win\msvc\gtgui.lib
c:\harbour_msvc\lib\win\msvc\hblang.lib
c:\harbour_msvc\lib\win\msvc\hbmacro.lib
c:\harbour_msvc\lib\win\msvc\hbrdd.lib
c:\harbour_msvc\lib\win\msvc\rddntx.lib
c:\harbour_msvc\lib\win\msvc\rddcdx.lib
c:\harbour_msvc\lib\win\msvc\rddfpt.lib
c:\harbour_msvc\lib\win\msvc\hbsix.lib
c:\harbour_msvc\lib\win\msvc\hbdebug.lib
c:\harbour_msvc\lib\win\msvc\hbcommon.lib
c:\harbour_msvc\lib\win\msvc\hbpp.lib
c:\harbour_msvc\lib\win\msvc\hbwin.lib
c:\harbour_msvc\lib\win\msvc\hbcplr.lib
c:\harbour_msvc\lib\win\msvc\xhb.lib
c:\harbour_msvc\lib\win\msvc\hbpcre.lib
c:\harbour_msvc\lib\win\msvc\hbct.lib
c:\harbour_msvc\lib\win\msvc\hbcpage.lib
c:\harbour_msvc\lib\win\msvc\hbzlib.lib
c:\harbour_msvc\lib\win\msvc\png.lib
c:\harbour_msvc\lib\win\msvc\hbziparc.lib
c:\harbour_msvc\lib\win\msvc\hbmzip.lib
c:\harbour_msvc\lib\win\msvc\minizip.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comctl32.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
iphlpapi.lib
mpr.lib
version.lib
wsock32.lib
msimg32.lib
oledlg.lib
psapi.lib
gdiplus.lib
winmm.lib
ws2_32.lib
one.res
Code: Select all | Expand
/*
* Harbour 3.2.0dev (r2008190002)
* Microsoft Visual C 19.27.29112 (32-bit)
* Generated C source from "prg\one.prg"
*/
#include "hbvmpub.h"
#include "hbinit.h"
HB_FUNC( MAIN );
HB_FUNC_EXTERN( TWO );
HB_FUNC_EXTERN( THREE );
HB_FUNC_EXTERN( FW_GT );
HB_FUNC_EXTERN( ERRORSYS );
HB_FUNC_INITSTATICS();
HB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_ONE )
{ "MAIN", {HB_FS_PUBLIC | HB_FS_FIRST | HB_FS_LOCAL}, {HB_FUNCNAME( MAIN )}, NULL },
{ "TWO", {HB_FS_PUBLIC}, {HB_FUNCNAME( TWO )}, NULL },
{ "THREE", {HB_FS_PUBLIC}, {HB_FUNCNAME( THREE )}, NULL },
{ "FW_GT", {HB_FS_PUBLIC}, {HB_FUNCNAME( FW_GT )}, NULL },
{ "ERRORSYS", {HB_FS_PUBLIC}, {HB_FUNCNAME( ERRORSYS )}, NULL },
{ "(_INITSTATICS00002)", {HB_FS_INITEXIT | HB_FS_LOCAL}, {hb_INITSTATICS}, NULL }
HB_INIT_SYMBOLS_EX_END( hb_vm_SymbolInit_ONE, "prg\\one.prg", 0x0, 0x0003 )
#if defined( HB_PRAGMA_STARTUP )
#pragma startup hb_vm_SymbolInit_ONE
#elif defined( HB_DATASEG_STARTUP )
#define HB_DATASEG_BODY HB_DATASEG_FUNC( hb_vm_SymbolInit_ONE )
#include "hbiniseg.h"
#endif
HB_FUNC( MAIN )
{
static const HB_BYTE pcode[] =
{
36,7,0,176,1,0,20,0,36,9,0,176,2,0,
20,0,36,11,0,100,110,7
};
hb_vmExecute( pcode, symbols );
}
HB_FUNC_INITSTATICS()
{
static const HB_BYTE pcode[] =
{
117,5,0,2,0,116,5,0,4,0,0,82,1,0,
100,82,2,0,7
};
hb_vmExecute( pcode, symbols );
}
Code: Select all | Expand
/*
* Harbour 3.2.0dev (r2008190002)
* Microsoft Visual C 19.27.29112 (32-bit)
* Generated C source from "prg\one.prg"
*/
#include "hbvmpub.h"
#include "hbinit.h"
HB_FUNC( MAIN );
HB_FUNC_EXTERN( TWO );
HB_FUNC_EXTERN( THREE );
HB_FUNC_EXTERN( FW_GT );
HB_FUNC_EXTERN( ERRORSYS );
HB_FUNC_INITSTATICS();
HB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_ONE )
{ "MAIN", {HB_FS_PUBLIC | HB_FS_FIRST | HB_FS_LOCAL}, {HB_FUNCNAME( MAIN )}, NULL },
{ "TWO", {HB_FS_PUBLIC}, {HB_FUNCNAME( TWO )}, NULL },
{ "THREE", {HB_FS_PUBLIC}, {HB_FUNCNAME( THREE )}, NULL },
{ "FW_GT", {HB_FS_PUBLIC}, {HB_FUNCNAME( FW_GT )}, NULL },
{ "ERRORSYS", {HB_FS_PUBLIC}, {HB_FUNCNAME( ERRORSYS )}, NULL },
{ "(_INITSTATICS00002)", {HB_FS_INITEXIT | HB_FS_LOCAL}, {hb_INITSTATICS}, NULL }
HB_INIT_SYMBOLS_EX_END( hb_vm_SymbolInit_ONE, "prg\\one.prg", 0x0, 0x0003 )
#if defined( HB_PRAGMA_STARTUP )
#pragma startup hb_vm_SymbolInit_ONE
#elif defined( HB_DATASEG_STARTUP )
#define HB_DATASEG_BODY HB_DATASEG_FUNC( hb_vm_SymbolInit_ONE )
#include "hbiniseg.h"
#endif
HB_FUNC( MAIN )
{
static const HB_BYTE pcode[] =
{
36,7,0,176,1,0,20,0,36,9,0,176,2,0,
20,0,36,11,0,100,110,7
};
hb_vmExecute( pcode, symbols );
}
HB_FUNC_INITSTATICS()
{
static const HB_BYTE pcode[] =
{
117,5,0,2,0,116,5,0,4,0,0,82,1,0,
100,82,2,0,7
};
hb_vmExecute( pcode, symbols );
}
Code: Select all | Expand
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c
Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32
.SUFFIXES: .PRG .C .OBJ .RC .RES
PRG = \
prg\one.PRG \
prg\two.PRG \
prg\three.PRG
#place here as many PRGs as needed
OBJ=$(PRG:.PRG=.OBJ)
OBJS=$(OBJ:.\=.\obj\)
PROJECT: ONE.EXE
one.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbdebug.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbpp.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbwin.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcplr.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\xhb.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbpcre.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbct.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcpage.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbzlib.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\png.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmzip.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\minizip.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
$(VCDIR)\link @msvc.tmp /out:One.exe /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:msvcrt > link.log
@type link.log
one.res : one.rc
$(VCDIR)\rc.exe -r -d__FLAT__ one.rc
.PRG.OBJ:
$(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c
Code: Select all | Expand
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c
Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32
.SUFFIXES: .PRG .C .OBJ .RC .RES
PRG = \
prg\one.PRG \
prg\two.PRG \
prg\three.PRG
#place here as many PRGs as needed
OBJ=$(PRG:.PRG=.OBJ)
OBJS=$(OBJ:.\=.\obj\)
PROJECT: ONE.EXE
one.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbdebug.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbpp.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbwin.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcplr.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\xhb.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbpcre.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbct.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcpage.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbzlib.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\png.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmzip.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\minizip.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
$(VCDIR)\link @msvc.tmp /out:One.exe /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:msvcrt > link.log
@type link.log
one.res : one.rc
$(VCDIR)\rc.exe -r -d__FLAT__ one.rc
.PRG.OBJ:
$(HBDIR)\bin\harbour $< /n /w /Oobj\ /i$(FWDIR)\include;$(HBDIR)\include
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foprg\ obj\*.c
Code: Select all | Expand
LINK : fatal error LNK1181: cannot open input file 'prg\one.OBJ'
Code: Select all | Expand
LINK : fatal error LNK1181: cannot open input file 'prg\one.OBJ'
Code: Select all | Expand
setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
nmake test.mak
endlocal
myapp.exe
Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2025
# Rutas de herramientas y librerías
HBDIR=c:\harbour
FWDIR=c:\fwh
VCDIR=c:\Program\ Files\ (x86)\Microsoft\ Visual\ Studio\ 11.0\VC
.SUFFIXES: .prg .c .obj .rc .res
PRG = \
prg\one.prg \
prg\two.prg \
prg\three.prg
#place here as many PRGs as needed
OBJ=$(PRG:.prg=.obj)
OBJS=$(OBJ:prg=obj)
PROJECT: myapp.exe
myapp.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbdebug.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbpp.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbwin.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcplr.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\xhb.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbpcre.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbct.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcpage.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbzlib.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\png.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmzip.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\minizip.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
@echo ucrt.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
link @msvc.tmp /out:myapp.exe /nologo /subsystem:windows /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libucrt > link.log
@type link.log
one.res : one.rc
rc.exe -r -d__FLAT__ one.rc
obj\one.obj : prg\one.prg
$(HBDIR)\bin\win\msvc\harbour prg\one.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include
cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
obj\two.obj : prg\two.prg
$(HBDIR)\bin\win\msvc\harbour prg\two.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include
cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
obj\three.obj : prg\three.prg
$(HBDIR)\bin\win\msvc\harbour prg\three.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include
cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
Code: Select all | Expand
obj\%.obj : prg\%.prg
$(HBDIR)\bin\win\msvc\harbour $< /n /w /Oobj\$@ /i$(FWDIR)\include;$(HBDIR)\include
cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
Code: Select all | Expand
setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
nmake test.mak
endlocal
myapp.exe
Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2025
# Rutas de herramientas y librerías
HBDIR=c:\harbour
FWDIR=c:\fwh
VCDIR=c:\Program\ Files\ (x86)\Microsoft\ Visual\ Studio\ 11.0\VC
.SUFFIXES: .prg .c .obj .rc .res
PRG = \
prg\one.prg \
prg\two.prg \
prg\three.prg
#place here as many PRGs as needed
OBJ=$(PRG:.prg=.obj)
OBJS=$(OBJ:prg=obj)
PROJECT: myapp.exe
myapp.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbdebug.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcommon.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbpp.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbwin.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcplr.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\xhb.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbpcre.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbct.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbcpage.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbzlib.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\png.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbziparc.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmzip.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\minizip.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
@echo ucrt.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
link @msvc.tmp /out:myapp.exe /nologo /subsystem:windows /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libucrt > link.log
@type link.log
one.res : one.rc
rc.exe -r -d__FLAT__ one.rc
obj\one.obj : prg\one.prg
$(HBDIR)\bin\win\msvc\harbour prg\one.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include
cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
obj\two.obj : prg\two.prg
$(HBDIR)\bin\win\msvc\harbour prg\two.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include
cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
obj\three.obj : prg\three.prg
$(HBDIR)\bin\win\msvc\harbour prg\three.prg /n /w /Oobj\$< /i$(FWDIR)\include;$(HBDIR)\include
cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
Code: Select all | Expand
obj\%.obj : prg\%.prg
$(HBDIR)\bin\win\msvc\harbour $< /n /w /Oobj\$@ /i$(FWDIR)\include;$(HBDIR)\include
cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Foobj\ obj\*.c
]]>Precio: Grok-beta no es el modelo más económico, con costos de $38.15 por 1 millón de tokens de entrada y $114.44 por 1 millón de tokens de salida, lo que lo hace más caro en comparación con otros modelos como GPT-4o, Claude 3 Opus, y Gemini Pro.
]]>Precio: Grok-beta no es el modelo más económico, con costos de $38.15 por 1 millón de tokens de entrada y $114.44 por 1 millón de tokens de salida, lo que lo hace más caro en comparación con otros modelos como GPT-4o, Claude 3 Opus, y Gemini Pro.
]]>sysctrl2 wrote: Mon Jan 20, 2025 9:55 pm La única manera que veo es con API REST
https://www.fedex.com/es-mx/resources-tools/api.html
hay que averiguar si todas las empresas de paquetería cuenta con el Web Services
]]>sysctrl2 wrote: Mon Jan 20, 2025 9:55 pm La única manera que veo es con API REST
https://www.fedex.com/es-mx/resources-tools/api.html
hay que averiguar si todas las empresas de paquetería cuenta con el Web Services
]]>sysctrl2 wrote: Wed Jan 22, 2025 10:38 pm Querido amigo paisano de edomex,
como resolviste la vista en el prev. ?
saludos !!!
]]>sysctrl2 wrote: Wed Jan 22, 2025 10:38 pm Querido amigo paisano de edomex,
como resolviste la vista en el prev. ?
saludos !!!
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xtest.hbp -xhb -comp=msvc64
@endlocal
Code: Select all | Expand
-gui
#los prgs
.\PRG\test.prg
#recursos
#.\res\test.rc
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-optim-
-ldflag+=-aa -n-
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-opruebas
#-inc
-run
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
msginfo("Hola Mundo")
return nil
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xtest.hbp -xhb -comp=msvc64
@endlocal
Code: Select all | Expand
-gui
#los prgs
.\PRG\test.prg
#recursos
#.\res\test.rc
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-optim-
-ldflag+=-aa -n-
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-opruebas
#-inc
-run
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
msginfo("Hola Mundo")
return nil
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
msginfo("Hola Mundo")
return nil
Code: Select all | Expand
-gui
#los prgs
.\PRG\test.prg
#recursos
#.\res\test.rc
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-optim-
-ldflag+=-aa -n-
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-opruebas
#-inc
-run
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xtest.hbp -xhb -comp=msvc64
@endlocal
Code: Select all | Expand
C:\cmplar_xtest_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\test.prg'...
Generating C source output to 'obj\test.c'...
Done.
Lines 6, Functions/Procedures 2, pCodes 19
test.c
hbmk2: Linking... pruebas.exe
LINK : warning LNK4044: opci¢n '/aa' no reconocida; omitida
LINK : warning LNK4098: la biblioteca predeterminada'MSVCRT' entra en conflicto con otras bibliotecas; use la biblioteca /NODEFAULTLIB:biblioteca
LINK : warning LNK4217: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "ct.lib(ctmath2.obj)" en la funci¢n "HB_FUN_CEILING"
LINK : warning LNK4286: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "dbfntx.lib(dbfntx1.obj)"
LINK : warning LNK4286: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "dbfcdx.lib(dbfcdx1.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipplatformcomm.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipstring.obj)"
LINK : warning LNK4217: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""protected: class CZipString __cdecl CZipException::GetInternalErrorDescription(int,bool)" (?GetInternalErrorDescription@CZipException@@IEAA?AVCZipString@@H_N@Z)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zip.obj)" en la funci¢n ""char * __cdecl std::_Maklocstr<char>(char const *,char *,struct _Cvtvec const &)" (??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipnew.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcomp.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "rtl.lib(gtclip.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipplatformcomm.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "rtl.lib(hbwinole.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipstring.obj)"
LINK : warning LNK4217: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""protected: class CZipString __cdecl CZipException::GetInternalErrorDescription(int,bool)" (?GetInternalErrorDescription@CZipException@@IEAA?AVCZipString@@H_N@Z)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zip.obj)" en la funci¢n ""wchar_t * __cdecl std::_Maklocwcs(wchar_t const *)" (?_Maklocwcs@std@@YAPEA_WPEB_W@Z)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipnew.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcomp.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipplatformcomm.obj)" en la funci¢n ""class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""int `public: __cdecl CZipString::CZipString(char const *)'::`1'::dtor$0" (?dtor$0@?0???0CZipString@@QEAA@PEBD@Z@4HA)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipstring.obj)" en la funci¢n ""int (__cdecl CZipString::*__cdecl GetCZipStrCompFunc(bool,bool))(char const *)const " (?GetCZipStrCompFunc@@YAP8CZipString@@EBAHPEBD@Z_N1@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipnew.obj)" en la funci¢n ""void * __cdecl std::_Allocate_manually_vector_aligned<struct std::_Default_allocate_traits>(unsigned __int64)" (??$_Allocate_manually_vector_aligned@U_Default_allocate_traits@std@@@std@@YAPEAX_K@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcomp.obj)" en la funci¢n "hb_CmpTdSpan"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4217: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(ziparchive.obj)" en la funci¢n ""public: virtual unsigned int __cdecl CZipFile::Read(void *,unsigned int)" (?Read@CZipFile@@UEAAIPEAXI@Z)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipexception.obj)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4217: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(ziparchive.obj)" en la funci¢n ""public: void __cdecl CZipString::Format(char const *,...)" (?Format@CZipString@@QEAAXPEBDZZ)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(zipexception.obj)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "pcrepos.lib(pcreposix.obj)"
LINK : warning LNK4286: "free" importa el s¡mbolo "libucrt.lib(free.obj)" definido en "zlib.lib(zutil.obj)"
LINK : warning LNK4286: "free" importa el s¡mbolo "libucrt.lib(free.obj)" definido en "vm.lib(mainwin.obj)"
.....
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipAddPathStringI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipAddPathEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::GraphicsPath::AddEllipse(int,int,int,int)" (?AddEllipse@GraphicsPath@Gdiplus@@QEAA?AW4Status@2@HHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipAddPathEllipseI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipAddPathPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::GraphicsPath::AddPie(int,int,int,int,float,float)" (?AddPie@GraphicsPath@Gdiplus@@QEAA?AW4Status@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateMatrix sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Matrix::Matrix(void)" (??0Matrix@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteMatrix sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Matrix::~Matrix(void)" (??1Matrix@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipTranslateMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::RotateAt(float,class Gdiplus::PointF const &,enum Gdiplus::MatrixOrder)" (?RotateAt@Matrix@Gdiplus@@QEAA?AW4Status@2@MAEBVPointF@2@W4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipTranslateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipScaleMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::Scale(float,float,enum Gdiplus::MatrixOrder)" (?Scale@Matrix@Gdiplus@@QEAA?AW4Status@2@MMW4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipScaleMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipRotateMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::RotateAt(float,class Gdiplus::PointF const &,enum Gdiplus::MatrixOrder)" (?RotateAt@Matrix@Gdiplus@@QEAA?AW4Status@2@MAEBVPointF@2@W4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipRotateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateRegionRectI sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::Region(class Gdiplus::Rect const &)" (??0Region@Gdiplus@@QEAA@AEBVRect@1@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateRegionPath sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::Region(class Gdiplus::GraphicsPath const *)" (??0Region@Gdiplus@@QEAA@PEBVGraphicsPath@1@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateRegionPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteRegion sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::~Region(void)" (??1Region@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCloneBrush sin resolver al que se hace referencia en la funci¢n "public: virtual class Gdiplus::Brush * __cdecl Gdiplus::Brush::Clone(void)const " (?Clone@Brush@Gdiplus@@UEBAPEAV12@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCloneBrush sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteBrush sin resolver al que se hace referencia en la funci¢n "public: virtual __cdecl Gdiplus::Brush::~Brush(void)" (??1Brush@Gdiplus@@UEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDeleteBrush sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateTexture sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::TextureBrush::TextureBrush(class Gdiplus::Image *,enum Gdiplus::WrapMode)" (??0TextureBrush@Gdiplus@@QEAA@PEAVImage@1@W4WrapMode@1@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateTexture sin resolver
....
GetHBITMAP@Bitmap@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@PEAPEAUHBITMAP__@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateHBITMAPFromBitmap sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateBitmapFromResource sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Bitmap::Bitmap(struct HINSTANCE__ *,wchar_t const *)" (??0Bitmap@Gdiplus@@QEAA@PEAUHINSTANCE__@@PEB_W@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateBitmapFromResource sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCloneBitmapAreaI sin resolver al que se hace referencia en la funci¢n "public: class Gdiplus::Bitmap * __cdecl Gdiplus::Bitmap::Clone(int,int,int,int,int)" (?Clone@Bitmap@Gdiplus@@QEAAPEAV12@HHHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCloneBitmapAreaI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapLockBits sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::LockBits(class Gdiplus::Rect const *,unsigned int,int,class Gdiplus::BitmapData *)" (?LockBits@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEBVRect@2@IHPEAVBitmapData@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapLockBits sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapUnlockBits sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::UnlockBits(class Gdiplus::BitmapData *)" (?UnlockBits@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEAVBitmapData@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapUnlockBits sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapGetPixel sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::GetPixel(int,int,class Gdiplus::Color *)" (?GetPixel@Bitmap@Gdiplus@@QEAA?AW4Status@2@HHPEAVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapGetPixel sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapSetPixel sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::SetPixel(int,int,class Gdiplus::Color const &)" (?SetPixel@Bitmap@Gdiplus@@QEAA?AW4Status@2@HHAEBVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapSetPixel sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapApplyEffect sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::ApplyEffect(class Gdiplus::Effect *,struct tagRECT *)" (?ApplyEffect@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEAVEffect@2@PEAUtagRECT@@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapSetResolution sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::SetResolution(float,float)" (?SetResolution@Bitmap@Gdiplus@@QEAA?AW4Status@2@MM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapSetResolution sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateImageAttributes sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::ImageAttributes::ImageAttributes(void)" (??0ImageAttributes@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateImageAttributes sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesColorMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetColorMatrix(struct Gdiplus::ColorMatrix const *,enum Gdiplus::ColorMatrixFlags,enum Gdiplus::ColorAdjustType)" (?SetColorMatrix@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@PEBUColorMatrix@2@W4ColorMatrixFlags@2@W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetImageAttributesColorMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesGamma sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetGamma(float,enum Gdiplus::ColorAdjustType)" (?SetGamma@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@MW4ColorAdjustType@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesColorKeys sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetColorKey(class Gdiplus::Color const &,class Gdiplus::Color const &,enum Gdiplus::ColorAdjustType)" (?SetColorKey@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@0W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesRemapTable sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetRemapTable(unsigned int,struct Gdiplus::ColorMap const *,enum Gdiplus::ColorAdjustType)" (?SetRemapTable@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@IPEBUColorMap@2@W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetImageAttributesRemapTable sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateFromHDC sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Graphics::Graphics(struct HDC__ *)" (??0Graphics@Gdiplus@@QEAA@PEAUHDC__@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateFromHDC sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteGraphics sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Graphics::~Graphics(void)" (??1Graphics@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDeleteGraphics sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetSmoothingMode sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetSmoothingMode(enum Gdiplus::SmoothingMode)" (?SetSmoothingMode@Graphics@Gdiplus@@QEAA?AW4Status@2@W4SmoothingMode@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetSmoothingMode sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetTextRenderingHint sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetTextRenderingHint(enum Gdiplus::TextRenderingHint)" (?SetTextRenderingHint@Graphics@Gdiplus@@QEAA?AW4Status@2@W4TextRenderingHint@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetTextRenderingHint sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetInterpolationMode sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetInterpolationMode(enum Gdiplus::InterpolationMode)" (?SetInterpolationMode@Graphics@Gdiplus@@QEAA?AW4Status@2@W4InterpolationMode@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetInterpolationMode sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetWorldTransform sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetTransform(class Gdiplus::Matrix const *)" (?SetTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVMatrix@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipResetWorldTransform sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::ResetTransform(void)" (?ResetTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipResetWorldTransform sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetPageUnit sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Unit __cdecl Gdiplus::Graphics::GetPageUnit(void)const " (?GetPageUnit@Graphics@Gdiplus@@QEBA?AW4Unit@2@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetPageScale sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetPageScale(void)const " (?GetPageScale@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetDpiX sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetDpiX(void)const " (?GetDpiX@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetDpiY sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetDpiY(void)const " (?GetDpiY@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawLine sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawLine(class Gdiplus::Pen const *,float,float,float,float)" (?DrawLine@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawLine sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawLinesI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawLines(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawLines@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawArcI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawArc(class Gdiplus::Pen const *,int,int,int,int,float,float)" (?DrawArc@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawBeziersI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawBeziers(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawBeziers@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawRectangleI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawRectangle(class Gdiplus::Pen const *,int,int,int,int)" (?DrawRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawEllipse(class Gdiplus::Pen const *,int,int,int,int)" (?DrawEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPie(class Gdiplus::Pen const *,int,int,int,int,float,float)" (?DrawPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPolygonI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPolygon(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawPolygon@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPath sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPath(class Gdiplus::Pen const *,class Gdiplus::GraphicsPath const *)" (?DrawPath@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVGraphicsPath@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawCurve(class Gdiplus::Pen const *,class Gdiplus::Point const *,int,float)" (?DrawCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@HM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawClosedCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawClosedCurve(class Gdiplus::Pen const *,class Gdiplus::Point const *,int,float)" (?DrawClosedCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@HM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGraphicsClear sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::Clear(class Gdiplus::Color const &)" (?Clear@Graphics@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipGraphicsClear sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillRectangle sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillRectangle(class Gdiplus::Brush const *,float,float,float,float)" (?FillRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillRectangle sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillRectangleI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillRectangle(class Gdiplus::Brush const *,int,int,int,int)" (?FillRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillRectangleI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPolygonI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPolygon(class Gdiplus::Brush const *,class Gdiplus::Point const *,int,enum Gdiplus::FillMode)" (?FillPolygon@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVPoint@2@HW4FillMode@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillEllipse sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillEllipse(class Gdiplus::Brush const *,float,float,float,float)" (?FillEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillEllipse sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillEllipse(class Gdiplus::Brush const *,int,int,int,int)" (?FillEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPie(class Gdiplus::Brush const *,int,int,int,int,float,float)" (?FillPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPath sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPath(class Gdiplus::Brush const *,class Gdiplus::GraphicsPath const *)" (?FillPath@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVGraphicsPath@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillClosedCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillClosedCurve(class Gdiplus::Brush const *,class Gdiplus::Point const *,int,enum Gdiplus::FillMode,float)" (?FillClosedCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVPoint@2@HW4FillMode@2@M@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawImageI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawImage(class Gdiplus::Image *,int,int)" (?DrawImage@Graphics@Gdiplus@@QEAA?AW4Status@2@PEAVImage@2@HH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawImageI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawImageRectI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawImage(class Gdiplus::Image *,int,int,int,int)" (?DrawImage@Graphics@Gdiplus@@QEAA?AW4Status@2@PEAVImage@2@HHHH@Z)
...
ace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::RotateTransform(float,enum Gdiplus::MatrixOrder)" (?RotateTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@MW4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipSetPageUnit sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetPageUnit(enum Gdiplus::Unit)" (?SetPageUnit@Graphics@Gdiplus@@QEAA?AW4Status@2@W4Unit@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawArc sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawArc(class Gdiplus::Pen const *,float,float,float,float,float,float)" (?DrawArc@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawRectangle sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawRectangle(class Gdiplus::Pen const *,float,float,float,float)" (?DrawRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawEllipse sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawEllipse(class Gdiplus::Pen const *,float,float,float,float)" (?DrawEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawPie sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPie(class Gdiplus::Pen const *,float,float,float,float,float,float)" (?DrawPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipFillPie sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPie(class Gdiplus::Brush const *,float,float,float,float,float,float)" (?FillPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipIsClipEmpty sin resolver al que se hace referencia en la funci¢n "public: int __cdecl Gdiplus::Graphics::IsClipEmpty(void)const " (?IsClipEmpty@Graphics@Gdiplus@@QEBAHXZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipCreateMetafileFromStream sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Metafile::Metafile(struct IStream *)" (??0Metafile@Gdiplus@@QEAA@PEAUIStream@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDeleteFontFamily sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::FontFamily::~FontFamily(void)" (??1FontFamily@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipMeasureString sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::MeasureString(wchar_t const *,int,class Gdiplus::Font const *,class Gdiplus::PointF const &,class Gdiplus::StringFormat const *,class Gdiplus::RectF *)const " (?MeasureString@Graphics@Gdiplus@@QEBA?AW4Status@2@PEB_WHPEBVFont@2@AEBVPointF@2@PEBVStringFormat@2@PEAVRectF@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipStringFormatGetGenericDefault sin resolver al que se hace referencia en la funci¢n "public: static class Gdiplus::StringFormat const * __cdecl Gdiplus::StringFormat::GenericDefault(void)" (?GenericDefault@StringFormat@Gdiplus@@SAPEBV12@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipStringFormatGetGenericTypographic sin resolver al que se hace referencia en la funci¢n "public: static class Gdiplus::StringFormat const * __cdecl Gdiplus::StringFormat::GenericTypographic(void)" (?GenericTypographic@StringFormat@Gdiplus@@SAPEBV12@XZ)
FiveHC64.lib(richedi5.obj) : error LNK2019: s¡mbolo externo OleUIPasteSpecialA sin resolver al que se hace referencia en la funci¢n HB_FUN_REPASTESPECIAL5
FiveHC64.lib(richedit.obj) : error LNK2001: s¡mbolo externo OleUIPasteSpecialA sin resolver
ct.lib(ctmath2.obj) : error LNK2019: s¡mbolo externo __imp_floor sin resolver al que se hace referencia en la funci¢n HB_FUN_FLOOR
ct.lib(ascpos.obj) : error LNK2019: s¡mbolo externo __imp_isdigit sin resolver al que se hace referencia en la funci¢n do_ascpos
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_isdigit sin resolver
hbzip.lib(zipnew.obj) : error LNK2019: s¡mbolo externo __imp__localtime64 sin resolver al que se hace referencia en la funci¢n hb___GetFileNamesFromZip
hbzip.lib(zipfileheader.obj) : error LNK2001: s¡mbolo externo __imp__localtime64 sin resolver
hbzip.lib(zipfileheader.obj) : error LNK2019: s¡mbolo externo __imp__mktime64 sin resolver al que se hace referencia en la funci¢n "public: __int64 __cdecl CZipFileHeader::GetTime(void)const " (?GetTime@CZipFileHeader@@QEBA_JXZ)
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(ziparchive.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(zipstorage.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(zipexception.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
vm.lib(fm.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_srand sin resolver al que se hace referencia en la funci¢n "protected: void __cdecl CZipArchive::CryptCryptHeader(long,class CZipAutoBuffer &)" (?CryptCryptHeader@CZipArchive@@IEAAXJAEAVCZipAutoBuffer@@@Z)
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp_srand sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_rand sin resolver al que se hace referencia en la funci¢n "protected: void __cdecl CZipArchive::CryptCryptHeader(long,class CZipAutoBuffer &)" (?CryptCryptHeader@CZipArchive@@IEAAXJAEAVCZipAutoBuffer@@@Z)
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp_rand sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_strcoll sin resolver al que se hace referencia en la funci¢n "public: int __cdecl CZipString::Collate(char const *)const " (?Collate@CZipString@@QEBAHPEBD@Z)
hbzip.lib(zipstring.obj) : error LNK2001: s¡mbolo externo __imp_strcoll sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp__time64 sin resolver al que se hace referencia en la funci¢n "public: bool __cdecl CZipArchive::AddNewFile(struct CZipAddNewFileInfo &)" (?AddNewFile@CZipArchive@@QEAA_NAEAUCZipAddNewFileInfo@@@Z)
hbzip.lib(zipplatform.obj) : error LNK2001: s¡mbolo externo __imp__time64 sin resolver
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp__time64 sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp__tell sin resolver al que se hace referencia en la funci¢n "public: virtual unsigned __int64 __cdecl CZipFile::GetPosition(void)const " (?GetPosition@CZipFile@@UEBA_KXZ)
hbzip.lib(zipstorage.obj) : error LNK2001: s¡mbolo externo __imp__tell sin resolver
hbzip.lib(zipfile.obj) : error LNK2001: s¡mbolo externo __imp__tell sin resolver
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__stat64i32 sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::GetFileModTime(char const *,__int64 &)" (?GetFileModTime@ZipPlatform@@YA_NPEBDAEA_J@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__access sin resolver al que se hace referencia en la funci¢n "int __cdecl ZipPlatform::FileExists(char const *)" (?FileExists@ZipPlatform@@YAHPEBD@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__utime64 sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::SetFileModTime(char const *,__int64)" (?SetFileModTime@ZipPlatform@@YA_NPEBD_J@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__chdir sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::ChangeDirectory(char const *)" (?ChangeDirectory@ZipPlatform@@YA_NPEBD@Z)
hbzip.lib(zipexception.obj) : error LNK2019: s¡mbolo externo __imp_strncpy sin resolver al que se hace referencia en la funci¢n "public: int __cdecl CZipException::GetErrorMessage(char *,unsigned int,unsigned int *)" (?GetErrorMessage@CZipException@@QEAAHPEADIPEAI@Z)
pcrepos.lib(pcreposix.obj) : error LNK2001: s¡mbolo externo __imp_strncpy sin resolver
hbzip.lib(zippathcomponent.obj) : error LNK2019: s¡mbolo externo __imp__splitpath sin resolver al que se hace referencia en la funci¢n "public: void __cdecl CZipPathComponent::SetFullPath(char const *)" (?SetFullPath@CZipPathComponent@@QEAAXPEBD@Z)
common.lib(hbdate.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
common.lib(hbprintf.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(hvm.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(itemapi.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
rtl.lib(fstemp.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
common.lib(hbstr.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(hvm.obj) : error LNK2019: s¡mbolo externo __imp_div sin resolver al que se hace referencia en la funci¢n hb_vmSubDate
common.lib(hbdate.obj) : error LNK2001: s¡mbolo externo __imp_div sin resolver
vm.lib(itemapi.obj) : error LNK2019: s¡mbolo externo __imp__finite sin resolver al que se hace referencia en la funci¢n hb_itemStrBuf
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isxdigit sin resolver al que se hace referencia en la funci¢n HB_FUN_ISXDIGIT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isspace sin resolver al que se hace referencia en la funci¢n HB_FUN_ISSPACE
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_isspace sin resolver
common.lib(hbstr.obj) : error LNK2001: s¡mbolo externo __imp_isspace sin resolver
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_ispunct sin resolver al que se hace referencia en la funci¢n HB_FUN_ISPUNCT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isprint sin resolver al que se hace referencia en la funci¢n HB_FUN_ISPRINT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isgraph sin resolver al que se hace referencia en la funci¢n HB_FUN_ISGRAPH
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_iscntrl sin resolver al que se hace referencia en la funci¢n HB_FUN_ISCNTRL
rtl.lib(dirdrive.obj) : error LNK2019: s¡mbolo externo __imp_remove sin resolver al que se hace referencia en la funci¢n HB_FUN_HB_DISKREADY
rtl.lib(filesys.obj) : error LNK2019: s¡mbolo externo __imp__chdrive sin resolver al que se hace referencia en la funci¢n hb_fsChDrv
rtl.lib(filesys.obj) : error LNK2019: s¡mbolo externo __imp__getdrive sin resolver al que se hace referencia en la funci¢n hb_fsChDrv
rtl.lib(fparse.obj) : error LNK2019: s¡mbolo externo __imp_fgetc sin resolver al que se hace referencia en la funci¢n HB_FUN_FCHARCOUNT
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_toupper sin resolver al que se hace referencia en la funci¢n hb_str2number
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_tolower sin resolver al que se hace referencia en la funci¢n hb_strAtI
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_strerror_s sin resolver al que se hace referencia en la funci¢n hb_strerror
common.lib(hbprintf.obj) : error LNK2019: s¡mbolo externo __imp__dclass sin resolver al que se hace referencia en la funci¢n hb_vsnprintf
common.lib(hbprintf.obj) : error LNK2019: s¡mbolo externo __imp__dsign sin resolver al que se hace referencia en la funci¢n put_dbl
common.lib(hbtrace.obj) : error LNK2019: s¡mbolo externo __imp__dup sin resolver al que se hace referencia en la funci¢n hb_tr_trace
pruebas.exe : fatal error LNK1120: 200 externos sin resolver
hbmk2[xtest]: Error: Running linker. 1120
link.exe @C:\Users\leandro\AppData\Local\Temp\4\f88jtl.lnk
hbmk2: Error: Referenced, missing, but unknown function(s): CEILING(), SET(),
HB_UTF8STRTRAN(), HB_I18NGETBASELANGUAGE(), WEBVIEW2_SHOWDOWNLOADS(),
GDIPLUSSTARTUP(), GDIPLUSSHUTDOWN(), REPASTESPECIAL5(), FLOOR(),
ISXDIGIT(), ISSPACE(), ISPUNCT(), ISPRINT(), ISGRAPH(), ISCNTRL(),
HB_DISKREADY(), FCHARCOUNT()
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
msginfo("Hola Mundo")
return nil
Code: Select all | Expand
-gui
#los prgs
.\PRG\test.prg
#recursos
#.\res\test.rc
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-optim-
-ldflag+=-aa -n-
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-opruebas
#-inc
-run
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xtest.hbp -xhb -comp=msvc64
@endlocal
Code: Select all | Expand
C:\cmplar_xtest_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\test.prg'...
Generating C source output to 'obj\test.c'...
Done.
Lines 6, Functions/Procedures 2, pCodes 19
test.c
hbmk2: Linking... pruebas.exe
LINK : warning LNK4044: opci¢n '/aa' no reconocida; omitida
LINK : warning LNK4098: la biblioteca predeterminada'MSVCRT' entra en conflicto con otras bibliotecas; use la biblioteca /NODEFAULTLIB:biblioteca
LINK : warning LNK4217: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "ct.lib(ctmath2.obj)" en la funci¢n "HB_FUN_CEILING"
LINK : warning LNK4286: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "dbfntx.lib(dbfntx1.obj)"
LINK : warning LNK4286: "ceil" importa el s¡mbolo "libucrt.lib(ceil.obj)" definido en "dbfcdx.lib(dbfcdx1.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipplatformcomm.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipstring.obj)"
LINK : warning LNK4217: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""protected: class CZipString __cdecl CZipException::GetInternalErrorDescription(int,bool)" (?GetInternalErrorDescription@CZipException@@IEAA?AVCZipString@@H_N@Z)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zip.obj)" en la funci¢n ""char * __cdecl std::_Maklocstr<char>(char const *,char *,struct _Cvtvec const &)" (??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipnew.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipcomp.obj)"
LINK : warning LNK4286: "calloc" importa el s¡mbolo "libucrt.lib(calloc.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "rtl.lib(gtclip.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipplatformcomm.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "rtl.lib(hbwinole.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipstring.obj)"
LINK : warning LNK4217: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""protected: class CZipString __cdecl CZipException::GetInternalErrorDescription(int,bool)" (?GetInternalErrorDescription@CZipException@@IEAA?AVCZipString@@H_N@Z)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zip.obj)" en la funci¢n ""wchar_t * __cdecl std::_Maklocwcs(wchar_t const *)" (?_Maklocwcs@std@@YAPEA_WPEB_W@Z)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipnew.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipcomp.obj)"
LINK : warning LNK4286: "wcslen" importa el s¡mbolo "libucrt.lib(strnlen.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zippathcomponent.obj)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipplatformcomm.obj)" en la funci¢n ""class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipexception.obj)" en la funci¢n ""int `public: __cdecl CZipString::CZipString(char const *)'::`1'::dtor$0" (?dtor$0@?0???0CZipString@@QEAA@PEBD@Z@4HA)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipmemfile.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcentraldir.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcompatibility.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipplatform.obj)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipstring.obj)" en la funci¢n ""int (__cdecl CZipString::*__cdecl GetCZipStrCompFunc(bool,bool))(char const *)const " (?GetCZipStrCompFunc@@YAP8CZipString@@EBAHPEBD@Z_N1@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipnew.obj)" en la funci¢n ""void * __cdecl std::_Allocate_manually_vector_aligned<struct std::_Default_allocate_traits>(unsigned __int64)" (??$_Allocate_manually_vector_aligned@U_Default_allocate_traits@std@@@std@@YAPEAX_K@Z)"
LINK : warning LNK4217: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipcomp.obj)" en la funci¢n "hb_CmpTdSpan"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(zipfileheader.obj)"
LINK : warning LNK4286: "_invalid_parameter_noinfo_noreturn" importa el s¡mbolo "libucrt.lib(invalid_parameter.obj)" definido en "hbzip.lib(ziparchive.obj)"
LINK : warning LNK4217: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(ziparchive.obj)" en la funci¢n ""public: virtual unsigned int __cdecl CZipFile::Read(void *,unsigned int)" (?Read@CZipFile@@UEAAIPEAXI@Z)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipexception.obj)"
LINK : warning LNK4286: "_errno" importa el s¡mbolo "libucrt.lib(errno.obj)" definido en "hbzip.lib(zipfile.obj)"
LINK : warning LNK4217: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(ziparchive.obj)" en la funci¢n ""public: void __cdecl CZipString::Format(char const *,...)" (?Format@CZipString@@QEAAXPEBDZZ)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(zipstorage.obj)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "hbzip.lib(zipexception.obj)"
LINK : warning LNK4286: "__stdio_common_vsprintf" importa el s¡mbolo "libucrt.lib(output.obj)" definido en "pcrepos.lib(pcreposix.obj)"
LINK : warning LNK4286: "free" importa el s¡mbolo "libucrt.lib(free.obj)" definido en "zlib.lib(zutil.obj)"
LINK : warning LNK4286: "free" importa el s¡mbolo "libucrt.lib(free.obj)" definido en "vm.lib(mainwin.obj)"
.....
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipAddPathStringI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipAddPathEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::GraphicsPath::AddEllipse(int,int,int,int)" (?AddEllipse@GraphicsPath@Gdiplus@@QEAA?AW4Status@2@HHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipAddPathEllipseI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipAddPathPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::GraphicsPath::AddPie(int,int,int,int,float,float)" (?AddPie@GraphicsPath@Gdiplus@@QEAA?AW4Status@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateMatrix sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Matrix::Matrix(void)" (??0Matrix@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteMatrix sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Matrix::~Matrix(void)" (??1Matrix@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipTranslateMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::RotateAt(float,class Gdiplus::PointF const &,enum Gdiplus::MatrixOrder)" (?RotateAt@Matrix@Gdiplus@@QEAA?AW4Status@2@MAEBVPointF@2@W4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipTranslateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipScaleMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::Scale(float,float,enum Gdiplus::MatrixOrder)" (?Scale@Matrix@Gdiplus@@QEAA?AW4Status@2@MMW4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipScaleMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipRotateMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Matrix::RotateAt(float,class Gdiplus::PointF const &,enum Gdiplus::MatrixOrder)" (?RotateAt@Matrix@Gdiplus@@QEAA?AW4Status@2@MAEBVPointF@2@W4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipRotateMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateRegionRectI sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::Region(class Gdiplus::Rect const &)" (??0Region@Gdiplus@@QEAA@AEBVRect@1@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateRegionPath sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::Region(class Gdiplus::GraphicsPath const *)" (??0Region@Gdiplus@@QEAA@PEBVGraphicsPath@1@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateRegionPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteRegion sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Region::~Region(void)" (??1Region@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCloneBrush sin resolver al que se hace referencia en la funci¢n "public: virtual class Gdiplus::Brush * __cdecl Gdiplus::Brush::Clone(void)const " (?Clone@Brush@Gdiplus@@UEBAPEAV12@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCloneBrush sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteBrush sin resolver al que se hace referencia en la funci¢n "public: virtual __cdecl Gdiplus::Brush::~Brush(void)" (??1Brush@Gdiplus@@UEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDeleteBrush sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateTexture sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::TextureBrush::TextureBrush(class Gdiplus::Image *,enum Gdiplus::WrapMode)" (??0TextureBrush@Gdiplus@@QEAA@PEAVImage@1@W4WrapMode@1@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateTexture sin resolver
....
GetHBITMAP@Bitmap@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@PEAPEAUHBITMAP__@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateHBITMAPFromBitmap sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateBitmapFromResource sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Bitmap::Bitmap(struct HINSTANCE__ *,wchar_t const *)" (??0Bitmap@Gdiplus@@QEAA@PEAUHINSTANCE__@@PEB_W@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateBitmapFromResource sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCloneBitmapAreaI sin resolver al que se hace referencia en la funci¢n "public: class Gdiplus::Bitmap * __cdecl Gdiplus::Bitmap::Clone(int,int,int,int,int)" (?Clone@Bitmap@Gdiplus@@QEAAPEAV12@HHHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCloneBitmapAreaI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapLockBits sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::LockBits(class Gdiplus::Rect const *,unsigned int,int,class Gdiplus::BitmapData *)" (?LockBits@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEBVRect@2@IHPEAVBitmapData@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapLockBits sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapUnlockBits sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::UnlockBits(class Gdiplus::BitmapData *)" (?UnlockBits@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEAVBitmapData@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapUnlockBits sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapGetPixel sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::GetPixel(int,int,class Gdiplus::Color *)" (?GetPixel@Bitmap@Gdiplus@@QEAA?AW4Status@2@HHPEAVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapGetPixel sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapSetPixel sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::SetPixel(int,int,class Gdiplus::Color const &)" (?SetPixel@Bitmap@Gdiplus@@QEAA?AW4Status@2@HHAEBVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapSetPixel sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapApplyEffect sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::ApplyEffect(class Gdiplus::Effect *,struct tagRECT *)" (?ApplyEffect@Bitmap@Gdiplus@@QEAA?AW4Status@2@PEAVEffect@2@PEAUtagRECT@@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipBitmapSetResolution sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Bitmap::SetResolution(float,float)" (?SetResolution@Bitmap@Gdiplus@@QEAA?AW4Status@2@MM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipBitmapSetResolution sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateImageAttributes sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::ImageAttributes::ImageAttributes(void)" (??0ImageAttributes@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateImageAttributes sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesColorMatrix sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetColorMatrix(struct Gdiplus::ColorMatrix const *,enum Gdiplus::ColorMatrixFlags,enum Gdiplus::ColorAdjustType)" (?SetColorMatrix@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@PEBUColorMatrix@2@W4ColorMatrixFlags@2@W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetImageAttributesColorMatrix sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesGamma sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetGamma(float,enum Gdiplus::ColorAdjustType)" (?SetGamma@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@MW4ColorAdjustType@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesColorKeys sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetColorKey(class Gdiplus::Color const &,class Gdiplus::Color const &,enum Gdiplus::ColorAdjustType)" (?SetColorKey@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@0W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetImageAttributesRemapTable sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::ImageAttributes::SetRemapTable(unsigned int,struct Gdiplus::ColorMap const *,enum Gdiplus::ColorAdjustType)" (?SetRemapTable@ImageAttributes@Gdiplus@@QEAA?AW4Status@2@IPEBUColorMap@2@W4ColorAdjustType@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetImageAttributesRemapTable sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipCreateFromHDC sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Graphics::Graphics(struct HDC__ *)" (??0Graphics@Gdiplus@@QEAA@PEAUHDC__@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipCreateFromHDC sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDeleteGraphics sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Graphics::~Graphics(void)" (??1Graphics@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDeleteGraphics sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetSmoothingMode sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetSmoothingMode(enum Gdiplus::SmoothingMode)" (?SetSmoothingMode@Graphics@Gdiplus@@QEAA?AW4Status@2@W4SmoothingMode@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetSmoothingMode sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetTextRenderingHint sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetTextRenderingHint(enum Gdiplus::TextRenderingHint)" (?SetTextRenderingHint@Graphics@Gdiplus@@QEAA?AW4Status@2@W4TextRenderingHint@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetTextRenderingHint sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetInterpolationMode sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetInterpolationMode(enum Gdiplus::InterpolationMode)" (?SetInterpolationMode@Graphics@Gdiplus@@QEAA?AW4Status@2@W4InterpolationMode@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipSetInterpolationMode sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipSetWorldTransform sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetTransform(class Gdiplus::Matrix const *)" (?SetTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVMatrix@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipResetWorldTransform sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::ResetTransform(void)" (?ResetTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipResetWorldTransform sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetPageUnit sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Unit __cdecl Gdiplus::Graphics::GetPageUnit(void)const " (?GetPageUnit@Graphics@Gdiplus@@QEBA?AW4Unit@2@XZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetPageScale sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetPageScale(void)const " (?GetPageScale@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetDpiX sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetDpiX(void)const " (?GetDpiX@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGetDpiY sin resolver al que se hace referencia en la funci¢n "public: float __cdecl Gdiplus::Graphics::GetDpiY(void)const " (?GetDpiY@Graphics@Gdiplus@@QEBAMXZ)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawLine sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawLine(class Gdiplus::Pen const *,float,float,float,float)" (?DrawLine@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawLine sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawLinesI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawLines(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawLines@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawArcI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawArc(class Gdiplus::Pen const *,int,int,int,int,float,float)" (?DrawArc@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawBeziersI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawBeziers(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawBeziers@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawRectangleI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawRectangle(class Gdiplus::Pen const *,int,int,int,int)" (?DrawRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawEllipse(class Gdiplus::Pen const *,int,int,int,int)" (?DrawEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPie(class Gdiplus::Pen const *,int,int,int,int,float,float)" (?DrawPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPolygonI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPolygon(class Gdiplus::Pen const *,class Gdiplus::Point const *,int)" (?DrawPolygon@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@H@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawPath sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPath(class Gdiplus::Pen const *,class Gdiplus::GraphicsPath const *)" (?DrawPath@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVGraphicsPath@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawCurve(class Gdiplus::Pen const *,class Gdiplus::Point const *,int,float)" (?DrawCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@HM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawClosedCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawClosedCurve(class Gdiplus::Pen const *,class Gdiplus::Point const *,int,float)" (?DrawClosedCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@PEBVPoint@2@HM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipGraphicsClear sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::Clear(class Gdiplus::Color const &)" (?Clear@Graphics@Gdiplus@@QEAA?AW4Status@2@AEBVColor@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipGraphicsClear sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillRectangle sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillRectangle(class Gdiplus::Brush const *,float,float,float,float)" (?FillRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillRectangle sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillRectangleI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillRectangle(class Gdiplus::Brush const *,int,int,int,int)" (?FillRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillRectangleI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPolygonI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPolygon(class Gdiplus::Brush const *,class Gdiplus::Point const *,int,enum Gdiplus::FillMode)" (?FillPolygon@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVPoint@2@HW4FillMode@2@@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillEllipse sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillEllipse(class Gdiplus::Brush const *,float,float,float,float)" (?FillEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillEllipse sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillEllipseI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillEllipse(class Gdiplus::Brush const *,int,int,int,int)" (?FillEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHH@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPieI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPie(class Gdiplus::Brush const *,int,int,int,int,float,float)" (?FillPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@HHHHMM@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillPath sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPath(class Gdiplus::Brush const *,class Gdiplus::GraphicsPath const *)" (?FillPath@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVGraphicsPath@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipFillPath sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipFillClosedCurve2I sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillClosedCurve(class Gdiplus::Brush const *,class Gdiplus::Point const *,int,enum Gdiplus::FillMode,float)" (?FillClosedCurve@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@PEBVPoint@2@HW4FillMode@2@M@Z)
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawImageI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawImage(class Gdiplus::Image *,int,int)" (?DrawImage@Graphics@Gdiplus@@QEAA?AW4Status@2@PEAVImage@2@HH@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2001: s¡mbolo externo GdipDrawImageI sin resolver
FiveHC64.lib(gdipfwh.obj) : error LNK2019: s¡mbolo externo GdipDrawImageRectI sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawImage(class Gdiplus::Image *,int,int,int,int)" (?DrawImage@Graphics@Gdiplus@@QEAA?AW4Status@2@PEAVImage@2@HHHH@Z)
...
ace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::RotateTransform(float,enum Gdiplus::MatrixOrder)" (?RotateTransform@Graphics@Gdiplus@@QEAA?AW4Status@2@MW4MatrixOrder@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipSetPageUnit sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::SetPageUnit(enum Gdiplus::Unit)" (?SetPageUnit@Graphics@Gdiplus@@QEAA?AW4Status@2@W4Unit@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawArc sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawArc(class Gdiplus::Pen const *,float,float,float,float,float,float)" (?DrawArc@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawRectangle sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawRectangle(class Gdiplus::Pen const *,float,float,float,float)" (?DrawRectangle@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawEllipse sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawEllipse(class Gdiplus::Pen const *,float,float,float,float)" (?DrawEllipse@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDrawPie sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::DrawPie(class Gdiplus::Pen const *,float,float,float,float,float,float)" (?DrawPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVPen@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipFillPie sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::FillPie(class Gdiplus::Brush const *,float,float,float,float,float,float)" (?FillPie@Graphics@Gdiplus@@QEAA?AW4Status@2@PEBVBrush@2@MMMMMM@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipIsClipEmpty sin resolver al que se hace referencia en la funci¢n "public: int __cdecl Gdiplus::Graphics::IsClipEmpty(void)const " (?IsClipEmpty@Graphics@Gdiplus@@QEBAHXZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipCreateMetafileFromStream sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::Metafile::Metafile(struct IStream *)" (??0Metafile@Gdiplus@@QEAA@PEAUIStream@@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipDeleteFontFamily sin resolver al que se hace referencia en la funci¢n "public: __cdecl Gdiplus::FontFamily::~FontFamily(void)" (??1FontFamily@Gdiplus@@QEAA@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipMeasureString sin resolver al que se hace referencia en la funci¢n "public: enum Gdiplus::Status __cdecl Gdiplus::Graphics::MeasureString(wchar_t const *,int,class Gdiplus::Font const *,class Gdiplus::PointF const &,class Gdiplus::StringFormat const *,class Gdiplus::RectF *)const " (?MeasureString@Graphics@Gdiplus@@QEBA?AW4Status@2@PEB_WHPEBVFont@2@AEBVPointF@2@PEBVStringFormat@2@PEAVRectF@2@@Z)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipStringFormatGetGenericDefault sin resolver al que se hace referencia en la funci¢n "public: static class Gdiplus::StringFormat const * __cdecl Gdiplus::StringFormat::GenericDefault(void)" (?GenericDefault@StringFormat@Gdiplus@@SAPEBV12@XZ)
FiveHC64.lib(gdiplus.obj) : error LNK2019: s¡mbolo externo GdipStringFormatGetGenericTypographic sin resolver al que se hace referencia en la funci¢n "public: static class Gdiplus::StringFormat const * __cdecl Gdiplus::StringFormat::GenericTypographic(void)" (?GenericTypographic@StringFormat@Gdiplus@@SAPEBV12@XZ)
FiveHC64.lib(richedi5.obj) : error LNK2019: s¡mbolo externo OleUIPasteSpecialA sin resolver al que se hace referencia en la funci¢n HB_FUN_REPASTESPECIAL5
FiveHC64.lib(richedit.obj) : error LNK2001: s¡mbolo externo OleUIPasteSpecialA sin resolver
ct.lib(ctmath2.obj) : error LNK2019: s¡mbolo externo __imp_floor sin resolver al que se hace referencia en la funci¢n HB_FUN_FLOOR
ct.lib(ascpos.obj) : error LNK2019: s¡mbolo externo __imp_isdigit sin resolver al que se hace referencia en la funci¢n do_ascpos
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_isdigit sin resolver
hbzip.lib(zipnew.obj) : error LNK2019: s¡mbolo externo __imp__localtime64 sin resolver al que se hace referencia en la funci¢n hb___GetFileNamesFromZip
hbzip.lib(zipfileheader.obj) : error LNK2001: s¡mbolo externo __imp__localtime64 sin resolver
hbzip.lib(zipfileheader.obj) : error LNK2019: s¡mbolo externo __imp__mktime64 sin resolver al que se hace referencia en la funci¢n "public: __int64 __cdecl CZipFileHeader::GetTime(void)const " (?GetTime@CZipFileHeader@@QEBA_JXZ)
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(ziparchive.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(zipstorage.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(zipexception.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
vm.lib(fm.obj) : error LNK2001: s¡mbolo externo __imp_realloc sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_srand sin resolver al que se hace referencia en la funci¢n "protected: void __cdecl CZipArchive::CryptCryptHeader(long,class CZipAutoBuffer &)" (?CryptCryptHeader@CZipArchive@@IEAAXJAEAVCZipAutoBuffer@@@Z)
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp_srand sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_rand sin resolver al que se hace referencia en la funci¢n "protected: void __cdecl CZipArchive::CryptCryptHeader(long,class CZipAutoBuffer &)" (?CryptCryptHeader@CZipArchive@@IEAAXJAEAVCZipAutoBuffer@@@Z)
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp_rand sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp_strcoll sin resolver al que se hace referencia en la funci¢n "public: int __cdecl CZipString::Collate(char const *)const " (?Collate@CZipString@@QEBAHPEBD@Z)
hbzip.lib(zipstring.obj) : error LNK2001: s¡mbolo externo __imp_strcoll sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp__time64 sin resolver al que se hace referencia en la funci¢n "public: bool __cdecl CZipArchive::AddNewFile(struct CZipAddNewFileInfo &)" (?AddNewFile@CZipArchive@@QEAA_NAEAUCZipAddNewFileInfo@@@Z)
hbzip.lib(zipplatform.obj) : error LNK2001: s¡mbolo externo __imp__time64 sin resolver
rtl.lib(hbrandom.obj) : error LNK2001: s¡mbolo externo __imp__time64 sin resolver
hbzip.lib(ziparchive.obj) : error LNK2019: s¡mbolo externo __imp__tell sin resolver al que se hace referencia en la funci¢n "public: virtual unsigned __int64 __cdecl CZipFile::GetPosition(void)const " (?GetPosition@CZipFile@@UEBA_KXZ)
hbzip.lib(zipstorage.obj) : error LNK2001: s¡mbolo externo __imp__tell sin resolver
hbzip.lib(zipfile.obj) : error LNK2001: s¡mbolo externo __imp__tell sin resolver
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__stat64i32 sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::GetFileModTime(char const *,__int64 &)" (?GetFileModTime@ZipPlatform@@YA_NPEBDAEA_J@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__access sin resolver al que se hace referencia en la funci¢n "int __cdecl ZipPlatform::FileExists(char const *)" (?FileExists@ZipPlatform@@YAHPEBD@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__utime64 sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::SetFileModTime(char const *,__int64)" (?SetFileModTime@ZipPlatform@@YA_NPEBD_J@Z)
hbzip.lib(zipplatform.obj) : error LNK2019: s¡mbolo externo __imp__chdir sin resolver al que se hace referencia en la funci¢n "bool __cdecl ZipPlatform::ChangeDirectory(char const *)" (?ChangeDirectory@ZipPlatform@@YA_NPEBD@Z)
hbzip.lib(zipexception.obj) : error LNK2019: s¡mbolo externo __imp_strncpy sin resolver al que se hace referencia en la funci¢n "public: int __cdecl CZipException::GetErrorMessage(char *,unsigned int,unsigned int *)" (?GetErrorMessage@CZipException@@QEAAHPEADIPEAI@Z)
pcrepos.lib(pcreposix.obj) : error LNK2001: s¡mbolo externo __imp_strncpy sin resolver
hbzip.lib(zippathcomponent.obj) : error LNK2019: s¡mbolo externo __imp__splitpath sin resolver al que se hace referencia en la funci¢n "public: void __cdecl CZipPathComponent::SetFullPath(char const *)" (?SetFullPath@CZipPathComponent@@QEAAXPEBD@Z)
common.lib(hbdate.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
common.lib(hbprintf.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(hvm.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(itemapi.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
rtl.lib(fstemp.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
common.lib(hbstr.obj) : error LNK2001: s¡mbolo externo __imp_modf sin resolver
vm.lib(hvm.obj) : error LNK2019: s¡mbolo externo __imp_div sin resolver al que se hace referencia en la funci¢n hb_vmSubDate
common.lib(hbdate.obj) : error LNK2001: s¡mbolo externo __imp_div sin resolver
vm.lib(itemapi.obj) : error LNK2019: s¡mbolo externo __imp__finite sin resolver al que se hace referencia en la funci¢n hb_itemStrBuf
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isxdigit sin resolver al que se hace referencia en la funci¢n HB_FUN_ISXDIGIT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isspace sin resolver al que se hace referencia en la funci¢n HB_FUN_ISSPACE
macro.lib(macroslx.obj) : error LNK2001: s¡mbolo externo __imp_isspace sin resolver
common.lib(hbstr.obj) : error LNK2001: s¡mbolo externo __imp_isspace sin resolver
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_ispunct sin resolver al que se hace referencia en la funci¢n HB_FUN_ISPUNCT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isprint sin resolver al que se hace referencia en la funci¢n HB_FUN_ISPRINT
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_isgraph sin resolver al que se hace referencia en la funci¢n HB_FUN_ISGRAPH
rtl.lib(is.obj) : error LNK2019: s¡mbolo externo __imp_iscntrl sin resolver al que se hace referencia en la funci¢n HB_FUN_ISCNTRL
rtl.lib(dirdrive.obj) : error LNK2019: s¡mbolo externo __imp_remove sin resolver al que se hace referencia en la funci¢n HB_FUN_HB_DISKREADY
rtl.lib(filesys.obj) : error LNK2019: s¡mbolo externo __imp__chdrive sin resolver al que se hace referencia en la funci¢n hb_fsChDrv
rtl.lib(filesys.obj) : error LNK2019: s¡mbolo externo __imp__getdrive sin resolver al que se hace referencia en la funci¢n hb_fsChDrv
rtl.lib(fparse.obj) : error LNK2019: s¡mbolo externo __imp_fgetc sin resolver al que se hace referencia en la funci¢n HB_FUN_FCHARCOUNT
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_toupper sin resolver al que se hace referencia en la funci¢n hb_str2number
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_tolower sin resolver al que se hace referencia en la funci¢n hb_strAtI
common.lib(hbstr.obj) : error LNK2019: s¡mbolo externo __imp_strerror_s sin resolver al que se hace referencia en la funci¢n hb_strerror
common.lib(hbprintf.obj) : error LNK2019: s¡mbolo externo __imp__dclass sin resolver al que se hace referencia en la funci¢n hb_vsnprintf
common.lib(hbprintf.obj) : error LNK2019: s¡mbolo externo __imp__dsign sin resolver al que se hace referencia en la funci¢n put_dbl
common.lib(hbtrace.obj) : error LNK2019: s¡mbolo externo __imp__dup sin resolver al que se hace referencia en la funci¢n hb_tr_trace
pruebas.exe : fatal error LNK1120: 200 externos sin resolver
hbmk2[xtest]: Error: Running linker. 1120
link.exe @C:\Users\leandro\AppData\Local\Temp\4\f88jtl.lnk
hbmk2: Error: Referenced, missing, but unknown function(s): CEILING(), SET(),
HB_UTF8STRTRAN(), HB_I18NGETBASELANGUAGE(), WEBVIEW2_SHOWDOWNLOADS(),
GDIPLUSSTARTUP(), GDIPLUSSHUTDOWN(), REPASTESPECIAL5(), FLOOR(),
ISXDIGIT(), ISSPACE(), ISPUNCT(), ISPRINT(), ISGRAPH(), ISCNTRL(),
HB_DISKREADY(), FCHARCOUNT()
Code: Select all | Expand
-gui
#los prgs
.\PRG\test.prg
#recursos
#.\res\test.rc
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-Ic:\fwh64\include
-Lc:\fwh64\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-opruebas
#-inc
-run
Code: Select all | Expand
-gui
#los prgs
.\PRG\test.prg
#recursos
#.\res\test.rc
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-Ic:\fwh64\include
-Lc:\fwh64\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-opruebas
#-inc
-run
Code: Select all | Expand
C:\cmplar_xtest_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\test.prg'...
Generating C source output to 'obj\test.c'...
Done.
Lines 6, Functions/Procedures 1, pCodes 16
test.c
hbmk2: Linking... pruebas.exe
Fivehx64.lib(twebview2.obj) : error LNK2001: s¡mbolo externo HB_FUN_WEBVIEW2_SHOWDOWNLOADS sin resolver
pruebas.exe : fatal error LNK1120: 1 externos sin resolver
hbmk2[xtest]: Error: Running linker. 1120
link.exe @C:\Users\leandro\AppData\Local\Temp\5\ulxzrs.lnk
hbmk2: Error: Referenced, missing, but unknown function(s):
WEBVIEW2_SHOWDOWNLOADS()
C:\cmplar_xtest_64>
Code: Select all | Expand
C:\cmplar_xtest_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\test.prg'...
Generating C source output to 'obj\test.c'...
Done.
Lines 6, Functions/Procedures 1, pCodes 16
test.c
hbmk2: Linking... pruebas.exe
Fivehx64.lib(twebview2.obj) : error LNK2001: s¡mbolo externo HB_FUN_WEBVIEW2_SHOWDOWNLOADS sin resolver
pruebas.exe : fatal error LNK1120: 1 externos sin resolver
hbmk2[xtest]: Error: Running linker. 1120
link.exe @C:\Users\leandro\AppData\Local\Temp\5\ulxzrs.lnk
hbmk2: Error: Referenced, missing, but unknown function(s):
WEBVIEW2_SHOWDOWNLOADS()
C:\cmplar_xtest_64>
Code: Select all | Expand
C:\cmplar_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\conodbc.prg'...
.\PRG\conodbc.prg(7) Error E0001 Statement not allowed outside of procedure or function
1 error
No code generated
hbmk2[conodbc]: Error: Running Harbour compiler. 1
C:\xHar_msvc_2409\bin\harbour.exe -n .\PRG\conodbc.prg -oobj\ -iC:\xHar_msvc_2409\include -ic:\fwh64_2409\include -undef:.ARCH. -D__PLATFORM__WINDOWS
Code: Select all | Expand
C:\cmplar_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\conodbc.prg'...
.\PRG\conodbc.prg(7) Error E0001 Statement not allowed outside of procedure or function
1 error
No code generated
hbmk2[conodbc]: Error: Running Harbour compiler. 1
C:\xHar_msvc_2409\bin\harbour.exe -n .\PRG\conodbc.prg -oobj\ -iC:\xHar_msvc_2409\include -ic:\fwh64_2409\include -undef:.ARCH. -D__PLATFORM__WINDOWS
Code: Select all | Expand
-gui
#los prgs
.\PRG\conodbc.prg
#recursos
.\res\conodbc.res
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-oconodb
#-inc
-run
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 conodbc.hbp -xhb -comp=msvc64
@endlocal
Code: Select all | Expand
-gui
#los prgs
.\PRG\conodbc.prg
#recursos
.\res\conodbc.res
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-oconodb
#-inc
-run
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 conodbc.hbp -xhb -comp=msvc64
@endlocal
Code: Select all | Expand
-gui
#los prgs
.\PRG\conodbc.prg
#recursos
.\res\conodbc.res
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-optim-
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-ldflag+= -n-
-oconodbc
#-inc
-run
Code: Select all | Expand
-gui
#los prgs
.\PRG\conodbc.prg
#recursos
.\res\conodbc.res
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-optim-
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-ldflag+= -n-
-oconodbc
#-inc
-run
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHarbour64\bin\hbmk2 test.hbp -xhb -comp=msvc64
@endlocal
Code: Select all | Expand
-gui
-n-
#los prgs
test.prg
-Ic:\fwh64\include
-Lc:\fwh64\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-oconodbc
#-inc
-run
Code: Select all | Expand
#include "FiveWin.ch"
Otro()
function Otro()
MsgInfo( "ok" )
return nil
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHarbour64\bin\hbmk2 test.hbp -xhb -comp=msvc64
@endlocal
Code: Select all | Expand
-gui
-n-
#los prgs
test.prg
-Ic:\fwh64\include
-Lc:\fwh64\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-oconodbc
#-inc
-run
Code: Select all | Expand
#include "FiveWin.ch"
Otro()
function Otro()
MsgInfo( "ok" )
return nil
Code: Select all | Expand
C:\cmplar_cnt_64>xgo64
C:\cmplar_cnt_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\Hl_menu.prg'...
.\PRG\Hl_menu.prg(1524) Error E0032 Can't create output file: 'obj\Hl_menu.c'
Lines 1525, Functions/Procedures 15, pCodes 0
hbmk2[xhl_cnt_64]: Error: Running Harbour compiler. 1
C:\xHar_msvc_2409\bin\harbour.exe -n .\PRG\Hl_menu.prg -n- -oobj\ -iC:\xHar_msvc_2409\include -ic:\fwh64_2409\include -undef:.ARCH. -D__PLATFORM__WINDOWS
C:\cmplar_cnt_64>
Code: Select all | Expand
-gui
-n-
#los prgs
.\PRG\Hl_menu.prg
.\PRG\Alyma.prg
.\PRG\Funciones.prg
.\PRG\Abusc.prg
.\PRG\Ajson.prg
.\PRG\Asql.prg
.\PRG\Photos.prg
.\PRG\Ainve.prg
.\PRG\Amete.prg
#recursos
.\RES\hl_cnt.res
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-optim-
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-ohl_cnt
#-inc
-run
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xhl_cnt_64.hbp -xhb -comp=msvc64
@endlocal
Code: Select all | Expand
C:\cmplar_cnt_64>xgo64
C:\cmplar_cnt_64>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
xHarbour 1.3.1 Intl. (SimpLex) (Build 20250119)
Copyright 1999-2024, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\PRG\Hl_menu.prg'...
.\PRG\Hl_menu.prg(1524) Error E0032 Can't create output file: 'obj\Hl_menu.c'
Lines 1525, Functions/Procedures 15, pCodes 0
hbmk2[xhl_cnt_64]: Error: Running Harbour compiler. 1
C:\xHar_msvc_2409\bin\harbour.exe -n .\PRG\Hl_menu.prg -n- -oobj\ -iC:\xHar_msvc_2409\include -ic:\fwh64_2409\include -undef:.ARCH. -D__PLATFORM__WINDOWS
C:\cmplar_cnt_64>
Code: Select all | Expand
-gui
-n-
#los prgs
.\PRG\Hl_menu.prg
.\PRG\Alyma.prg
.\PRG\Funciones.prg
.\PRG\Abusc.prg
.\PRG\Ajson.prg
.\PRG\Asql.prg
.\PRG\Photos.prg
.\PRG\Ainve.prg
.\PRG\Amete.prg
#recursos
.\RES\hl_cnt.res
-info
#-traceonly
#aqui es para colocar los archivo o y c que se generan en la compilacion incremental
-workdir=.\obj
-Ic:\fwh64_2409\include
-Lc:\fwh64_2409\lib
-lFivehx64
-lFiveHC64
-lct
-lhbzip
-ltip
-lhbcomm
-lhbcurl
-llibcurl
-lhbzebra
-lsixapi
-ltip
-lpng
-lhbhpdf
-llibharu
-lhbmxml
-llibmysql
-llibcrypto
-lgdiplus
-lucrt
-lole32
-loledlg
-optim-
-ldflag=/NODEFAULTLIB:libucrt
-ldflag+=/NODEFAULTLIB:msvcrt
-ohl_cnt
#-inc
-run
Code: Select all | Expand
@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
C:\xHar_msvc_2409\bin\hbmk2 xhl_cnt_64.hbp -xhb -comp=msvc64
@endlocal
]]>Can't create output file: 'obj\Hl_menu.c'
]]>Can't create output file: 'obj\Hl_menu.c'
Code: Select all | Expand
@ 40, 45 GET oGnro VAR oFac:hEncabezado["numero"] SIZE 100, 30 PIXEL OF oDlgFct UPDATE FONT oFont2 RIGHT PASSWORD
Code: Select all | Expand
@ 40, 45 GET oGnro VAR oFac:hEncabezado["numero"] SIZE 100, 30 PIXEL OF oDlgFct UPDATE FONT oFont2 RIGHT PASSWORD
Code: Select all | Expand
METHOD DispText() CLASS TGet
/* //-> Mudei em 25/10/2016 - Para Aparecer um * no PASSWORD-WS Joao
SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),;
Len( Trim( ::oGet:buffer ) ) ) )
*/
// cambiado:
SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 42 ), "*" ),;
Len( Trim( ::oGet:buffer ) ) ) )
Code: Select all | Expand
METHOD DispText() CLASS TGet
/* //-> Mudei em 25/10/2016 - Para Aparecer um * no PASSWORD-WS Joao
SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),;
Len( Trim( ::oGet:buffer ) ) ) )
*/
// cambiado:
SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 42 ), "*" ),;
Len( Trim( ::oGet:buffer ) ) ) )
Code: Select all | Expand
SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),;
Len( Trim( ::oGet:buffer ) ) ) )
Code: Select all | Expand
SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),;
Len( Trim( ::oGet:buffer ) ) ) )
Code: Select all | Expand
SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 42 ), "*" ),;
Len( Trim( ::oGet:buffer ) ) ) )
Code: Select all | Expand
SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 42 ), "*" ),;
Len( Trim( ::oGet:buffer ) ) ) )
Code: Select all | Expand
aBmp := { If( lDuplicate, DuplicateIcon( uBmp ), uBmp ), 0, 32, 32, .f., "ICON", .f., "" }
Code: Select all | Expand
aBmp := { If( lDuplicate, DuplicateIcon( uBmp ), uBmp ), 0, 32, 32, .f., "ICON", .f., "", nil, "" }
Code: Select all | Expand
aBmp := { If( lDuplicate, DuplicateIcon( uBmp ), uBmp ), 0, 32, 32, .f., "ICON", .f., "" }
Code: Select all | Expand
aBmp := { If( lDuplicate, DuplicateIcon( uBmp ), uBmp ), 0, 32, 32, .f., "ICON", .f., "", nil, "" }
Code: Select all | Expand
#include "fivewin.ch"
Function Main(importe,vencimiento)
local oWnd,oWebView
local cUrl := "https://casoftsystemweb.com/service-notice.html?deuda="+importe+"&vencimiento="+vencimiento
DEFINE WINDOW oWnd FROM 0,0 TO 50,60 TITLE "AVISO DE VENCIMIENTO DE SERVICIOS" STYLE nOr(WS_SYSMENU)
oWnd:Show()
oWebView = TWebView2():New( oWnd )
oWebView:Navigate( cUrl )
oWebView:SetUserAgent( "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Mobile Safari/537.36" )
ACTIVATE WINDOW oWnd CENTER ;
ON RESIZE oWebView:SetSize( nWidth, nHeight-50 )
oWebView:End()
Return
Code: Select all | Expand
#include "fivewin.ch"
Function Main(importe,vencimiento)
local oWnd,oWebView
local cUrl := "https://casoftsystemweb.com/service-notice.html?deuda="+importe+"&vencimiento="+vencimiento
DEFINE WINDOW oWnd FROM 0,0 TO 50,60 TITLE "AVISO DE VENCIMIENTO DE SERVICIOS" STYLE nOr(WS_SYSMENU)
oWnd:Show()
oWebView = TWebView2():New( oWnd )
oWebView:Navigate( cUrl )
oWebView:SetUserAgent( "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Mobile Safari/537.36" )
ACTIVATE WINDOW oWnd CENTER ;
ON RESIZE oWebView:SetSize( nWidth, nHeight-50 )
oWebView:End()
Return
Code: Select all | Expand
REDEFINE GROUP oGgrRt ID 4007 OF oFld:aDialogs[ 2 ] TRANSPARENT
Code: Select all | Expand
REDEFINE GROUP oGgrRt ID 4007 OF oFld:aDialogs[ 2 ] TRANSPARENT
Code: Select all | Expand
// C:\FWH\SAMPLES\LEANDGRP.PRG
#include "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg, oFont, oBold, aVar[ 2 ], cTitle
AFill( aVar, Space( 60 ) )
cTitle := "GROUPBOX con xHarbour de 64 bits - Funciona?"
DEFINE FONT oFont NAME "ARIAL" SIZE 0, - 14
DEFINE FONT oBold NAME "ARIAL" SIZE 0, - 14 BOLD
DEFINE DIALOG oDlg SIZE 500, 250 PIXEL TRUEPIXEL TITLE cTitle FONT oFont ;
TRANSPARENT
oDlg:lHelpIcon := .F.
@ 70, 50 GET aVar[ 1 ] SIZE 200, 20 PIXEL OF oDlg
@ 100, 50 GET aVar[ 2 ] SIZE 200, 20 PIXEL OF oDlg
oDlg:bPainted := < | hDC |
RoundBox( hDC, 20, 40, 300, 150, 10, 10, CLR_HRED, 1 )
oDlg:SayText( "Group Title-64 bits", { 30, 30, 50, 200 }, NIL, oBold, ;
{ CLR_GREEN, oDlg:nClrPane } )
RETURN NIL
>
@ 200, 200 BUTTON "Ok" SIZE 50, 20 OF oDlg PIXEL ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont, oBold
RETURN NIL
Code: Select all | Expand
// C:\FWH\SAMPLES\LEANDGRP.PRG
#include "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg, oFont, oBold, aVar[ 2 ], cTitle
AFill( aVar, Space( 60 ) )
cTitle := "GROUPBOX con xHarbour de 64 bits - Funciona?"
DEFINE FONT oFont NAME "ARIAL" SIZE 0, - 14
DEFINE FONT oBold NAME "ARIAL" SIZE 0, - 14 BOLD
DEFINE DIALOG oDlg SIZE 500, 250 PIXEL TRUEPIXEL TITLE cTitle FONT oFont ;
TRANSPARENT
oDlg:lHelpIcon := .F.
@ 70, 50 GET aVar[ 1 ] SIZE 200, 20 PIXEL OF oDlg
@ 100, 50 GET aVar[ 2 ] SIZE 200, 20 PIXEL OF oDlg
oDlg:bPainted := < | hDC |
RoundBox( hDC, 20, 40, 300, 150, 10, 10, CLR_HRED, 1 )
oDlg:SayText( "Group Title-64 bits", { 30, 30, 50, 200 }, NIL, oBold, ;
{ CLR_GREEN, oDlg:nClrPane } )
RETURN NIL
>
@ 200, 200 BUTTON "Ok" SIZE 50, 20 OF oDlg PIXEL ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont, oBold
RETURN NIL
Así que nos hemos visto obligados a hacerlo tabla por tabla y en algunas, como phpbb_posts hemos tenido que hacerlo de 50.000 en 50.000 registros:ERROR 2013 (HY000) at line 1672: Lost connection to MySQL server during query
Así que nos hemos visto obligados a hacerlo tabla por tabla y en algunas, como phpbb_posts hemos tenido que hacerlo de 50.000 en 50.000 registros:ERROR 2013 (HY000) at line 1672: Lost connection to MySQL server during query
Es posible que aún pueda aparecer un error de alguna tabla que no haya sido copiada. En tal caso os rogamos que nos lo indiqueis para copiarla ]]>05/01/2025 21:22 1.842.732 fivetech_users.sql
05/01/2025 21:25 3.062 fivetech_sessions.sql
05/01/2025 21:30 2.488 fivetech_styles.sql
05/01/2025 21:31 64.956 fivetech_usergroup.sql
05/01/2025 21:33 9.115.241 fivetech_topics.sql
05/01/2025 21:35 407.499 fivetech_sessionskeys.sql
05/01/2025 21:36 8.981 fivetech_zebra.sql
05/01/2025 21:37 2.684 fivetech_phpbb_profile_lang.sql
05/01/2025 21:40 5.035 fivetech_phpbb_profile_fields.sql
05/01/2025 21:41 75.309 fivetech_phpbb_profile_fields_data.sql
// 05/01/2025 21:26 467.507.206 fivetech_posts.sql
05/01/2025 21:49 32.595.049 parte1.sql
05/01/2025 21:52 65.031.741 parte2.sql
05/01/2025 21:54 103.337.370 parte3.sql
05/01/2025 21:57 102.104.871 parte4.sql
05/01/2025 22:03 109.319.555 parte5.sql
05/01/2025 22:06 55.138.810 resto.sql
05/01/2025 22:09 690.524 fivetech_phpbb_search_results.sql
05/01/2025 22:10 15.537.942 fivetech_phpbb_topics_track.sql
05/01/2025 22:12 570.334 fivetech_phpbb_topics_watch.sql
05/01/2025 22:13 1.307.829 fivetech_phpbb_topics_posted.sql
05/01/2025 23:20 7.329.738 fivetech_phpbb_search_wordlist.sql
05/01/2025 23:22 134.131.709 fivetech_phpbb_search_wordmatch.sql
06/01/2025 05:54 2.294 fivetech_phpbb_teampage.sql
06/01/2025 08:47 5.043 fivetech_phpbb_reports.sql
06/01/2025 08:49 34.039 fivetech_phpbb_privmsgs.sql
06/01/2025 09:35 1.926.408 fivetech_phpbb_user_notifications.sql
06/01/2025 08:51 2.178 fivetech_phpbb_warnings.sql
06/01/2025 09:07 4.562 fivetech_phpbb_smilies.sql
Es posible que aún pueda aparecer un error de alguna tabla que no haya sido copiada. En tal caso os rogamos que nos lo indiqueis para copiarla ]]>05/01/2025 21:22 1.842.732 fivetech_users.sql
05/01/2025 21:25 3.062 fivetech_sessions.sql
05/01/2025 21:30 2.488 fivetech_styles.sql
05/01/2025 21:31 64.956 fivetech_usergroup.sql
05/01/2025 21:33 9.115.241 fivetech_topics.sql
05/01/2025 21:35 407.499 fivetech_sessionskeys.sql
05/01/2025 21:36 8.981 fivetech_zebra.sql
05/01/2025 21:37 2.684 fivetech_phpbb_profile_lang.sql
05/01/2025 21:40 5.035 fivetech_phpbb_profile_fields.sql
05/01/2025 21:41 75.309 fivetech_phpbb_profile_fields_data.sql
// 05/01/2025 21:26 467.507.206 fivetech_posts.sql
05/01/2025 21:49 32.595.049 parte1.sql
05/01/2025 21:52 65.031.741 parte2.sql
05/01/2025 21:54 103.337.370 parte3.sql
05/01/2025 21:57 102.104.871 parte4.sql
05/01/2025 22:03 109.319.555 parte5.sql
05/01/2025 22:06 55.138.810 resto.sql
05/01/2025 22:09 690.524 fivetech_phpbb_search_results.sql
05/01/2025 22:10 15.537.942 fivetech_phpbb_topics_track.sql
05/01/2025 22:12 570.334 fivetech_phpbb_topics_watch.sql
05/01/2025 22:13 1.307.829 fivetech_phpbb_topics_posted.sql
05/01/2025 23:20 7.329.738 fivetech_phpbb_search_wordlist.sql
05/01/2025 23:22 134.131.709 fivetech_phpbb_search_wordmatch.sql
06/01/2025 05:54 2.294 fivetech_phpbb_teampage.sql
06/01/2025 08:47 5.043 fivetech_phpbb_reports.sql
06/01/2025 08:49 34.039 fivetech_phpbb_privmsgs.sql
06/01/2025 09:35 1.926.408 fivetech_phpbb_user_notifications.sql
06/01/2025 08:51 2.178 fivetech_phpbb_warnings.sql
06/01/2025 09:07 4.562 fivetech_phpbb_smilies.sql
Code: Select all | Expand
#include "FiveWin.ch"
// this is a comment
function Test()
return nil
class
DATA one
DATA two
METHOD New()
ENDCLASS
class
endclass
if
else
endif
while .T.
end
]]>Code: Select all | Expand
#include "FiveWin.ch"
// this is a comment
function Test()
return nil
class
DATA one
DATA two
METHOD New()
ENDCLASS
class
endclass
if
else
endif
while .T.
end
]]>]]>phpbb_acl_groups: Almacena las relaciones entre grupos de usuarios y sus permisos de acceso a diferentes recursos del foro.
phpbb_acl_options: Contiene las opciones de permisos que pueden ser asignadas a los grupos y usuarios.
phpbb_acl_roles: Define los roles que pueden ser asignados a los grupos de usuarios, facilitando la gestión de permisos.
phpbb_acl_roles_data: Almacena los datos relacionados con los roles asignados a los grupos de usuarios.
phpbb_acl_users: Almacena las relaciones entre usuarios individuales y sus permisos de acceso.
phpbb_attachments: Contiene información sobre los archivos adjuntos a los mensajes del foro.
phpbb_banlist: Almacena la lista de usuarios, direcciones IP y correos electrónicos que están prohibidos de acceder al foro.
phpbb_bbcodes: Define los códigos BB (BBCode) que los usuarios pueden utilizar para dar formato a sus mensajes.
phpbb_bookmarks: Almacena los marcadores que los usuarios han creado para acceder rápidamente a temas específicos.
phpbb_bots: Contiene información sobre los bots que acceden al foro, como motores de búsqueda.
phpbb_config: Almacena la configuración general del foro, incluyendo parámetros de funcionamiento y opciones de personalización.
phpbb_confirm: Utilizada para gestionar los códigos de confirmación enviados a los usuarios, como parte del proceso de registro.
phpbb_disallow: Almacena las palabras o nombres de usuario que están prohibidos en el foro.
phpbb_drafts: Almacena los borradores de mensajes que los usuarios han creado pero no han enviado.
phpbb_extension_groups: Define los grupos de extensiones que pueden ser utilizadas en el foro.
phpbb_extensions: Almacena información sobre las extensiones instaladas en el foro.
phpbb_forums: Contiene la estructura de los foros, incluyendo información sobre cada foro, como nombre, descripción y configuración.
phpbb_forums_access: Almacena las relaciones de acceso a los foros para grupos de usuarios específicos.
phpbb_forums_track: Utilizada para rastrear los foros que los usuarios han visitado.
phpbb_forums_watch: Almacena información sobre los foros que los usuarios han decidido seguir para recibir notificaciones.
phpbb_groups: Contiene información sobre los grupos de usuarios, incluyendo su nombre y descripción.
phpbb_icons: Almacena los iconos utilizados en los temas y mensajes del foro.
phpbb_lang: Contiene las traducciones y textos utilizados en el foro, permitiendo la internacionalización.
phpbb_log: Almacena registros de eventos importantes en el foro, como acciones de moderación y errores.
phpbb_moderator_cache: Almacena información en caché sobre los moderadores de los foros para mejorar el rendimiento.
phpbb_modules: Define los módulos disponibles en el sistema, como módulos de administración y de usuario.
phpbb_poll_options: Almacena las opciones de las encuestas creadas por los usuarios.
phpbb_poll_votes: Registra los votos emitidos por los usuarios en las encuestas.
phpbb_posts: Contiene los mensajes publicados en el foro, incluyendo información como el autor, contenido y fecha.
phpbb_privmsgs: Almacena los mensajes privados enviados entre usuarios.
phpbb_privmsgs_folder: Almacena las carpetas de mensajes privados para organizar los mensajes de los usuarios.
phpbb_privmsgs_rules: Define las reglas para la gestión de mensajes privados.
phpbb_privmsgs_to: Almacena información sobre los destinatarios de los mensajes privados.
phpbb_profile_fields: Define _ de perfil personalizados que los usuarios pueden completar.
phpbb_profile_fields_data: Almacena los datos ingresados por los usuarios en _ de perfil personalizados.
phpbb_profile_fields_lang: Contiene las traducciones para _ de perfil personalizados.
phpbb_profile_lang: Almacena la información de idioma asociada a los perfiles de usuario.
phpbb_ranks: Define los rangos que pueden ser asignados a los usuarios según su actividad en el foro.
phpbb_reports: Almacena los informes de contenido inapropiado realizados por los usuarios.
phpbb_reports_reasons: Define las razones por las cuales los usuarios pueden reportar contenido.
phpbb_search_results: Almacena los resultados de las búsquedas realizadas por los usuarios en el foro.
phpbb_search_wordlist: Contiene una lista de palabras que se utilizan para mejorar la búsqueda en el foro.
phpbb_search_wordmatch: Almacena las coincidencias de palabras encontradas en los mensajes durante las búsquedas.
phpbb_sessions: Almacena información sobre las sesiones de los usuarios que están conectados al foro.
phpbb_sessions_keys: Almacena las claves de sesión para la gestión de las sesiones de usuario.
phpbb_sitelist: Contiene una lista de sitios permitidos o excluidos para el acceso al foro.
phpbb_smilies: Almacena los emoticonos que los usuarios pueden utilizar en sus mensajes.
phpbb_styles: Define los estilos visuales disponibles para el foro.
phpbb_styles_imageset: Almacena los conjuntos de imágenes utilizados por los estilos del foro.
phpbb_styles_imageset_data: Contiene datos específicos sobre las imágenes de los conjuntos de estilos.
phpbb_styles_template: Almacena las plantillas utilizadas por los estilos del foro.
phpbb_styles_template_data: Contiene datos específicos sobre las plantillas de los estilos.
phpbb_styles_theme: Define los temas visuales que pueden aplicarse a los estilos del foro.
phpbb_tapatalk_push_data: Almacena datos relacionados con las notificaciones push de la aplicación Tapatalk.
phpbb_tapatalk_users: Contiene información sobre los usuarios que utilizan Tapatalk para acceder al foro.
phpbb_topics: Almacena información sobre los temas creados en el foro, incluyendo título, autor y fecha de creación.
phpbb_topics_posted: Almacena información sobre los temas que los usuarios han publicado.
phpbb_topics_track: Utilizada para rastrear los temas que los usuarios han visitado.
phpbb_topics_watch: Almacena información sobre los temas que los usuarios han decidido seguir para recibir notificaciones.
phpbb_user_group: Almacena las relaciones entre usuarios y grupos a los que pertenecen.
phpbb_users: Contiene información sobre los usuarios registrados en el foro.
phpbb_warnings: Almacena advertencias emitidas a los usuarios por comportamiento inapropiado.
phpbb_words: Almacena palabras que pueden ser filtradas o censuradas en el foro.
phpbb_zebra: Almacena información sobre las relaciones de amistad y enemistad entre usuarios.
]]>phpbb_acl_groups: Almacena las relaciones entre grupos de usuarios y sus permisos de acceso a diferentes recursos del foro.
phpbb_acl_options: Contiene las opciones de permisos que pueden ser asignadas a los grupos y usuarios.
phpbb_acl_roles: Define los roles que pueden ser asignados a los grupos de usuarios, facilitando la gestión de permisos.
phpbb_acl_roles_data: Almacena los datos relacionados con los roles asignados a los grupos de usuarios.
phpbb_acl_users: Almacena las relaciones entre usuarios individuales y sus permisos de acceso.
phpbb_attachments: Contiene información sobre los archivos adjuntos a los mensajes del foro.
phpbb_banlist: Almacena la lista de usuarios, direcciones IP y correos electrónicos que están prohibidos de acceder al foro.
phpbb_bbcodes: Define los códigos BB (BBCode) que los usuarios pueden utilizar para dar formato a sus mensajes.
phpbb_bookmarks: Almacena los marcadores que los usuarios han creado para acceder rápidamente a temas específicos.
phpbb_bots: Contiene información sobre los bots que acceden al foro, como motores de búsqueda.
phpbb_config: Almacena la configuración general del foro, incluyendo parámetros de funcionamiento y opciones de personalización.
phpbb_confirm: Utilizada para gestionar los códigos de confirmación enviados a los usuarios, como parte del proceso de registro.
phpbb_disallow: Almacena las palabras o nombres de usuario que están prohibidos en el foro.
phpbb_drafts: Almacena los borradores de mensajes que los usuarios han creado pero no han enviado.
phpbb_extension_groups: Define los grupos de extensiones que pueden ser utilizadas en el foro.
phpbb_extensions: Almacena información sobre las extensiones instaladas en el foro.
phpbb_forums: Contiene la estructura de los foros, incluyendo información sobre cada foro, como nombre, descripción y configuración.
phpbb_forums_access: Almacena las relaciones de acceso a los foros para grupos de usuarios específicos.
phpbb_forums_track: Utilizada para rastrear los foros que los usuarios han visitado.
phpbb_forums_watch: Almacena información sobre los foros que los usuarios han decidido seguir para recibir notificaciones.
phpbb_groups: Contiene información sobre los grupos de usuarios, incluyendo su nombre y descripción.
phpbb_icons: Almacena los iconos utilizados en los temas y mensajes del foro.
phpbb_lang: Contiene las traducciones y textos utilizados en el foro, permitiendo la internacionalización.
phpbb_log: Almacena registros de eventos importantes en el foro, como acciones de moderación y errores.
phpbb_moderator_cache: Almacena información en caché sobre los moderadores de los foros para mejorar el rendimiento.
phpbb_modules: Define los módulos disponibles en el sistema, como módulos de administración y de usuario.
phpbb_poll_options: Almacena las opciones de las encuestas creadas por los usuarios.
phpbb_poll_votes: Registra los votos emitidos por los usuarios en las encuestas.
phpbb_posts: Contiene los mensajes publicados en el foro, incluyendo información como el autor, contenido y fecha.
phpbb_privmsgs: Almacena los mensajes privados enviados entre usuarios.
phpbb_privmsgs_folder: Almacena las carpetas de mensajes privados para organizar los mensajes de los usuarios.
phpbb_privmsgs_rules: Define las reglas para la gestión de mensajes privados.
phpbb_privmsgs_to: Almacena información sobre los destinatarios de los mensajes privados.
phpbb_profile_fields: Define _ de perfil personalizados que los usuarios pueden completar.
phpbb_profile_fields_data: Almacena los datos ingresados por los usuarios en _ de perfil personalizados.
phpbb_profile_fields_lang: Contiene las traducciones para _ de perfil personalizados.
phpbb_profile_lang: Almacena la información de idioma asociada a los perfiles de usuario.
phpbb_ranks: Define los rangos que pueden ser asignados a los usuarios según su actividad en el foro.
phpbb_reports: Almacena los informes de contenido inapropiado realizados por los usuarios.
phpbb_reports_reasons: Define las razones por las cuales los usuarios pueden reportar contenido.
phpbb_search_results: Almacena los resultados de las búsquedas realizadas por los usuarios en el foro.
phpbb_search_wordlist: Contiene una lista de palabras que se utilizan para mejorar la búsqueda en el foro.
phpbb_search_wordmatch: Almacena las coincidencias de palabras encontradas en los mensajes durante las búsquedas.
phpbb_sessions: Almacena información sobre las sesiones de los usuarios que están conectados al foro.
phpbb_sessions_keys: Almacena las claves de sesión para la gestión de las sesiones de usuario.
phpbb_sitelist: Contiene una lista de sitios permitidos o excluidos para el acceso al foro.
phpbb_smilies: Almacena los emoticonos que los usuarios pueden utilizar en sus mensajes.
phpbb_styles: Define los estilos visuales disponibles para el foro.
phpbb_styles_imageset: Almacena los conjuntos de imágenes utilizados por los estilos del foro.
phpbb_styles_imageset_data: Contiene datos específicos sobre las imágenes de los conjuntos de estilos.
phpbb_styles_template: Almacena las plantillas utilizadas por los estilos del foro.
phpbb_styles_template_data: Contiene datos específicos sobre las plantillas de los estilos.
phpbb_styles_theme: Define los temas visuales que pueden aplicarse a los estilos del foro.
phpbb_tapatalk_push_data: Almacena datos relacionados con las notificaciones push de la aplicación Tapatalk.
phpbb_tapatalk_users: Contiene información sobre los usuarios que utilizan Tapatalk para acceder al foro.
phpbb_topics: Almacena información sobre los temas creados en el foro, incluyendo título, autor y fecha de creación.
phpbb_topics_posted: Almacena información sobre los temas que los usuarios han publicado.
phpbb_topics_track: Utilizada para rastrear los temas que los usuarios han visitado.
phpbb_topics_watch: Almacena información sobre los temas que los usuarios han decidido seguir para recibir notificaciones.
phpbb_user_group: Almacena las relaciones entre usuarios y grupos a los que pertenecen.
phpbb_users: Contiene información sobre los usuarios registrados en el foro.
phpbb_warnings: Almacena advertencias emitidas a los usuarios por comportamiento inapropiado.
phpbb_words: Almacena palabras que pueden ser filtradas o censuradas en el foro.
phpbb_zebra: Almacena información sobre las relaciones de amistad y enemistad entre usuarios.
]]>phpbb_acl_groups:
Relación con phpbb_acl_roles y phpbb_acl_users para definir permisos y roles asignados a grupos de usuarios.
phpbb_acl_roles:
Relación con phpbb_acl_roles_data para almacenar los datos asociados a los roles.
phpbb_acl_users:
Relación con phpbb_acl_options para definir los permisos específicos de cada usuario.
phpbb_attachments:
Relación con phpbb_posts para asociar archivos adjuntos a mensajes específicos.
phpbb_banlist:
Relación con phpbb_users para prohibir el acceso a usuarios específicos.
phpbb_bookmarks:
Relación con phpbb_users y phpbb_topics para almacenar los marcadores de los usuarios en temas específicos.
phpbb_drafts:
Relación con phpbb_users y phpbb_posts para almacenar borradores de mensajes.
phpbb_forums:
Relación con phpbb_forums_access y phpbb_forums_watch para definir el acceso y seguimiento de foros por parte de los usuarios.
phpbb_groups:
Relación con phpbb_users a través de phpbb_user_group para definir la membresía de los usuarios en grupos.
phpbb_posts:
Relación con phpbb_topics para asociar mensajes a temas específicos.
Relación con phpbb_users para identificar al autor del mensaje.
phpbb_privmsgs:
Relación con phpbb_users a través de phpbb_privmsgs_to para identificar los destinatarios de los mensajes privados.
phpbb_profile_fields:
Relación con phpbb_profile_fields_data para almacenar los datos ingresados por los usuarios en _ de perfil personalizados.
phpbb_reports:
Relación con phpbb_posts y phpbb_users para asociar informes a mensajes y a los usuarios que los reportan.
phpbb_topics:
Relación con phpbb_forums para asociar temas a foros específicos.
Relación con phpbb_posts para almacenar los mensajes dentro de un tema.
phpbb_user_group:
Relación con phpbb_users y phpbb_groups para definir la pertenencia de los usuarios a grupos.
phpbb_warnings:
Relación con phpbb_users para asociar advertencias a usuarios específicos.
phpbb_zebra:
Relación con phpbb_users para definir relaciones de amistad y enemistad entre usuarios.
]]>phpbb_acl_groups:
Relación con phpbb_acl_roles y phpbb_acl_users para definir permisos y roles asignados a grupos de usuarios.
phpbb_acl_roles:
Relación con phpbb_acl_roles_data para almacenar los datos asociados a los roles.
phpbb_acl_users:
Relación con phpbb_acl_options para definir los permisos específicos de cada usuario.
phpbb_attachments:
Relación con phpbb_posts para asociar archivos adjuntos a mensajes específicos.
phpbb_banlist:
Relación con phpbb_users para prohibir el acceso a usuarios específicos.
phpbb_bookmarks:
Relación con phpbb_users y phpbb_topics para almacenar los marcadores de los usuarios en temas específicos.
phpbb_drafts:
Relación con phpbb_users y phpbb_posts para almacenar borradores de mensajes.
phpbb_forums:
Relación con phpbb_forums_access y phpbb_forums_watch para definir el acceso y seguimiento de foros por parte de los usuarios.
phpbb_groups:
Relación con phpbb_users a través de phpbb_user_group para definir la membresía de los usuarios en grupos.
phpbb_posts:
Relación con phpbb_topics para asociar mensajes a temas específicos.
Relación con phpbb_users para identificar al autor del mensaje.
phpbb_privmsgs:
Relación con phpbb_users a través de phpbb_privmsgs_to para identificar los destinatarios de los mensajes privados.
phpbb_profile_fields:
Relación con phpbb_profile_fields_data para almacenar los datos ingresados por los usuarios en _ de perfil personalizados.
phpbb_reports:
Relación con phpbb_posts y phpbb_users para asociar informes a mensajes y a los usuarios que los reportan.
phpbb_topics:
Relación con phpbb_forums para asociar temas a foros específicos.
Relación con phpbb_posts para almacenar los mensajes dentro de un tema.
phpbb_user_group:
Relación con phpbb_users y phpbb_groups para definir la pertenencia de los usuarios a grupos.
phpbb_warnings:
Relación con phpbb_users para asociar advertencias a usuarios específicos.
phpbb_zebra:
Relación con phpbb_users para definir relaciones de amistad y enemistad entre usuarios.
]]>1. phpbb_acl_groups
group_id (mediumint)
group_name (varchar)
group_desc (text)
DBF Equivalent:
group_id N(5)
group_name C(100)
group_desc C(255)
2. phpbb_acl_options
option_id (mediumint)
option_name (varchar)
option_value (varchar)
DBF Equivalent:
option_id N(5)
option_name C(100)
option_value C(100)
3. phpbb_acl_roles
role_id (mediumint)
role_name (varchar)
role_description (text)
DBF Equivalent:
role_id N(5)
role_name C(100)
role_description C(255)
4. phpbb_acl_roles_data
role_id (mediumint)
group_id (mediumint)
auth_option_id (mediumint)
DBF Equivalent:
role_id N(5)
group_id N(5)
auth_option_id N(5)
5. phpbb_acl_users
user_id (mediumint)
auth_option_id (mediumint)
DBF Equivalent:
user_id N(5)
auth_option_id N(5)
6. phpbb_attachments
attach_id (mediumint)
post_id (mediumint)
user_id (mediumint)
DBF Equivalent:
attach_id N(5)
post_id N(5)
user_id N(5)
7. phpbb_banlist
ban_id (mediumint)
ban_userid (mediumint)
ban_ip (varchar)
DBF Equivalent:
ban_id N(5)
ban_userid N(5)
ban_ip C(15)
8. phpbb_bbcodes
bbcode_id (tinyint)
bbcode_tag (varchar)
bbcode_helpline (varchar)
DBF Equivalent:
bbcode_id N(3)
bbcode_tag C(20)
bbcode_helpline C(255)
9. phpbb_bookmarks
topic_id (mediumint)
user_id (mediumint)
DBF Equivalent:
topic_id N(5)
user_id N(5)
10. phpbb_bots
bot_id (mediumint)
bot_name (varchar)
bot_agent (varchar)
DBF Equivalent:
bot_id N(5)
bot_name C(100)
bot_agent C(255)
11. phpbb_config
config_name (varchar)
config_value (varchar)
DBF Equivalent:
config_name C(100)
config_value C(255)
12. phpbb_confirm
confirm_id (mediumint)
user_id (mediumint)
code (varchar)
DBF Equivalent:
confirm_id N(5)
user_id N(5)
code C(50)
13. phpbb_disallow
disallow_id (mediumint)
disallow_username (varchar)
DBF Equivalent:
disallow_id N(5)
disallow_username C(100)
14. phpbb_drafts
draft_id (mediumint)
user_id (mediumint)
topic_id (mediumint)
DBF Equivalent:
draft_id N(5)
user_id N(5)
topic_id N(5)
15. phpbb_extension_groups
group_id (mediumint)
group_name (varchar)
DBF Equivalent:
group_id N(5)
group_name C(100)
16. phpbb_extensions
ext_id (mediumint)
ext_name (varchar)
DBF Equivalent:
ext_id N(5)
ext_name C(100)
17. phpbb_forums
forum_id (mediumint)
forum_name (varchar)
forum_desc (text)
DBF Equivalent:
forum_id N(5)
forum_name C(100)
forum_desc C(255)
18. phpbb_forums_access
forum_id (mediumint)
group_id (mediumint)
DBF Equivalent:
forum_id N(5)
group_id N(5)
19. phpbb_forums_track
forum_id (mediumint)
user_id (mediumint)
DBF Equivalent:
forum_id N(5)
user_id N(5)
20. phpbb_forums_watch
forum_id (mediumint)
user_id (mediumint)
DBF Equivalent:
forum_id N(5)
user_id N(5)
21. phpbb_groups
group_id (mediumint)
group_name (varchar)
DBF Equivalent:
group_id N(5)
group_name C(100)
22. phpbb_icons
icon_id (mediumint)
icon_url (varchar)
DBF Equivalent:
icon_id N(5)
icon_url C(255)
23. phpbb_lang
lang_id (mediumint)
lang_iso (varchar)
DBF Equivalent:
lang_id N(5)
lang_iso C(10)
24. phpbb_log
log_id (mediumint)
log_time (int)
log_type (varchar)
DBF Equivalent:
log_id N(5)
log_time N(10)
log_type C(50)
25. phpbb_moderator_cache
forum_id (mediumint)
user_id (mediumint)
DBF Equivalent:
forum_id N(5)
user_id N(5)
26. phpbb_modules
module_id (mediumint)
module_name (varchar)
DBF Equivalent:
module_id N(5)
module_name C(100)
27. phpbb_poll_options
poll_id (mediumint)
option_id (tinyint)
option_text (varchar)
DBF Equivalent:
poll_id N(5)
option_id N(3)
option_text C(255)
28. phpbb_poll_votes
poll_id (mediumint)
user_id (mediumint)
vote_option_id (tinyint)
DBF Equivalent:
poll_id N(5)
user_id N(5)
vote_option_id N(3)
29. phpbb_posts
post_id (mediumint)
topic_id (mediumint)
forum_id (mediumint)
DBF Equivalent:
post_id N(5)
topic_id N(5)
forum_id N(5)
30. phpbb_privmsgs
privmsg_id (mediumint)
user_id_from (mediumint)
user_id_to (mediumint)
DBF Equivalent:
privmsg_id N(5)
user_id_from N(5)
user_id_to N(5)
31. phpbb_privmsgs_folder
folder_id (mediumint)
user_id (mediumint)
DBF Equivalent:
folder_id N(5)
user_id N(5)
32. phpbb_privmsgs_rules
rule_id (mediumint)
user_id (mediumint)
DBF Equivalent:
rule_id N(5)
user_id N(5)
33. phpbb_privmsgs_to
privmsg_id (mediumint)
user_id (mediumint)
DBF Equivalent:
privmsg_id N(5)
user_id N(5)
34. phpbb_profile_fields
field_id (mediumint)
field_name (varchar)
DBF Equivalent:
field_id N(5)
field_name C(100)
35. phpbb_profile_fields_data
user_id (mediumint)
field_id (mediumint)
field_value (varchar)
DBF Equivalent:
user_id N(5)
field_id N(5)
field_value C(255)
36. phpbb_profile_fields_lang
field_id (mediumint)
lang_id (mediumint)
lang_value (varchar)
DBF Equivalent:
field_id N(5)
lang_id N(5)
lang_value C(255)
37. phpbb_profile_lang
user_id (mediumint)
lang_id (mediumint)
DBF Equivalent:
user_id N(5)
lang_id N(5)
38. phpbb_ranks
rank_id (mediumint)
rank_title (varchar)
DBF Equivalent:
rank_id N(5)
rank_title C(100)
39. phpbb_reports
report_id (mediumint)
post_id (mediumint)
user_id (mediumint)
DBF Equivalent:
report_id N(5)
post_id N(5)
user_id N(5)
40. phpbb_reports_reasons
reason_id (mediumint)
reason_text (varchar)
DBF Equivalent:
reason_id N(5)
reason_text C(255)
41. phpbb_search_results
search_id (mediumint)
topic_id (mediumint)
DBF Equivalent:
search_id N(5)
topic_id N(5)
42. phpbb_search_wordlist
word_id (mediumint)
word_text (varchar)
DBF Equivalent:
word_id N(5)
word_text C(100)
43. phpbb_search_wordmatch
word_id (mediumint)
post_id (mediumint)
DBF Equivalent:
word_id N(5)
post_id N(5)
44. phpbb_sessions
session_id (varchar)
user_id (mediumint)
DBF Equivalent:
session_id C(32)
user_id N(5)
45. phpbb_sessions_keys
key_id (varchar)
user_id (mediumint)
DBF Equivalent:
key_id C(32)
user_id N(5)
46. phpbb_sitelist
site_id (mediumint)
site_ip (varchar)
DBF Equivalent:
site_id N(5)
site_ip C(15)
47. phpbb_smilies
smiley_id (mediumint)
code (varchar)
DBF Equivalent:
smiley_id N(5)
code C(10)
48. phpbb_styles
style_id (mediumint)
style_name (varchar)
DBF Equivalent:
style_id N(5)
style_name C(100)
49. phpbb_styles_imageset
imageset_id (mediumint)
imageset_name (varchar)
DBF Equivalent:
imageset_id N(5)
imageset_name C(100)
50. phpbb_styles_imageset_data
imageset_id (mediumint)
image_name (varchar)
DBF Equivalent:
imageset_id N(5)
image_name C(100)
51. phpbb_styles_template
template_id (mediumint)
template_name (varchar)
DBF Equivalent:
template_id N(5)
template_name C(100)
52. phpbb_styles_template_data
template_id (mediumint)
template_data (text)
DBF Equivalent:
template_id N(5)
template_data C(255)
53. phpbb_styles_theme
theme_id (mediumint)
theme_name (varchar)
DBF Equivalent:
theme_id N(5)
theme_name C(100)
54. phpbb_tapatalk_push_data
push_id (mediumint)
user_id (mediumint)
DBF Equivalent:
push_id N(5)
user_id N(5)
55. phpbb_tapatalk_users
userid (mediumint)
announcement (int)
DBF Equivalent:
userid N(5)
announcement N(5)
56. phpbb_topics
topic_id (mediumint)
forum_id (mediumint)
topic_title (varchar)
DBF Equivalent:
topic_id N(5)
forum_id N(5)
topic_title C(255)
57. phpbb_topics_posted
topic_id (mediumint)
user_id (mediumint)
DBF Equivalent:
topic_id N(5)
user_id N(5)
58. phpbb_topics_track
topic_id (mediumint)
user_id (mediumint)
DBF Equivalent:
topic_id N(5)
user_id N(5)
59. phpbb_topics_watch
topic_id (mediumint)
user_id (mediumint)
DBF Equivalent:
topic_id N(5)
user_id N(5)
60. phpbb_user_group
user_id (mediumint)
group_id (mediumint)
DBF Equivalent:
user_id N(5)
group_id N(5)
61. phpbb_users
user_id (mediumint)
username (varchar)
DBF Equivalent:
user_id N(5)
username C(100)
62. phpbb_warnings
warning_id (mediumint)
user_id (mediumint)
DBF Equivalent:
warning_id N(5)
user_id N(5)
63. phpbb_words
word_id (mediumint)
word_text (varchar)
DBF Equivalent:
word_id N(5)
word_text C(100)
64. phpbb_zebra
user_id (mediumint)
friend (tinyint)
DBF Equivalent:
user_id N(5)
friend N(1)
]]>1. phpbb_acl_groups
group_id (mediumint)
group_name (varchar)
group_desc (text)
DBF Equivalent:
group_id N(5)
group_name C(100)
group_desc C(255)
2. phpbb_acl_options
option_id (mediumint)
option_name (varchar)
option_value (varchar)
DBF Equivalent:
option_id N(5)
option_name C(100)
option_value C(100)
3. phpbb_acl_roles
role_id (mediumint)
role_name (varchar)
role_description (text)
DBF Equivalent:
role_id N(5)
role_name C(100)
role_description C(255)
4. phpbb_acl_roles_data
role_id (mediumint)
group_id (mediumint)
auth_option_id (mediumint)
DBF Equivalent:
role_id N(5)
group_id N(5)
auth_option_id N(5)
5. phpbb_acl_users
user_id (mediumint)
auth_option_id (mediumint)
DBF Equivalent:
user_id N(5)
auth_option_id N(5)
6. phpbb_attachments
attach_id (mediumint)
post_id (mediumint)
user_id (mediumint)
DBF Equivalent:
attach_id N(5)
post_id N(5)
user_id N(5)
7. phpbb_banlist
ban_id (mediumint)
ban_userid (mediumint)
ban_ip (varchar)
DBF Equivalent:
ban_id N(5)
ban_userid N(5)
ban_ip C(15)
8. phpbb_bbcodes
bbcode_id (tinyint)
bbcode_tag (varchar)
bbcode_helpline (varchar)
DBF Equivalent:
bbcode_id N(3)
bbcode_tag C(20)
bbcode_helpline C(255)
9. phpbb_bookmarks
topic_id (mediumint)
user_id (mediumint)
DBF Equivalent:
topic_id N(5)
user_id N(5)
10. phpbb_bots
bot_id (mediumint)
bot_name (varchar)
bot_agent (varchar)
DBF Equivalent:
bot_id N(5)
bot_name C(100)
bot_agent C(255)
11. phpbb_config
config_name (varchar)
config_value (varchar)
DBF Equivalent:
config_name C(100)
config_value C(255)
12. phpbb_confirm
confirm_id (mediumint)
user_id (mediumint)
code (varchar)
DBF Equivalent:
confirm_id N(5)
user_id N(5)
code C(50)
13. phpbb_disallow
disallow_id (mediumint)
disallow_username (varchar)
DBF Equivalent:
disallow_id N(5)
disallow_username C(100)
14. phpbb_drafts
draft_id (mediumint)
user_id (mediumint)
topic_id (mediumint)
DBF Equivalent:
draft_id N(5)
user_id N(5)
topic_id N(5)
15. phpbb_extension_groups
group_id (mediumint)
group_name (varchar)
DBF Equivalent:
group_id N(5)
group_name C(100)
16. phpbb_extensions
ext_id (mediumint)
ext_name (varchar)
DBF Equivalent:
ext_id N(5)
ext_name C(100)
17. phpbb_forums
forum_id (mediumint)
forum_name (varchar)
forum_desc (text)
DBF Equivalent:
forum_id N(5)
forum_name C(100)
forum_desc C(255)
18. phpbb_forums_access
forum_id (mediumint)
group_id (mediumint)
DBF Equivalent:
forum_id N(5)
group_id N(5)
19. phpbb_forums_track
forum_id (mediumint)
user_id (mediumint)
DBF Equivalent:
forum_id N(5)
user_id N(5)
20. phpbb_forums_watch
forum_id (mediumint)
user_id (mediumint)
DBF Equivalent:
forum_id N(5)
user_id N(5)
21. phpbb_groups
group_id (mediumint)
group_name (varchar)
DBF Equivalent:
group_id N(5)
group_name C(100)
22. phpbb_icons
icon_id (mediumint)
icon_url (varchar)
DBF Equivalent:
icon_id N(5)
icon_url C(255)
23. phpbb_lang
lang_id (mediumint)
lang_iso (varchar)
DBF Equivalent:
lang_id N(5)
lang_iso C(10)
24. phpbb_log
log_id (mediumint)
log_time (int)
log_type (varchar)
DBF Equivalent:
log_id N(5)
log_time N(10)
log_type C(50)
25. phpbb_moderator_cache
forum_id (mediumint)
user_id (mediumint)
DBF Equivalent:
forum_id N(5)
user_id N(5)
26. phpbb_modules
module_id (mediumint)
module_name (varchar)
DBF Equivalent:
module_id N(5)
module_name C(100)
27. phpbb_poll_options
poll_id (mediumint)
option_id (tinyint)
option_text (varchar)
DBF Equivalent:
poll_id N(5)
option_id N(3)
option_text C(255)
28. phpbb_poll_votes
poll_id (mediumint)
user_id (mediumint)
vote_option_id (tinyint)
DBF Equivalent:
poll_id N(5)
user_id N(5)
vote_option_id N(3)
29. phpbb_posts
post_id (mediumint)
topic_id (mediumint)
forum_id (mediumint)
DBF Equivalent:
post_id N(5)
topic_id N(5)
forum_id N(5)
30. phpbb_privmsgs
privmsg_id (mediumint)
user_id_from (mediumint)
user_id_to (mediumint)
DBF Equivalent:
privmsg_id N(5)
user_id_from N(5)
user_id_to N(5)
31. phpbb_privmsgs_folder
folder_id (mediumint)
user_id (mediumint)
DBF Equivalent:
folder_id N(5)
user_id N(5)
32. phpbb_privmsgs_rules
rule_id (mediumint)
user_id (mediumint)
DBF Equivalent:
rule_id N(5)
user_id N(5)
33. phpbb_privmsgs_to
privmsg_id (mediumint)
user_id (mediumint)
DBF Equivalent:
privmsg_id N(5)
user_id N(5)
34. phpbb_profile_fields
field_id (mediumint)
field_name (varchar)
DBF Equivalent:
field_id N(5)
field_name C(100)
35. phpbb_profile_fields_data
user_id (mediumint)
field_id (mediumint)
field_value (varchar)
DBF Equivalent:
user_id N(5)
field_id N(5)
field_value C(255)
36. phpbb_profile_fields_lang
field_id (mediumint)
lang_id (mediumint)
lang_value (varchar)
DBF Equivalent:
field_id N(5)
lang_id N(5)
lang_value C(255)
37. phpbb_profile_lang
user_id (mediumint)
lang_id (mediumint)
DBF Equivalent:
user_id N(5)
lang_id N(5)
38. phpbb_ranks
rank_id (mediumint)
rank_title (varchar)
DBF Equivalent:
rank_id N(5)
rank_title C(100)
39. phpbb_reports
report_id (mediumint)
post_id (mediumint)
user_id (mediumint)
DBF Equivalent:
report_id N(5)
post_id N(5)
user_id N(5)
40. phpbb_reports_reasons
reason_id (mediumint)
reason_text (varchar)
DBF Equivalent:
reason_id N(5)
reason_text C(255)
41. phpbb_search_results
search_id (mediumint)
topic_id (mediumint)
DBF Equivalent:
search_id N(5)
topic_id N(5)
42. phpbb_search_wordlist
word_id (mediumint)
word_text (varchar)
DBF Equivalent:
word_id N(5)
word_text C(100)
43. phpbb_search_wordmatch
word_id (mediumint)
post_id (mediumint)
DBF Equivalent:
word_id N(5)
post_id N(5)
44. phpbb_sessions
session_id (varchar)
user_id (mediumint)
DBF Equivalent:
session_id C(32)
user_id N(5)
45. phpbb_sessions_keys
key_id (varchar)
user_id (mediumint)
DBF Equivalent:
key_id C(32)
user_id N(5)
46. phpbb_sitelist
site_id (mediumint)
site_ip (varchar)
DBF Equivalent:
site_id N(5)
site_ip C(15)
47. phpbb_smilies
smiley_id (mediumint)
code (varchar)
DBF Equivalent:
smiley_id N(5)
code C(10)
48. phpbb_styles
style_id (mediumint)
style_name (varchar)
DBF Equivalent:
style_id N(5)
style_name C(100)
49. phpbb_styles_imageset
imageset_id (mediumint)
imageset_name (varchar)
DBF Equivalent:
imageset_id N(5)
imageset_name C(100)
50. phpbb_styles_imageset_data
imageset_id (mediumint)
image_name (varchar)
DBF Equivalent:
imageset_id N(5)
image_name C(100)
51. phpbb_styles_template
template_id (mediumint)
template_name (varchar)
DBF Equivalent:
template_id N(5)
template_name C(100)
52. phpbb_styles_template_data
template_id (mediumint)
template_data (text)
DBF Equivalent:
template_id N(5)
template_data C(255)
53. phpbb_styles_theme
theme_id (mediumint)
theme_name (varchar)
DBF Equivalent:
theme_id N(5)
theme_name C(100)
54. phpbb_tapatalk_push_data
push_id (mediumint)
user_id (mediumint)
DBF Equivalent:
push_id N(5)
user_id N(5)
55. phpbb_tapatalk_users
userid (mediumint)
announcement (int)
DBF Equivalent:
userid N(5)
announcement N(5)
56. phpbb_topics
topic_id (mediumint)
forum_id (mediumint)
topic_title (varchar)
DBF Equivalent:
topic_id N(5)
forum_id N(5)
topic_title C(255)
57. phpbb_topics_posted
topic_id (mediumint)
user_id (mediumint)
DBF Equivalent:
topic_id N(5)
user_id N(5)
58. phpbb_topics_track
topic_id (mediumint)
user_id (mediumint)
DBF Equivalent:
topic_id N(5)
user_id N(5)
59. phpbb_topics_watch
topic_id (mediumint)
user_id (mediumint)
DBF Equivalent:
topic_id N(5)
user_id N(5)
60. phpbb_user_group
user_id (mediumint)
group_id (mediumint)
DBF Equivalent:
user_id N(5)
group_id N(5)
61. phpbb_users
user_id (mediumint)
username (varchar)
DBF Equivalent:
user_id N(5)
username C(100)
62. phpbb_warnings
warning_id (mediumint)
user_id (mediumint)
DBF Equivalent:
warning_id N(5)
user_id N(5)
63. phpbb_words
word_id (mediumint)
word_text (varchar)
DBF Equivalent:
word_id N(5)
word_text C(100)
64. phpbb_zebra
user_id (mediumint)
friend (tinyint)
DBF Equivalent:
user_id N(5)
friend N(1)
En mi caso bastante hasta abajo de que respondes a la gente y ni se pasa a dar las gracias.Venga, anímense.
En mi caso bastante hasta abajo de que respondes a la gente y ni se pasa a dar las gracias.Venga, anímense.
Coincido... coincidía. Si Hacienda lo da por válido es que yo no he entendido lo que he leído o que se han explicado mal o nuestros comentarios están contaminados.Creo que sólo en _ se puede mandar alta por subsanacion y es cuando es para modificar datos que no son económicos. El resto debe ir por rectificativa.
Venga, anímense.
Bueno, estamos en Navidad, fiesta, turrones, puente, un tema muy concreto que se sale de la programación, en fin muchas coincidencias.En mi caso bastante hasta abajo de que respondes a la gente y ni se pasa a dar las gracias.
Coincido... coincidía. Si Hacienda lo da por válido es que yo no he entendido lo que he leído o que se han explicado mal o nuestros comentarios están contaminados.Creo que sólo en _ se puede mandar alta por subsanacion y es cuando es para modificar datos que no son económicos. El resto debe ir por rectificativa.
Venga, anímense.
Bueno, estamos en Navidad, fiesta, turrones, puente, un tema muy concreto que se sale de la programación, en fin muchas coincidencias.En mi caso bastante hasta abajo de que respondes a la gente y ni se pasa a dar las gracias.
Code: Select all | Expand
#include "FiveWin.ch"
PROCEDURE Main()
local transformer, src, tgt, output, loss, d_output
// Crear el Transformer
transformer := Transformer():New(6, 512, 8)
// Datos de entrada y salida (simulados)
src := hb_MatrixRandom(10, 512) // Ejemplo de matriz de entrada
tgt := hb_MatrixRandom(10, 512) // Ejemplo de matriz de salida
// Forward pass
output := transformer:Forward(src, tgt)
// Cálculo de la pérdida (simplificado)
loss := hb_MatrixSubstract(output, tgt)
loss := hb_MatrixSum(hb_MatrixMultiply(loss, hb_MatrixTranspose( loss ) ) ) // Pérdida cuadrática
// Backward pass
d_output := hb_MatrixSubstract(output, tgt)
transformer:Backward(d_output)
? "Pérdida:", loss
return
// Clase para la capa de Multi-Head Attention
CLASS MultiHeadAttention
DATA WQ, WK, WV, WO // Pesos de la capa
DATA dWQ, dWK, dWV, dWO // Gradientes de los pesos
DATA d_model, n_heads
METHOD New(d_model, n_heads)
METHOD ScaledDotProductAttention(Q, K, V)
METHOD Forward(query, key, value)
METHOD Backward(d_output, Q, K, V)
ENDCLASS
METHOD New(d_model, n_heads) CLASS MultiHeadAttention
::d_model := d_model
::n_heads := n_heads
// Inicialización de pesos (aleatoria)
::WQ := hb_MatrixRandom(d_model, d_model)
::WK := hb_MatrixRandom(d_model, d_model)
::WV := hb_MatrixRandom(d_model, d_model)
::WO := hb_MatrixRandom(d_model, d_model)
// Inicialización de gradientes
::dWQ := hb_MatrixZero(d_model, d_model)
::dWK := hb_MatrixZero(d_model, d_model)
::dWV := hb_MatrixZero(d_model, d_model)
::dWO := hb_MatrixZero(d_model, d_model)
return Self
METHOD ScaledDotProductAttention(Q, K, V) CLASS MultiHeadAttention
local scores, scaled_scores, attention_weights, output
// Producto punto escalado
scores := hb_MatrixMultiply(Q, hb_MatrixTranspose(K))
scaled_scores := hb_MatrixScale(scores, 1 / Sqrt(::d_model))
// Aplicar softmax
attention_weights := hb_Softmax(scaled_scores)
// Atención ponderada
output := hb_MatrixMultiply(attention_weights, V)
return output
METHOD Forward(query, key, value) CLASS MultiHeadAttention
local Q, K, V, attention_output, output
// Proyección de los pesos
Q := hb_MatrixMultiply(query, ::WQ)
K := hb_MatrixMultiply(key, ::WK)
V := hb_MatrixMultiply(value, ::WV)
// Atención escalada
attention_output := ::ScaledDotProductAttention(Q, K, V)
// Proyección final
output := hb_MatrixMultiply(attention_output, ::WO)
return output
METHOD Backward(d_output, Q, K, V) CLASS MultiHeadAttention
// Gradientes para WO
::dWO := hb_MatrixMultiply(hb_MatrixTranspose(Q), d_output)
// Gradientes para WQ, WK y WV (simplificados)
::dWQ := hb_MatrixMultiply(hb_MatrixTranspose(d_output), Q)
::dWK := hb_MatrixMultiply(hb_MatrixTranspose(d_output), K)
::dWV := hb_MatrixMultiply(hb_MatrixTranspose(d_output), V)
return hb_MatrixZero(::d_model, ::d_model) // Simplificación para no propagar más
// Clase para el Transformer
CLASS Transformer
DATA layers
DATA num_layers
METHOD New(num_layers, d_model, n_heads)
METHOD Forward(src, tgt)
METHOD Backward(d_output)
ENDCLASS
METHOD New(num_layers, d_model, n_heads) CLASS Transformer
local i
::num_layers := num_layers
::layers := Array(num_layers)
FOR i := 1 TO num_layers
::layers[i] := MultiHeadAttention():New(d_model, n_heads)
NEXT
return Self
METHOD Forward(src, tgt) CLASS Transformer
local output, i
output := src
FOR i := 1 TO ::num_layers
output := ::layers[i]:Forward(output, output, output)
NEXT
return output
METHOD Backward(d_output) CLASS Transformer
local grad := d_output, i
FOR i := ::num_layers TO 1 STEP -1
grad := ::layers[i]:Backward(grad, grad, grad)
NEXT
return grad
#pragma BEGINDUMP
#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>
HB_FUNC( HB_MATRIXMULTIPLY )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
// Dimensiones de la primera matriz
int rows1 = hb_arrayLen( pMatrix1 );
PHB_ITEM pRow1, pRow2, pResult, pRowResult;
int i, k, cols1, rows2, cols2;
if( rows1 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols1 = hb_arrayLen( pRow1 );
// Dimensiones de la segunda matriz
rows2 = hb_arrayLen( pMatrix2 );
if( rows2 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols2 = hb_arrayLen( pRow2 );
// Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
if( cols1 != rows2 )
{
hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
// Crear la matriz de resultado (rows1 x cols2)
pResult = hb_itemArrayNew( rows1 );
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar referencia local
}
// Realizar la multiplicación de matrices
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
int j;
for( j = 0; j < cols2; j++ )
{
double sum = 0.0;
for( k = 0; k < cols1; k++ )
{
double a = hb_arrayGetND( pRowA, k + 1 );
PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
double b = hb_arrayGetND( pRowB, j + 1 );
sum += a * b;
}
pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
hb_arraySetND( pRowResult, j + 1, sum );
}
}
// Devolver la matriz de resultado
hb_itemReturnRelease( pResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
#include <windows.h>
HB_FUNC( HB_MATRIXSCALE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value * scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXTRANSPOSE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)
// Inicializar las filas de la matriz transpuesta
for( i = 0; i < nCols; i++ )
{
hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
}
// Rellenar la matriz transpuesta
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
}
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXZERO )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con ceros
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXRANDOM )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con valores aleatorios
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
hb_arraySetND( pRow, j + 1, randomValue );
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_SOFTMAX )
{
PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores
if( pValues )
{
int nRows = hb_arrayLen( pValues ); // Número de filas
if( nRows > 0 )
{
// Asumimos que las filas tienen la misma longitud
PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)
PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
int i, j;
// Recorrer cada fila
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax
double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
double sumExp = 0.0;
// Calcular e^x para cada elemento de la fila y la suma total
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
expValues[j] = pow( M_E, value );
sumExp += expValues[j];
}
// Calcular Softmax para la fila dividiendo cada e^x por la suma total
for( j = 0; j < nCols; j++ )
{
double softmaxValue = expValues[j] / sumExp;
hb_arraySetND( pRowResult, j + 1, softmaxValue );
}
hb_xfree( expValues ); // Liberar memoria para los exponentes
// Guardar la fila de resultados en la matriz resultante
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar la fila de resultados
}
hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUBSTRACT )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );
if( nRows1 == nRows2 && nRows1 > 0 )
{
HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );
if( nCols1 == nCols2 && nCols1 > 0 )
{
HB_SIZE i, j;
// Crear la matriz de resultado
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );
// Realizar la resta elemento a elemento
for( i = 0; i < nRows1; i++ )
{
PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );
for( j = 0; j < nCols1; j++ )
{
double value1 = hb_arrayGetND( pRow1, j + 1 );
double value2 = hb_arrayGetND( pRow2, j + 1 );
hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
}
hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
hb_itemRelease( pRowResult ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
}
else
{
// Error: Las columnas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Las filas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUM )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada
if( pMatrix )
{
int nRows = hb_arrayLen( pMatrix ); // Número de filas
if( nRows > 0 )
{
double sum = 0.0;
int i;
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
int nCols = hb_arrayLen( pRow ); // Número de columnas
int j;
for( j = 0; j < nCols; j++ )
{
sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
}
}
hb_retnd( sum ); // Devolver la suma como resultado
}
else
{
// Error: Matriz vacía
hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
#pragma ENDDUMP
]]>Code: Select all | Expand
#include "FiveWin.ch"
PROCEDURE Main()
local transformer, src, tgt, output, loss, d_output
// Crear el Transformer
transformer := Transformer():New(6, 512, 8)
// Datos de entrada y salida (simulados)
src := hb_MatrixRandom(10, 512) // Ejemplo de matriz de entrada
tgt := hb_MatrixRandom(10, 512) // Ejemplo de matriz de salida
// Forward pass
output := transformer:Forward(src, tgt)
// Cálculo de la pérdida (simplificado)
loss := hb_MatrixSubstract(output, tgt)
loss := hb_MatrixSum(hb_MatrixMultiply(loss, hb_MatrixTranspose( loss ) ) ) // Pérdida cuadrática
// Backward pass
d_output := hb_MatrixSubstract(output, tgt)
transformer:Backward(d_output)
? "Pérdida:", loss
return
// Clase para la capa de Multi-Head Attention
CLASS MultiHeadAttention
DATA WQ, WK, WV, WO // Pesos de la capa
DATA dWQ, dWK, dWV, dWO // Gradientes de los pesos
DATA d_model, n_heads
METHOD New(d_model, n_heads)
METHOD ScaledDotProductAttention(Q, K, V)
METHOD Forward(query, key, value)
METHOD Backward(d_output, Q, K, V)
ENDCLASS
METHOD New(d_model, n_heads) CLASS MultiHeadAttention
::d_model := d_model
::n_heads := n_heads
// Inicialización de pesos (aleatoria)
::WQ := hb_MatrixRandom(d_model, d_model)
::WK := hb_MatrixRandom(d_model, d_model)
::WV := hb_MatrixRandom(d_model, d_model)
::WO := hb_MatrixRandom(d_model, d_model)
// Inicialización de gradientes
::dWQ := hb_MatrixZero(d_model, d_model)
::dWK := hb_MatrixZero(d_model, d_model)
::dWV := hb_MatrixZero(d_model, d_model)
::dWO := hb_MatrixZero(d_model, d_model)
return Self
METHOD ScaledDotProductAttention(Q, K, V) CLASS MultiHeadAttention
local scores, scaled_scores, attention_weights, output
// Producto punto escalado
scores := hb_MatrixMultiply(Q, hb_MatrixTranspose(K))
scaled_scores := hb_MatrixScale(scores, 1 / Sqrt(::d_model))
// Aplicar softmax
attention_weights := hb_Softmax(scaled_scores)
// Atención ponderada
output := hb_MatrixMultiply(attention_weights, V)
return output
METHOD Forward(query, key, value) CLASS MultiHeadAttention
local Q, K, V, attention_output, output
// Proyección de los pesos
Q := hb_MatrixMultiply(query, ::WQ)
K := hb_MatrixMultiply(key, ::WK)
V := hb_MatrixMultiply(value, ::WV)
// Atención escalada
attention_output := ::ScaledDotProductAttention(Q, K, V)
// Proyección final
output := hb_MatrixMultiply(attention_output, ::WO)
return output
METHOD Backward(d_output, Q, K, V) CLASS MultiHeadAttention
// Gradientes para WO
::dWO := hb_MatrixMultiply(hb_MatrixTranspose(Q), d_output)
// Gradientes para WQ, WK y WV (simplificados)
::dWQ := hb_MatrixMultiply(hb_MatrixTranspose(d_output), Q)
::dWK := hb_MatrixMultiply(hb_MatrixTranspose(d_output), K)
::dWV := hb_MatrixMultiply(hb_MatrixTranspose(d_output), V)
return hb_MatrixZero(::d_model, ::d_model) // Simplificación para no propagar más
// Clase para el Transformer
CLASS Transformer
DATA layers
DATA num_layers
METHOD New(num_layers, d_model, n_heads)
METHOD Forward(src, tgt)
METHOD Backward(d_output)
ENDCLASS
METHOD New(num_layers, d_model, n_heads) CLASS Transformer
local i
::num_layers := num_layers
::layers := Array(num_layers)
FOR i := 1 TO num_layers
::layers[i] := MultiHeadAttention():New(d_model, n_heads)
NEXT
return Self
METHOD Forward(src, tgt) CLASS Transformer
local output, i
output := src
FOR i := 1 TO ::num_layers
output := ::layers[i]:Forward(output, output, output)
NEXT
return output
METHOD Backward(d_output) CLASS Transformer
local grad := d_output, i
FOR i := ::num_layers TO 1 STEP -1
grad := ::layers[i]:Backward(grad, grad, grad)
NEXT
return grad
#pragma BEGINDUMP
#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>
HB_FUNC( HB_MATRIXMULTIPLY )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
// Dimensiones de la primera matriz
int rows1 = hb_arrayLen( pMatrix1 );
PHB_ITEM pRow1, pRow2, pResult, pRowResult;
int i, k, cols1, rows2, cols2;
if( rows1 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols1 = hb_arrayLen( pRow1 );
// Dimensiones de la segunda matriz
rows2 = hb_arrayLen( pMatrix2 );
if( rows2 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols2 = hb_arrayLen( pRow2 );
// Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
if( cols1 != rows2 )
{
hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
// Crear la matriz de resultado (rows1 x cols2)
pResult = hb_itemArrayNew( rows1 );
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar referencia local
}
// Realizar la multiplicación de matrices
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
int j;
for( j = 0; j < cols2; j++ )
{
double sum = 0.0;
for( k = 0; k < cols1; k++ )
{
double a = hb_arrayGetND( pRowA, k + 1 );
PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
double b = hb_arrayGetND( pRowB, j + 1 );
sum += a * b;
}
pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
hb_arraySetND( pRowResult, j + 1, sum );
}
}
// Devolver la matriz de resultado
hb_itemReturnRelease( pResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
#include <windows.h>
HB_FUNC( HB_MATRIXSCALE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value * scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXTRANSPOSE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)
// Inicializar las filas de la matriz transpuesta
for( i = 0; i < nCols; i++ )
{
hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
}
// Rellenar la matriz transpuesta
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
}
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXZERO )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con ceros
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXRANDOM )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con valores aleatorios
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
hb_arraySetND( pRow, j + 1, randomValue );
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_SOFTMAX )
{
PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores
if( pValues )
{
int nRows = hb_arrayLen( pValues ); // Número de filas
if( nRows > 0 )
{
// Asumimos que las filas tienen la misma longitud
PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)
PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
int i, j;
// Recorrer cada fila
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax
double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
double sumExp = 0.0;
// Calcular e^x para cada elemento de la fila y la suma total
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
expValues[j] = pow( M_E, value );
sumExp += expValues[j];
}
// Calcular Softmax para la fila dividiendo cada e^x por la suma total
for( j = 0; j < nCols; j++ )
{
double softmaxValue = expValues[j] / sumExp;
hb_arraySetND( pRowResult, j + 1, softmaxValue );
}
hb_xfree( expValues ); // Liberar memoria para los exponentes
// Guardar la fila de resultados en la matriz resultante
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar la fila de resultados
}
hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUBSTRACT )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );
if( nRows1 == nRows2 && nRows1 > 0 )
{
HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );
if( nCols1 == nCols2 && nCols1 > 0 )
{
HB_SIZE i, j;
// Crear la matriz de resultado
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );
// Realizar la resta elemento a elemento
for( i = 0; i < nRows1; i++ )
{
PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );
for( j = 0; j < nCols1; j++ )
{
double value1 = hb_arrayGetND( pRow1, j + 1 );
double value2 = hb_arrayGetND( pRow2, j + 1 );
hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
}
hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
hb_itemRelease( pRowResult ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
}
else
{
// Error: Las columnas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Las filas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUM )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada
if( pMatrix )
{
int nRows = hb_arrayLen( pMatrix ); // Número de filas
if( nRows > 0 )
{
double sum = 0.0;
int i;
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
int nCols = hb_arrayLen( pRow ); // Número de columnas
int j;
for( j = 0; j < nCols; j++ )
{
sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
}
}
hb_retnd( sum ); // Devolver la suma como resultado
}
else
{
// Error: Matriz vacía
hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
#pragma ENDDUMP
]]>Code: Select all | Expand
#include "FiveWin.ch"
// Función principal para entrenar el Transformer
PROCEDURE Main()
LOCAL d_model := 128
LOCAL n_heads := 4
LOCAL num_layers := 1
LOCAL learning_rate := 0.01
LOCAL max_epochs := 100
LOCAL output, loss, d_output, epoch
// Generar datos de entrada y salida aleatorios
LOCAL src := hb_MatrixRandom(10, d_model) // 10 secuencias de entrada
LOCAL tgt := hb_MatrixRandom(10, d_model) // 10 secuencias de objetivo
// Crear instancia del Transformer
LOCAL transformer := Transformer():New(num_layers, d_model, n_heads)
FOR epoch := 1 TO max_epochs
output := transformer:Forward(src, tgt)
loss := hb_MatrixSum(hb_MatrixMultiply(hb_MatrixSubstract(output, tgt), ;
hb_MatrixTranspose(hb_MatrixSubstract(output, tgt)))) / (10 * d_model)
// Gradiente de salida
d_output := hb_MatrixSubstract(output, tgt)
// Retropropagación y actualización de pesos
transformer:Backward(d_output)
ActualizarPesos(transformer, learning_rate)
// Mostrar pérdida en cada época
? "Época:", epoch, "Pérdida:", loss
NEXT
RETURN
// Clase para implementar MultiHeadAttention
CLASS MultiHeadAttention
DATA WQ, WK, WV, WO
DATA dWQ, dWK, dWV, dWO
METHOD New(d_model, n_heads)
METHOD Forward(Q, K, V)
METHOD Backward(d_output) VIRTUAL
ENDCLASS
METHOD New(d_model, n_heads) CLASS MultiHeadAttention
LOCAL scale := 1.0 / Sqrt(d_model)
::WQ := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::WK := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::WV := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::WO := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::dWQ = hb_MatrixZero(d_model, d_model) // Gradientes para WQ
::dWK = hb_MatrixZero(d_model, d_model) // Gradientes para WK
::dWV = hb_MatrixZero(d_model, d_model) // Gradientes para WV
::dWO = hb_MatrixZero(d_model, d_model) // Gradientes para WO
RETURN Self
METHOD Forward(Q, K, V) CLASS MultiHeadAttention
LOCAL Q_proj := hb_MatrixMultiply(Q, ::WQ)
LOCAL K_proj := hb_MatrixMultiply(K, ::WK)
LOCAL V_proj := hb_MatrixMultiply(V, ::WV)
LOCAL scores := hb_MatrixDiv( hb_MatrixMultiply(Q_proj, hb_MatrixTranspose(K_proj)), Sqrt(Len(Q_proj[1])) )
LOCAL attention := Softmax(scores)
RETURN hb_MatrixMultiply(attention, V_proj)
// Clase para implementar el Transformer
CLASS Transformer
VAR layers
METHOD New(num_layers, d_model, n_heads)
METHOD Forward(src, tgt)
METHOD Backward(d_output)
ENDCLASS
METHOD New(num_layers, d_model, n_heads) CLASS Transformer
local i
::layers := Array(num_layers)
FOR i := 1 TO num_layers
::layers[i] := MultiHeadAttention():New(d_model, n_heads)
NEXT
RETURN Self
METHOD Forward(src, tgt) CLASS Transformer
LOCAL output := src, i
FOR i := 1 TO Len(::layers)
output := ::layers[i]:Forward(output, output, output)
NEXT
RETURN output
METHOD Backward(d_output) CLASS Transformer
local i
FOR i := Len(::layers) TO 1 STEP -1
::layers[i]:Backward(d_output)
NEXT
RETURN NIL
// Función para aplicar Softmax con estabilidad numérica
FUNCTION Softmax(matrix)
LOCAL rows := Len(matrix)
LOCAL cols := Len(matrix[1])
LOCAL result := Array(rows, cols)
local i, j, max_val, sum_exp, exp_values
FOR i := 1 TO rows
max_val := hb_ArrayMax(matrix[i])
sum_exp := 0
exp_values := Array(cols)
FOR j := 1 TO cols
exp_values[j] := Exp(matrix[i][j] - max_val)
sum_exp += exp_values[j]
NEXT
FOR j := 1 TO cols
result[i][j] := exp_values[j] / sum_exp
NEXT
NEXT
RETURN result
// Función para actualizar los pesos del Transformer
FUNCTION ActualizarPesos(transformer, learning_rate)
local i, layer
FOR i := 1 TO Len(transformer:layers)
layer := transformer:layers[i]
layer:WQ := hb_MatrixSubstract(layer:WQ, hb_MatrixScale(layer:dWQ, learning_rate))
layer:WK := hb_MatrixSubstract(layer:WK, hb_MatrixScale(layer:dWK, learning_rate))
layer:WV := hb_MatrixSubstract(layer:WV, hb_MatrixScale(layer:dWV, learning_rate))
layer:WO := hb_MatrixSubstract(layer:WO, hb_MatrixScale(layer:dWO, learning_rate))
NEXT
RETURN nil
FUNCTION hb_ArrayMax(aArray)
LOCAL nMax := NIL
LOCAL i
// Verificar que el parámetro sea un array
IF ValType(aArray) != "A"
RETURN NIL
ENDIF
// Recorrer el array para encontrar el máximo
FOR i := 1 TO Len(aArray)
IF i == 1 .OR. aArray[i] > nMax
nMax := aArray[i]
ENDIF
NEXT
RETURN nMax
#pragma BEGINDUMP
#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>
HB_FUNC( HB_MATRIXMULTIPLY )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
// Dimensiones de la primera matriz
int rows1 = hb_arrayLen( pMatrix1 );
PHB_ITEM pRow1, pRow2, pResult, pRowResult;
int i, k, cols1, rows2, cols2;
if( rows1 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols1 = hb_arrayLen( pRow1 );
// Dimensiones de la segunda matriz
rows2 = hb_arrayLen( pMatrix2 );
if( rows2 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols2 = hb_arrayLen( pRow2 );
// Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
if( cols1 != rows2 )
{
hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
// Crear la matriz de resultado (rows1 x cols2)
pResult = hb_itemArrayNew( rows1 );
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar referencia local
}
// Realizar la multiplicación de matrices
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
int j;
for( j = 0; j < cols2; j++ )
{
double sum = 0.0;
for( k = 0; k < cols1; k++ )
{
double a = hb_arrayGetND( pRowA, k + 1 );
PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
double b = hb_arrayGetND( pRowB, j + 1 );
sum += a * b;
}
pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
hb_arraySetND( pRowResult, j + 1, sum );
}
}
// Devolver la matriz de resultado
hb_itemReturnRelease( pResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSCALE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value * scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXDIV )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value / scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXTRANSPOSE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)
// Inicializar las filas de la matriz transpuesta
for( i = 0; i < nCols; i++ )
{
hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
}
// Rellenar la matriz transpuesta
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
}
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXZERO )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con ceros
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXRANDOM )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con valores aleatorios
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
hb_arraySetND( pRow, j + 1, randomValue );
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_SOFTMAX )
{
PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores
if( pValues )
{
int nRows = hb_arrayLen( pValues ); // Número de filas
if( nRows > 0 )
{
// Asumimos que las filas tienen la misma longitud
PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)
PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
int i, j;
// Recorrer cada fila
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax
double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
double sumExp = 0.0;
// Calcular e^x para cada elemento de la fila y la suma total
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
expValues[j] = pow( M_E, value );
sumExp += expValues[j];
}
// Calcular Softmax para la fila dividiendo cada e^x por la suma total
for( j = 0; j < nCols; j++ )
{
double softmaxValue = expValues[j] / sumExp;
hb_arraySetND( pRowResult, j + 1, softmaxValue );
}
hb_xfree( expValues ); // Liberar memoria para los exponentes
// Guardar la fila de resultados en la matriz resultante
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar la fila de resultados
}
hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUBSTRACT )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );
if( nRows1 == nRows2 && nRows1 > 0 )
{
HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );
if( nCols1 == nCols2 && nCols1 > 0 )
{
HB_SIZE i, j;
// Crear la matriz de resultado
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );
// Realizar la resta elemento a elemento
for( i = 0; i < nRows1; i++ )
{
PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );
for( j = 0; j < nCols1; j++ )
{
double value1 = hb_arrayGetND( pRow1, j + 1 );
double value2 = hb_arrayGetND( pRow2, j + 1 );
hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
}
hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
hb_itemRelease( pRowResult ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
}
else
{
// Error: Las columnas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Las filas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUM )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada
if( pMatrix )
{
int nRows = hb_arrayLen( pMatrix ); // Número de filas
if( nRows > 0 )
{
double sum = 0.0;
int i;
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
int nCols = hb_arrayLen( pRow ); // Número de columnas
int j;
for( j = 0; j < nCols; j++ )
{
sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
}
}
hb_retnd( sum ); // Devolver la suma como resultado
}
else
{
// Error: Matriz vacía
hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
#pragma ENDDUMP
]]>Code: Select all | Expand
#include "FiveWin.ch"
// Función principal para entrenar el Transformer
PROCEDURE Main()
LOCAL d_model := 128
LOCAL n_heads := 4
LOCAL num_layers := 1
LOCAL learning_rate := 0.01
LOCAL max_epochs := 100
LOCAL output, loss, d_output, epoch
// Generar datos de entrada y salida aleatorios
LOCAL src := hb_MatrixRandom(10, d_model) // 10 secuencias de entrada
LOCAL tgt := hb_MatrixRandom(10, d_model) // 10 secuencias de objetivo
// Crear instancia del Transformer
LOCAL transformer := Transformer():New(num_layers, d_model, n_heads)
FOR epoch := 1 TO max_epochs
output := transformer:Forward(src, tgt)
loss := hb_MatrixSum(hb_MatrixMultiply(hb_MatrixSubstract(output, tgt), ;
hb_MatrixTranspose(hb_MatrixSubstract(output, tgt)))) / (10 * d_model)
// Gradiente de salida
d_output := hb_MatrixSubstract(output, tgt)
// Retropropagación y actualización de pesos
transformer:Backward(d_output)
ActualizarPesos(transformer, learning_rate)
// Mostrar pérdida en cada época
? "Época:", epoch, "Pérdida:", loss
NEXT
RETURN
// Clase para implementar MultiHeadAttention
CLASS MultiHeadAttention
DATA WQ, WK, WV, WO
DATA dWQ, dWK, dWV, dWO
METHOD New(d_model, n_heads)
METHOD Forward(Q, K, V)
METHOD Backward(d_output) VIRTUAL
ENDCLASS
METHOD New(d_model, n_heads) CLASS MultiHeadAttention
LOCAL scale := 1.0 / Sqrt(d_model)
::WQ := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::WK := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::WV := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::WO := hb_MatrixScale( hb_MatrixRandom(d_model, d_model), scale )
::dWQ = hb_MatrixZero(d_model, d_model) // Gradientes para WQ
::dWK = hb_MatrixZero(d_model, d_model) // Gradientes para WK
::dWV = hb_MatrixZero(d_model, d_model) // Gradientes para WV
::dWO = hb_MatrixZero(d_model, d_model) // Gradientes para WO
RETURN Self
METHOD Forward(Q, K, V) CLASS MultiHeadAttention
LOCAL Q_proj := hb_MatrixMultiply(Q, ::WQ)
LOCAL K_proj := hb_MatrixMultiply(K, ::WK)
LOCAL V_proj := hb_MatrixMultiply(V, ::WV)
LOCAL scores := hb_MatrixDiv( hb_MatrixMultiply(Q_proj, hb_MatrixTranspose(K_proj)), Sqrt(Len(Q_proj[1])) )
LOCAL attention := Softmax(scores)
RETURN hb_MatrixMultiply(attention, V_proj)
// Clase para implementar el Transformer
CLASS Transformer
VAR layers
METHOD New(num_layers, d_model, n_heads)
METHOD Forward(src, tgt)
METHOD Backward(d_output)
ENDCLASS
METHOD New(num_layers, d_model, n_heads) CLASS Transformer
local i
::layers := Array(num_layers)
FOR i := 1 TO num_layers
::layers[i] := MultiHeadAttention():New(d_model, n_heads)
NEXT
RETURN Self
METHOD Forward(src, tgt) CLASS Transformer
LOCAL output := src, i
FOR i := 1 TO Len(::layers)
output := ::layers[i]:Forward(output, output, output)
NEXT
RETURN output
METHOD Backward(d_output) CLASS Transformer
local i
FOR i := Len(::layers) TO 1 STEP -1
::layers[i]:Backward(d_output)
NEXT
RETURN NIL
// Función para aplicar Softmax con estabilidad numérica
FUNCTION Softmax(matrix)
LOCAL rows := Len(matrix)
LOCAL cols := Len(matrix[1])
LOCAL result := Array(rows, cols)
local i, j, max_val, sum_exp, exp_values
FOR i := 1 TO rows
max_val := hb_ArrayMax(matrix[i])
sum_exp := 0
exp_values := Array(cols)
FOR j := 1 TO cols
exp_values[j] := Exp(matrix[i][j] - max_val)
sum_exp += exp_values[j]
NEXT
FOR j := 1 TO cols
result[i][j] := exp_values[j] / sum_exp
NEXT
NEXT
RETURN result
// Función para actualizar los pesos del Transformer
FUNCTION ActualizarPesos(transformer, learning_rate)
local i, layer
FOR i := 1 TO Len(transformer:layers)
layer := transformer:layers[i]
layer:WQ := hb_MatrixSubstract(layer:WQ, hb_MatrixScale(layer:dWQ, learning_rate))
layer:WK := hb_MatrixSubstract(layer:WK, hb_MatrixScale(layer:dWK, learning_rate))
layer:WV := hb_MatrixSubstract(layer:WV, hb_MatrixScale(layer:dWV, learning_rate))
layer:WO := hb_MatrixSubstract(layer:WO, hb_MatrixScale(layer:dWO, learning_rate))
NEXT
RETURN nil
FUNCTION hb_ArrayMax(aArray)
LOCAL nMax := NIL
LOCAL i
// Verificar que el parámetro sea un array
IF ValType(aArray) != "A"
RETURN NIL
ENDIF
// Recorrer el array para encontrar el máximo
FOR i := 1 TO Len(aArray)
IF i == 1 .OR. aArray[i] > nMax
nMax := aArray[i]
ENDIF
NEXT
RETURN nMax
#pragma BEGINDUMP
#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>
HB_FUNC( HB_MATRIXMULTIPLY )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
// Dimensiones de la primera matriz
int rows1 = hb_arrayLen( pMatrix1 );
PHB_ITEM pRow1, pRow2, pResult, pRowResult;
int i, k, cols1, rows2, cols2;
if( rows1 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols1 = hb_arrayLen( pRow1 );
// Dimensiones de la segunda matriz
rows2 = hb_arrayLen( pMatrix2 );
if( rows2 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols2 = hb_arrayLen( pRow2 );
// Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
if( cols1 != rows2 )
{
hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
// Crear la matriz de resultado (rows1 x cols2)
pResult = hb_itemArrayNew( rows1 );
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar referencia local
}
// Realizar la multiplicación de matrices
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
int j;
for( j = 0; j < cols2; j++ )
{
double sum = 0.0;
for( k = 0; k < cols1; k++ )
{
double a = hb_arrayGetND( pRowA, k + 1 );
PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
double b = hb_arrayGetND( pRowB, j + 1 );
sum += a * b;
}
pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
hb_arraySetND( pRowResult, j + 1, sum );
}
}
// Devolver la matriz de resultado
hb_itemReturnRelease( pResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSCALE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value * scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXDIV )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value / scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXTRANSPOSE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)
// Inicializar las filas de la matriz transpuesta
for( i = 0; i < nCols; i++ )
{
hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
}
// Rellenar la matriz transpuesta
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
}
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXZERO )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con ceros
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXRANDOM )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con valores aleatorios
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
hb_arraySetND( pRow, j + 1, randomValue );
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_SOFTMAX )
{
PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores
if( pValues )
{
int nRows = hb_arrayLen( pValues ); // Número de filas
if( nRows > 0 )
{
// Asumimos que las filas tienen la misma longitud
PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)
PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
int i, j;
// Recorrer cada fila
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax
double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
double sumExp = 0.0;
// Calcular e^x para cada elemento de la fila y la suma total
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
expValues[j] = pow( M_E, value );
sumExp += expValues[j];
}
// Calcular Softmax para la fila dividiendo cada e^x por la suma total
for( j = 0; j < nCols; j++ )
{
double softmaxValue = expValues[j] / sumExp;
hb_arraySetND( pRowResult, j + 1, softmaxValue );
}
hb_xfree( expValues ); // Liberar memoria para los exponentes
// Guardar la fila de resultados en la matriz resultante
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar la fila de resultados
}
hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUBSTRACT )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );
if( nRows1 == nRows2 && nRows1 > 0 )
{
HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );
if( nCols1 == nCols2 && nCols1 > 0 )
{
HB_SIZE i, j;
// Crear la matriz de resultado
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );
// Realizar la resta elemento a elemento
for( i = 0; i < nRows1; i++ )
{
PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );
for( j = 0; j < nCols1; j++ )
{
double value1 = hb_arrayGetND( pRow1, j + 1 );
double value2 = hb_arrayGetND( pRow2, j + 1 );
hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
}
hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
hb_itemRelease( pRowResult ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
}
else
{
// Error: Las columnas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Las filas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUM )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada
if( pMatrix )
{
int nRows = hb_arrayLen( pMatrix ); // Número de filas
if( nRows > 0 )
{
double sum = 0.0;
int i;
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
int nCols = hb_arrayLen( pRow ); // Número de columnas
int j;
for( j = 0; j < nCols; j++ )
{
sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
}
}
hb_retnd( sum ); // Devolver la suma como resultado
}
else
{
// Error: Matriz vacía
hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
#pragma ENDDUMP
]]>Code: Select all | Expand
#include "FiveWin.ch"
// Función principal para entrenar el Transformer
PROCEDURE Main()
LOCAL d_model := 128
LOCAL n_heads := 4
LOCAL num_layers := 1
LOCAL learning_rate := 0.001
LOCAL max_epochs := 100
LOCAL output, loss, d_output, epoch
// Generar datos de entrada y salida aleatorios
LOCAL src := hb_MatrixRandom(10, d_model) // 10 secuencias de entrada
LOCAL tgt := hb_MatrixRandom(10, d_model) // 10 secuencias de objetivo
// Crear instancia del Transformer
LOCAL transformer := Transformer():New(num_layers, d_model, n_heads)
FOR epoch := 1 TO max_epochs
output := transformer:Forward(src, tgt)
loss := hb_MatrixSum(hb_MatrixMultiply(hb_MatrixSubstract(output, tgt), ;
hb_MatrixTranspose(hb_MatrixSubstract(output, tgt)))) / (10 * d_model)
// Gradiente de salida
d_output := hb_MatrixSubstract(output, tgt)
// Retropropagación y actualización de pesos
transformer:Backward(d_output)
ActualizarPesos(transformer, learning_rate)
// Mostrar pérdida en cada época
? "Época:", epoch, "Pérdida:", loss
NEXT
RETURN
// Clase para implementar MultiHeadAttention
CLASS MultiHeadAttention
DATA d_model, n_heads
DATA WQ, WK, WV, WO
DATA dWQ, dWK, dWV, dWO
// Cache para backpropagation
DATA Q_proj
DATA K_proj
DATA V_proj
DATA attention_scores
DATA attention_probs
METHOD New(d_model, n_heads)
METHOD Forward(Q, K, V)
METHOD Backward(d_output)
METHOD InitGradients()
ENDCLASS
METHOD New(d_model, n_heads) CLASS MultiHeadAttention
LOCAL scale := 1.0 / Sqrt(d_model)
// Guardamos d_model como propiedad de la clase
::d_model := d_model
// Inicializar matrices de pesos
::WQ := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
::WK := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
::WV := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
::WO := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
// Inicializar gradientes
::InitGradients()
RETURN Self
METHOD InitGradients() CLASS MultiHeadAttention
// Inicializar gradientes como matrices de ceros
::dWQ := hb_MatrixZero(::d_model, ::d_model)
::dWK := hb_MatrixZero(::d_model, ::d_model)
::dWV := hb_MatrixZero(::d_model, ::d_model)
::dWO := hb_MatrixZero(::d_model, ::d_model)
RETURN NIL
METHOD Forward(Q, K, V) CLASS MultiHeadAttention
// Guardamos los valores proyectados para usar en backward
::Q_proj := hb_MatrixMultiply(Q, ::WQ)
::K_proj := hb_MatrixMultiply(K, ::WK)
::V_proj := hb_MatrixMultiply(V, ::WV)
// Calcular scores de atención
::attention_scores := hb_MatrixDiv(hb_MatrixMultiply(::Q_proj, hb_MatrixTranspose(::K_proj)), ;
Sqrt(Len(::Q_proj[1])))
// Aplicar softmax para obtener probabilidades de atención
::attention_probs := Softmax(::attention_scores)
RETURN hb_MatrixMultiply(::attention_probs, ::V_proj)
METHOD Backward(d_output) CLASS MultiHeadAttention
local attention_grad, Q_grad, K_grad, V_grad
// Reiniciar gradientes antes de acumularlos
::InitGradients()
// Gradientes para la atención
attention_grad := d_output
// Gradientes para las matrices de peso
::dWO := hb_MatrixMultiply(hb_MatrixTranspose(attention_grad), ::V_proj)
// Gradientes para Q, K, V proyectados
Q_grad := hb_MatrixMultiply(attention_grad, ::WQ)
K_grad := hb_MatrixMultiply(attention_grad, ::WK)
V_grad := hb_MatrixMultiply(attention_grad, ::WV)
// Actualizar gradientes acumulados usando los valores cacheados
::dWQ := hb_MatrixSum(::dWQ, hb_MatrixMultiply(hb_MatrixTranspose(Q_grad), ::K_proj))
::dWK := hb_MatrixSum(::dWK, hb_MatrixMultiply(hb_MatrixTranspose(K_grad), ::Q_proj))
::dWV := hb_MatrixSum(::dWV, hb_MatrixMultiply(hb_MatrixTranspose(V_grad), ::attention_scores))
RETURN d_output
// Clase para implementar el Transformer
CLASS Transformer
VAR layers
METHOD New(num_layers, d_model, n_heads)
METHOD Forward(src, tgt)
METHOD Backward(d_output)
ENDCLASS
METHOD New(num_layers, d_model, n_heads) CLASS Transformer
local i
::layers := Array(num_layers)
FOR i := 1 TO num_layers
::layers[i] := MultiHeadAttention():New(d_model, n_heads)
NEXT
RETURN Self
METHOD Forward(src, tgt) CLASS Transformer
LOCAL output := src, i
FOR i := 1 TO Len(::layers)
output := ::layers[i]:Forward(output, output, output)
NEXT
RETURN output
METHOD Backward(d_output) CLASS Transformer
local i
FOR i := Len(::layers) TO 1 STEP -1
::layers[i]:Backward(d_output)
NEXT
RETURN NIL
// Función para aplicar Softmax con estabilidad numérica
FUNCTION Softmax(matrix)
LOCAL rows := Len(matrix)
LOCAL cols := Len(matrix[1])
LOCAL result := Array(rows, cols)
local i, j, max_val, sum_exp, exp_values
FOR i := 1 TO rows
max_val := hb_ArrayMax(matrix[i])
sum_exp := 0
exp_values := Array(cols)
FOR j := 1 TO cols
exp_values[j] := Exp(matrix[i][j] - max_val)
sum_exp += exp_values[j]
NEXT
FOR j := 1 TO cols
result[i][j] := exp_values[j] / sum_exp
NEXT
NEXT
RETURN result
// Función para actualizar los pesos del Transformer
FUNCTION ActualizarPesos(transformer, learning_rate)
local i, layer
FOR i := 1 TO Len(transformer:layers)
layer := transformer:layers[i]
XBrowser( layer:dWQ )
layer:WQ := hb_MatrixSubstract(layer:WQ, hb_MatrixScale(layer:dWQ, learning_rate))
layer:WK := hb_MatrixSubstract(layer:WK, hb_MatrixScale(layer:dWK, learning_rate))
layer:WV := hb_MatrixSubstract(layer:WV, hb_MatrixScale(layer:dWV, learning_rate))
layer:WO := hb_MatrixSubstract(layer:WO, hb_MatrixScale(layer:dWO, learning_rate))
NEXT
RETURN nil
FUNCTION hb_ArrayMax(aArray)
LOCAL nMax := NIL
LOCAL i
// Verificar que el parámetro sea un array
IF ValType(aArray) != "A"
RETURN NIL
ENDIF
// Recorrer el array para encontrar el máximo
FOR i := 1 TO Len(aArray)
IF i == 1 .OR. aArray[i] > nMax
nMax := aArray[i]
ENDIF
NEXT
RETURN nMax
#pragma BEGINDUMP
#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>
HB_FUNC( HB_MATRIXMULTIPLY )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
// Dimensiones de la primera matriz
int rows1 = hb_arrayLen( pMatrix1 );
PHB_ITEM pRow1, pRow2, pResult, pRowResult;
int i, k, cols1, rows2, cols2;
if( rows1 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols1 = hb_arrayLen( pRow1 );
// Dimensiones de la segunda matriz
rows2 = hb_arrayLen( pMatrix2 );
if( rows2 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols2 = hb_arrayLen( pRow2 );
// Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
if( cols1 != rows2 )
{
hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
// Crear la matriz de resultado (rows1 x cols2)
pResult = hb_itemArrayNew( rows1 );
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar referencia local
}
// Realizar la multiplicación de matrices
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
int j;
for( j = 0; j < cols2; j++ )
{
double sum = 0.0;
for( k = 0; k < cols1; k++ )
{
double a = hb_arrayGetND( pRowA, k + 1 );
PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
double b = hb_arrayGetND( pRowB, j + 1 );
sum += a * b;
}
pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
hb_arraySetND( pRowResult, j + 1, sum );
}
}
// Devolver la matriz de resultado
hb_itemReturnRelease( pResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSCALE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value * scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXDIV )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value / scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXTRANSPOSE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)
// Inicializar las filas de la matriz transpuesta
for( i = 0; i < nCols; i++ )
{
hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
}
// Rellenar la matriz transpuesta
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
}
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXZERO )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con ceros
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXRANDOM )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con valores aleatorios
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
hb_arraySetND( pRow, j + 1, randomValue );
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_SOFTMAX )
{
PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores
if( pValues )
{
int nRows = hb_arrayLen( pValues ); // Número de filas
if( nRows > 0 )
{
// Asumimos que las filas tienen la misma longitud
PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)
PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
int i, j;
// Recorrer cada fila
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax
double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
double sumExp = 0.0;
// Calcular e^x para cada elemento de la fila y la suma total
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
expValues[j] = pow( M_E, value );
sumExp += expValues[j];
}
// Calcular Softmax para la fila dividiendo cada e^x por la suma total
for( j = 0; j < nCols; j++ )
{
double softmaxValue = expValues[j] / sumExp;
hb_arraySetND( pRowResult, j + 1, softmaxValue );
}
hb_xfree( expValues ); // Liberar memoria para los exponentes
// Guardar la fila de resultados en la matriz resultante
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar la fila de resultados
}
hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUBSTRACT )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );
if( nRows1 == nRows2 && nRows1 > 0 )
{
HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );
if( nCols1 == nCols2 && nCols1 > 0 )
{
HB_SIZE i, j;
// Crear la matriz de resultado
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );
// Realizar la resta elemento a elemento
for( i = 0; i < nRows1; i++ )
{
PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );
for( j = 0; j < nCols1; j++ )
{
double value1 = hb_arrayGetND( pRow1, j + 1 );
double value2 = hb_arrayGetND( pRow2, j + 1 );
hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
}
hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
hb_itemRelease( pRowResult ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
}
else
{
// Error: Las columnas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Las filas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUM )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada
if( pMatrix )
{
int nRows = hb_arrayLen( pMatrix ); // Número de filas
if( nRows > 0 )
{
double sum = 0.0;
int i;
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
int nCols = hb_arrayLen( pRow ); // Número de columnas
int j;
for( j = 0; j < nCols; j++ )
{
sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
}
}
hb_retnd( sum ); // Devolver la suma como resultado
}
else
{
// Error: Matriz vacía
hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
#pragma ENDDUMP
]]>Code: Select all | Expand
#include "FiveWin.ch"
// Función principal para entrenar el Transformer
PROCEDURE Main()
LOCAL d_model := 128
LOCAL n_heads := 4
LOCAL num_layers := 1
LOCAL learning_rate := 0.001
LOCAL max_epochs := 100
LOCAL output, loss, d_output, epoch
// Generar datos de entrada y salida aleatorios
LOCAL src := hb_MatrixRandom(10, d_model) // 10 secuencias de entrada
LOCAL tgt := hb_MatrixRandom(10, d_model) // 10 secuencias de objetivo
// Crear instancia del Transformer
LOCAL transformer := Transformer():New(num_layers, d_model, n_heads)
FOR epoch := 1 TO max_epochs
output := transformer:Forward(src, tgt)
loss := hb_MatrixSum(hb_MatrixMultiply(hb_MatrixSubstract(output, tgt), ;
hb_MatrixTranspose(hb_MatrixSubstract(output, tgt)))) / (10 * d_model)
// Gradiente de salida
d_output := hb_MatrixSubstract(output, tgt)
// Retropropagación y actualización de pesos
transformer:Backward(d_output)
ActualizarPesos(transformer, learning_rate)
// Mostrar pérdida en cada época
? "Época:", epoch, "Pérdida:", loss
NEXT
RETURN
// Clase para implementar MultiHeadAttention
CLASS MultiHeadAttention
DATA d_model, n_heads
DATA WQ, WK, WV, WO
DATA dWQ, dWK, dWV, dWO
// Cache para backpropagation
DATA Q_proj
DATA K_proj
DATA V_proj
DATA attention_scores
DATA attention_probs
METHOD New(d_model, n_heads)
METHOD Forward(Q, K, V)
METHOD Backward(d_output)
METHOD InitGradients()
ENDCLASS
METHOD New(d_model, n_heads) CLASS MultiHeadAttention
LOCAL scale := 1.0 / Sqrt(d_model)
// Guardamos d_model como propiedad de la clase
::d_model := d_model
// Inicializar matrices de pesos
::WQ := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
::WK := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
::WV := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
::WO := hb_MatrixScale(hb_MatrixRandom(d_model, d_model), scale)
// Inicializar gradientes
::InitGradients()
RETURN Self
METHOD InitGradients() CLASS MultiHeadAttention
// Inicializar gradientes como matrices de ceros
::dWQ := hb_MatrixZero(::d_model, ::d_model)
::dWK := hb_MatrixZero(::d_model, ::d_model)
::dWV := hb_MatrixZero(::d_model, ::d_model)
::dWO := hb_MatrixZero(::d_model, ::d_model)
RETURN NIL
METHOD Forward(Q, K, V) CLASS MultiHeadAttention
// Guardamos los valores proyectados para usar en backward
::Q_proj := hb_MatrixMultiply(Q, ::WQ)
::K_proj := hb_MatrixMultiply(K, ::WK)
::V_proj := hb_MatrixMultiply(V, ::WV)
// Calcular scores de atención
::attention_scores := hb_MatrixDiv(hb_MatrixMultiply(::Q_proj, hb_MatrixTranspose(::K_proj)), ;
Sqrt(Len(::Q_proj[1])))
// Aplicar softmax para obtener probabilidades de atención
::attention_probs := Softmax(::attention_scores)
RETURN hb_MatrixMultiply(::attention_probs, ::V_proj)
METHOD Backward(d_output) CLASS MultiHeadAttention
local attention_grad, Q_grad, K_grad, V_grad
// Reiniciar gradientes antes de acumularlos
::InitGradients()
// Gradientes para la atención
attention_grad := d_output
// Gradientes para las matrices de peso
::dWO := hb_MatrixMultiply(hb_MatrixTranspose(attention_grad), ::V_proj)
// Gradientes para Q, K, V proyectados
Q_grad := hb_MatrixMultiply(attention_grad, ::WQ)
K_grad := hb_MatrixMultiply(attention_grad, ::WK)
V_grad := hb_MatrixMultiply(attention_grad, ::WV)
// Actualizar gradientes acumulados usando los valores cacheados
::dWQ := hb_MatrixSum(::dWQ, hb_MatrixMultiply(hb_MatrixTranspose(Q_grad), ::K_proj))
::dWK := hb_MatrixSum(::dWK, hb_MatrixMultiply(hb_MatrixTranspose(K_grad), ::Q_proj))
::dWV := hb_MatrixSum(::dWV, hb_MatrixMultiply(hb_MatrixTranspose(V_grad), ::attention_scores))
RETURN d_output
// Clase para implementar el Transformer
CLASS Transformer
VAR layers
METHOD New(num_layers, d_model, n_heads)
METHOD Forward(src, tgt)
METHOD Backward(d_output)
ENDCLASS
METHOD New(num_layers, d_model, n_heads) CLASS Transformer
local i
::layers := Array(num_layers)
FOR i := 1 TO num_layers
::layers[i] := MultiHeadAttention():New(d_model, n_heads)
NEXT
RETURN Self
METHOD Forward(src, tgt) CLASS Transformer
LOCAL output := src, i
FOR i := 1 TO Len(::layers)
output := ::layers[i]:Forward(output, output, output)
NEXT
RETURN output
METHOD Backward(d_output) CLASS Transformer
local i
FOR i := Len(::layers) TO 1 STEP -1
::layers[i]:Backward(d_output)
NEXT
RETURN NIL
// Función para aplicar Softmax con estabilidad numérica
FUNCTION Softmax(matrix)
LOCAL rows := Len(matrix)
LOCAL cols := Len(matrix[1])
LOCAL result := Array(rows, cols)
local i, j, max_val, sum_exp, exp_values
FOR i := 1 TO rows
max_val := hb_ArrayMax(matrix[i])
sum_exp := 0
exp_values := Array(cols)
FOR j := 1 TO cols
exp_values[j] := Exp(matrix[i][j] - max_val)
sum_exp += exp_values[j]
NEXT
FOR j := 1 TO cols
result[i][j] := exp_values[j] / sum_exp
NEXT
NEXT
RETURN result
// Función para actualizar los pesos del Transformer
FUNCTION ActualizarPesos(transformer, learning_rate)
local i, layer
FOR i := 1 TO Len(transformer:layers)
layer := transformer:layers[i]
XBrowser( layer:dWQ )
layer:WQ := hb_MatrixSubstract(layer:WQ, hb_MatrixScale(layer:dWQ, learning_rate))
layer:WK := hb_MatrixSubstract(layer:WK, hb_MatrixScale(layer:dWK, learning_rate))
layer:WV := hb_MatrixSubstract(layer:WV, hb_MatrixScale(layer:dWV, learning_rate))
layer:WO := hb_MatrixSubstract(layer:WO, hb_MatrixScale(layer:dWO, learning_rate))
NEXT
RETURN nil
FUNCTION hb_ArrayMax(aArray)
LOCAL nMax := NIL
LOCAL i
// Verificar que el parámetro sea un array
IF ValType(aArray) != "A"
RETURN NIL
ENDIF
// Recorrer el array para encontrar el máximo
FOR i := 1 TO Len(aArray)
IF i == 1 .OR. aArray[i] > nMax
nMax := aArray[i]
ENDIF
NEXT
RETURN nMax
#pragma BEGINDUMP
#include <hbapi.h>
#include <hbapiitm.h>
#include <hbapierr.h>
#include <math.h>
HB_FUNC( HB_MATRIXMULTIPLY )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
// Dimensiones de la primera matriz
int rows1 = hb_arrayLen( pMatrix1 );
PHB_ITEM pRow1, pRow2, pResult, pRowResult;
int i, k, cols1, rows2, cols2;
if( rows1 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow1 = hb_arrayGetItemPtr( pMatrix1, 1 );
if( !pRow1 || !HB_IS_ARRAY( pRow1 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "First matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols1 = hb_arrayLen( pRow1 );
// Dimensiones de la segunda matriz
rows2 = hb_arrayLen( pMatrix2 );
if( rows2 == 0 )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is empty", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
pRow2 = hb_arrayGetItemPtr( pMatrix2, 1 );
if( !pRow2 || !HB_IS_ARRAY( pRow2 ) )
{
hb_errRT_BASE( EG_ARG, 3012, "Second matrix is not valid", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
cols2 = hb_arrayLen( pRow2 );
// Validar compatibilidad para la multiplicación (cols1 debe ser igual a rows2)
if( cols1 != rows2 )
{
hb_errRT_BASE( EG_ARG, 3012, "Matrix dimensions do not match for multiplication", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
return;
}
// Crear la matriz de resultado (rows1 x cols2)
pResult = hb_itemArrayNew( rows1 );
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowResult = hb_itemArrayNew( cols2 );
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar referencia local
}
// Realizar la multiplicación de matrices
for( i = 0; i < rows1; i++ )
{
PHB_ITEM pRowA = hb_arrayGetItemPtr( pMatrix1, i + 1 );
int j;
for( j = 0; j < cols2; j++ )
{
double sum = 0.0;
for( k = 0; k < cols1; k++ )
{
double a = hb_arrayGetND( pRowA, k + 1 );
PHB_ITEM pRowB = hb_arrayGetItemPtr( pMatrix2, k + 1 );
double b = hb_arrayGetND( pRowB, j + 1 );
sum += a * b;
}
pRowResult = hb_arrayGetItemPtr( pResult, i + 1 );
hb_arraySetND( pRowResult, j + 1, sum );
}
}
// Devolver la matriz de resultado
hb_itemReturnRelease( pResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSCALE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value * scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXDIV )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a escalar
double scale = hb_parnd( 2 ); // Segundo parámetro: escalar
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows );
// Copiar y escalar los datos
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
HB_SIZE nCols = hb_arrayLen( pRow );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
hb_arraySetND( pRowResult, j + 1, value / scale );
}
hb_arraySet( pMatrixResult, i + 1, pRowResult );
hb_itemRelease( pRowResult );
}
hb_itemReturnRelease( pMatrixResult );
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXTRANSPOSE )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: matriz a transponer
if( pMatrix )
{
HB_SIZE nRows = hb_arrayLen( pMatrix );
HB_SIZE nCols = hb_arrayLen( hb_arrayGetItemPtr( pMatrix, 1 ) ); // Número de columnas de la primera fila
HB_SIZE i, j;
PHB_ITEM pMatrixResult = hb_itemArrayNew( nCols ); // Crear matriz transpuesta (nCols x nRows)
// Inicializar las filas de la matriz transpuesta
for( i = 0; i < nCols; i++ )
{
hb_arraySet( pMatrixResult, i + 1, hb_itemArrayNew( nRows ) );
}
// Rellenar la matriz transpuesta
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 ); // Obtener el valor original
PHB_ITEM pTransposedRow = hb_arrayGetItemPtr( pMatrixResult, j + 1 );
hb_arraySetND( pTransposedRow, i + 1, value ); // Asignar a la posición transpuesta
}
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz transpuesta
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXZERO )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con ceros
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
hb_arraySetND( pRow, j + 1, 0.0 ); // Establecer cada elemento a 0.0
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXRANDOM )
{
HB_SIZE nRows = hb_parns( 1 ); // Número de filas
HB_SIZE nCols = hb_parns( 2 ); // Número de columnas
if( nRows > 0 && nCols > 0 )
{
HB_SIZE i, j;
PHB_ITEM pMatrix = hb_itemArrayNew( nRows ); // Crear la matriz de nRows filas
// Inicializar la matriz con valores aleatorios
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_itemArrayNew( nCols ); // Crear una fila con nCols columnas
for( j = 0; j < nCols; j++ )
{
double randomValue = (double)rand() / RAND_MAX; // Valor aleatorio entre 0.0 y 1.0
hb_arraySetND( pRow, j + 1, randomValue );
}
hb_arraySet( pMatrix, i + 1, pRow ); // Añadir la fila a la matriz
hb_itemRelease( pRow ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrix ); // Devolver la matriz completa
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_SOFTMAX )
{
PHB_ITEM pValues = hb_param( 1, HB_IT_ARRAY ); // Primer parámetro: array multidimensional de valores
if( pValues )
{
int nRows = hb_arrayLen( pValues ); // Número de filas
if( nRows > 0 )
{
// Asumimos que las filas tienen la misma longitud
PHB_ITEM pFirstRow = hb_arrayGetItemPtr( pValues, 1 );
int nCols = hb_arrayLen( pFirstRow ); // Número de columnas (basado en la primera fila)
PHB_ITEM pResult = hb_itemArrayNew( nRows ); // Array para almacenar los resultados
int i, j;
// Recorrer cada fila
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pValues, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols ); // Fila de resultados para Softmax
double* expValues = (double*) hb_xgrab( nCols * sizeof(double) );
double sumExp = 0.0;
// Calcular e^x para cada elemento de la fila y la suma total
for( j = 0; j < nCols; j++ )
{
double value = hb_arrayGetND( pRow, j + 1 );
expValues[j] = pow( M_E, value );
sumExp += expValues[j];
}
// Calcular Softmax para la fila dividiendo cada e^x por la suma total
for( j = 0; j < nCols; j++ )
{
double softmaxValue = expValues[j] / sumExp;
hb_arraySetND( pRowResult, j + 1, softmaxValue );
}
hb_xfree( expValues ); // Liberar memoria para los exponentes
// Guardar la fila de resultados en la matriz resultante
hb_arraySet( pResult, i + 1, pRowResult );
hb_itemRelease( pRowResult ); // Liberar la fila de resultados
}
hb_itemReturnRelease( pResult ); // Devolver la matriz de resultados
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUBSTRACT )
{
PHB_ITEM pMatrix1 = hb_param( 1, HB_IT_ARRAY ); // Primera matriz
PHB_ITEM pMatrix2 = hb_param( 2, HB_IT_ARRAY ); // Segunda matriz
if( pMatrix1 && pMatrix2 )
{
HB_SIZE nRows1 = hb_arrayLen( pMatrix1 );
HB_SIZE nRows2 = hb_arrayLen( pMatrix2 );
if( nRows1 == nRows2 && nRows1 > 0 )
{
HB_SIZE nCols1 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix1, 1 ) );
HB_SIZE nCols2 = hb_arrayLen( hb_arrayGetItemPtr( pMatrix2, 1 ) );
if( nCols1 == nCols2 && nCols1 > 0 )
{
HB_SIZE i, j;
// Crear la matriz de resultado
PHB_ITEM pMatrixResult = hb_itemArrayNew( nRows1 );
// Realizar la resta elemento a elemento
for( i = 0; i < nRows1; i++ )
{
PHB_ITEM pRow1 = hb_arrayGetItemPtr( pMatrix1, i + 1 );
PHB_ITEM pRow2 = hb_arrayGetItemPtr( pMatrix2, i + 1 );
PHB_ITEM pRowResult = hb_itemArrayNew( nCols1 );
for( j = 0; j < nCols1; j++ )
{
double value1 = hb_arrayGetND( pRow1, j + 1 );
double value2 = hb_arrayGetND( pRow2, j + 1 );
hb_arraySetND( pRowResult, j + 1, value1 - value2 ); // Resta
}
hb_arraySet( pMatrixResult, i + 1, pRowResult ); // Añadir la fila al resultado
hb_itemRelease( pRowResult ); // Liberar la fila temporal
}
hb_itemReturnRelease( pMatrixResult ); // Devolver la matriz resultado
}
else
{
// Error: Las columnas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Column dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Las filas no coinciden
hb_errRT_BASE( EG_ARG, 3012, "Row dimensions do not match", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameters", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
HB_FUNC( HB_MATRIXSUM )
{
PHB_ITEM pMatrix = hb_param( 1, HB_IT_ARRAY ); // Matriz de entrada
if( pMatrix )
{
int nRows = hb_arrayLen( pMatrix ); // Número de filas
if( nRows > 0 )
{
double sum = 0.0;
int i;
for( i = 0; i < nRows; i++ )
{
PHB_ITEM pRow = hb_arrayGetItemPtr( pMatrix, i + 1 );
int nCols = hb_arrayLen( pRow ); // Número de columnas
int j;
for( j = 0; j < nCols; j++ )
{
sum += hb_arrayGetND( pRow, j + 1 ); // Sumar el elemento actual
}
}
hb_retnd( sum ); // Devolver la suma como resultado
}
else
{
// Error: Matriz vacía
hb_errRT_BASE( EG_ARG, 3012, "Empty matrix", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
else
{
// Error: Argumentos inválidos
hb_errRT_BASE( EG_ARG, 3012, "Invalid parameter", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
#pragma ENDDUMP
]]>