topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
Compiler warning messages. | Guys:
Is there a way that the BUILDX.BAT command and/or the xHarbour Builder (from commercial xHarbour) display all undeclared / undefined symbols and stop compiling / building, like the /W /ES2 from old Clipper: Clipper myprog /w /es2.
Thank you. |
Compiler warning messages. | Gustavo,
You can modify samples\buildx.bat yourself and use the same Clipper flags <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Compiler warning messages. | Antonio:
Thank you very much.
Gustavo |
Compiler/linker switches | Dear friends, what are the optimal compiler/linker switches for a FWPPC app?
Another thing: I noticed that a FWPPC EXE can greatly compressed. Can we use any compiler/linker switches to reduce the size of the EXE?
EMG |
Compiling | HI all,
Can anyone tell me how can I compiling two RC files in one .exe??
Thanks for help |
Compiling | Open with notepad, copy and paste one into the other. No special tool needed. |
Compiling | Dear ADutheil
BuildRC.BAT
copy WINXP.RC+EZ4FO1.RC+EZ4FO2.RC+EZ4CFG.RC+EZ4BMP.RC RESOURCE.RC
BRC32.EXE -R RESOURCE.RC
Then use RESOURCE.RC instead of 2 RC files
It may help. |
Compiling | create with a text file myrc.rc
#include "rc1.rc" your first resource file
#include "rc2.rc"
#include "rc3.rc"
.....
in your make file just myrc.rc
Richard |
Compiling | To All
I copy all my .rc into one monolithic .rc and then compile to .res and link the .res into my .exe .. here is a modified version of Rc2Dll32.bat.
Rick Lipkin
[code=fw:1c4rqfhc]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@Echo Off<br />rem syntax: <span style="color: #000000;">rc2dll32</span>.bat Your_rc_file !!! without the .RC extension<br /><br />DEL GroomW32.RC<br />DEL GroomW32.RES<br /><br />COPY *.RC GroomW32.RC<br /><br />C:\BORLAND\BCC582\BIN\brc32 -r %<span style="color: #000000;">1</span>.rc<br /><br />del *.iL?<br />del *.map<br />del *.obj<br />del *.~rc<br />del *.rws<br />del *.tds<br />echo done!<br /> </div>[/code:1c4rqfhc] |
Compiling 3 PRGs with BUILDX | Guys:
I have 3 PRGs: main1, custreps, invreps. How do I compile them with the BUILDX.BAT batch file ? Thank you. |
Compiling 3 PRGs with BUILDX | test1.prg
test2.prg
test3.prg
add test1.prg:
#include "test2.prg"
#include "test3.prg" |
Compiling 3 PRGs with BUILDX | SGS:
Thank you for your solution but I'm using STATIC modules with the same names so the compiler will not compile it that way. |
Compiling 3 PRGs with BUILDX | Use MAKE
if not exist obj md obj
c:\fwh\bcc582\bin\make -fTestGi.mak
Regards,
p.s
TestGi.mak
#Borland make sample, (c) FiveTech Software 2005
program=TestGi
FWDIR=c:\fwh
HBDIR=c:\fwh\xharbour
BCDIR=c:\fwh\bcc582
# change path if needed
# ---------------------
.path.OBJ = .\obj
.path.PRG = .\
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.RC = .\
# PRG - Files
# ---------------------
PRG = \
$(program).PRG \
sql.PRG \
procedur.PRG \
mybrowse.PRG \
xbrowse.PRG
# C - Files
# ---------------------
# C = \
# two.C \
# three.C
PROJECT : $(program).EXE
$(program).EXE : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) $(program).RES
echo off
echo $(BCDIR)\bin\c0w32.obj + > b32.bc
# OBJ - Files
# ---------------------
echo obj\$(program).OBJ \
obj\sql.OBJ \
obj\procedur.OBJ \
obj\mybrowse.OBJ \
obj\xbrowse.OBJ , + >> b32.bc
# EXE , MAP - Files
# ---------------------
echo $(program).EXE, + >> b32.bc
echo $(program).MAP, + >> b32.bc
# FIVEWIN Lib`s
# ---------------------
echo $(FWDIR)\lib\Fivehx.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
# xHARBOUR-Lib`s
# ---------------------
echo $(HBDIR)\lib\rtl.lib + >> b32.bc
echo $(HBDIR)\lib\vm.lib + >> b32.bc
echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
echo $(HBDIR)\lib\lang.lib + >> b32.bc
echo $(HBDIR)\lib\macro.lib + >> b32.bc
echo $(HBDIR)\lib\rdd.lib + >> b32.bc
echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\debug.lib + >> b32.bc
echo $(HBDIR)\lib\common.lib + >> b32.bc
echo $(HBDIR)\lib\pp.lib + >> b32.bc
echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc
echo $(HBDIR)\lib\ct.lib + >> b32.bc
# Uncomment these two lines to use Advantage RDD
echo $(HBDIR)\lib\rddads.lib + >> b32.bc
echo $(HBDIR)\lib\Ace32.lib + >> b32.bc
echo $(BCDIR)\lib\cw32.lib + >> b32.bc
echo $(BCDIR)\lib\import32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib , >> b32.bc
IF EXIST $(program).RES echo $(program).RES >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc > link.log
del b32.bc
.PRG.OBJ:
$(HBDIR)\bin\harbour $< /N /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include > clip.log
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c > bcc.log
.C.OBJ:
echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp
$(program).RES : $(program).RC
$(BCDIR)\bin\brc32.exe -r $(program).RC
|
Compiling FWH Tutor01-08 with VC98 Errors in link | Dear Antonio,I used the vc98 you suggested last week and am running it with the harbour MS version downloaded from the FT site. I've been trying to compile & link my application without success.Today I decided to try just compiling and linking the TUTOR01 sample application provided with my FWH. I get some very similar errors.I figure at this point, I should get the sample programs to work before I work more on my application.By the way, if I use the Borland 55 compiler with the FT Harbour Borland version, TUTOR01 compiles and runs fine.I'd like to get the vc98 to work.Thanks Antonio, Paul[b:3767g7lf]Here is the output from the vc98 attempt on TUTOR01:[/b:3767g7lf]ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³ FiveWin for Harbour 2.8 (MSVC++) November 2008 Harbour development power ³Ü³ (c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME and XP ³ÛÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßCompiling...tutor01.cgtgui.lib(gtgui.obj) : warning LNK4006: _HB_FUN_HB_GT_GUI_DEFAULT already defined in FiveHM.lib(ERRSYSW.obj); second definition ignoredLINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:libraryFiveHM.lib(HELP32.obj) : error LNK2001: unresolved external symbol _HB_FUN_CHMHELPPOPUPFiveHM.lib(HELP32.obj) : error LNK2001: unresolved external symbol _HB_FUN_CHMHELPINDEXFiveHM.lib(HELP32.obj) : error LNK2001: unresolved external symbol _HB_FUN_CHMHELPTOPICFiveHCM.lib(BRUSHES.obj) : error LNK2001: unresolved external symbol __imp__AlphaBlend@44tutor01.exe : fatal error LNK1120: 4 unresolved externals* There are errors[b:3767g7lf]This is a copy of the BUILDH.BAT I'm using:[/b:3767g7lf]@ECHO OFFCLSECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ECHO ³ FiveWin for Harbour 2.8 (MSVC++) November 2008 Harbour development power ³ÜECHO ³ (c) FiveTech, 1993-2008 for Microsoft Windows 95/98/NT/2000/ME and XP ³ÛECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßif A%1 == A GOTO :SINTAXif NOT EXIST %1.prg GOTO :NOEXISTECHO Compiling...set hdir=c:\harbourmset vcdir=c:\vc98set include=%vcdir%\include;%hdir%\include;%include%set lib=%vcdir%\lib;%hdir%\lib;%lib%%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log@type clip.logIF ERRORLEVEL 1 PAUSEIF ERRORLEVEL 1 GOTO EXIT%vcdir%\bin\cl -TP -W3 -c /GA %1.c:ENDCOMPILEIF EXIST %1.rc %vcdir%\bin\rc -r -d__FLAT__ %1echo %1.obj > msvc.tmpecho ..\lib\FiveHM.lib ..\lib\FiveHCM.lib >> msvc.tmpecho %hdir%\lib\hbrtl.lib >> msvc.tmpecho %hdir%\lib\hbvm.lib >> msvc.tmpecho %hdir%\lib\gtgui.lib >> msvc.tmpecho %hdir%\lib\hblang.lib >> msvc.tmpecho %hdir%\lib\hbmacro.lib >> msvc.tmpecho %hdir%\lib\hbrdd.lib >> msvc.tmpecho %hdir%\lib\rddntx.lib >> msvc.tmpecho %hdir%\lib\rddcdx.lib >> msvc.tmpecho %hdir%\lib\rddfpt.lib >> msvc.tmpecho %hdir%\lib\hbsix.lib >> msvc.tmpecho %hdir%\lib\hbdebug.lib >> msvc.tmpecho %hdir%\lib\hbcommon.lib >> msvc.tmpecho %hdir%\lib\hbpp.lib >> msvc.tmpecho %hdir%\lib\hbcpage.lib >> msvc.tmpecho %hdir%\lib\hbw32.lib >> msvc.tmprem Uncomment these two lines to use Advantage RDDrem echo %hdir%\lib\rddads.lib >> msvc.tmprem echo %hdir%\lib\ace32.lib >> msvc.tmpecho %vcdir%\lib\kernel32.lib >> msvc.tmpecho %vcdir%\lib\user32.lib >> msvc.tmpecho %vcdir%\lib\gdi32.lib >> msvc.tmpecho %vcdir%\lib\winspool.lib >> msvc.tmpecho %vcdir%\lib\comctl32.lib >> msvc.tmpecho %vcdir%\lib\comdlg32.lib >> msvc.tmpecho %vcdir%\lib\advapi32.lib >> msvc.tmpecho %vcdir%\lib\shell32.lib >> msvc.tmpecho %vcdir%\lib\ole32.lib >> msvc.tmprem echo %vcdir%\lib\oleaut32.lib >> msvc.tmpecho %vcdir%\lib\uuid.lib >> msvc.tmpecho %vcdir%\lib\odbc32.lib >> msvc.tmpecho %vcdir%\lib\odbccp32.lib >> msvc.tmpecho %vcdir%\lib\iphlpapi.lib >> msvc.tmpecho %vcdir%\lib\mpr.lib >> msvc.tmpecho %vcdir%\lib\version.lib >> msvc.tmpecho %vcdir%\lib\wsock32.lib >> msvc.tmpIF EXIST %1.res echo %1.res >> msvc.tmp%vcdir%\bin\link @msvc.tmp /nologo /subsystem:windows /force:multipleIF ERRORLEVEL 1 GOTO LINKERRORECHO * Application successfully built%1GOTO EXITECHOrem delete temporary files@del %1.c@del msvc.tmp:LINKERRORECHO * There are errorsGOTO EXIT:SINTAXECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRGECHO {-- Don't specify .PRG extensionGOTO EXIT:NOEXISTECHO The specified PRG %1 does not exist:EXIT[/code] |
Compiling FWH Tutor01-08 with VC98 Errors in link | Paul,Please use this buildhm.bat:[code:3421hpg9]
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour 8.09 (MSVC++) Sep. 2008 Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2008 for Microsoft Windows 9X/NT/200X/ME/XP/Vista ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
if %HBDIR% == "" set HBDIR="c:\harbour"
ECHO Compiling...
set hdir=%HBDIR%
set hdirl=%hdir%\lib
set vcdir=c:\vc98
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\lib;%lib%
%hdir%\bin\vc\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > comp.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
%vcdir%\bin\cl -TP -W3 -c /GA %1.c
:ENDCOMPILE
IF EXIST %1.rc %vcdir%\bin\rc -r -d__FLAT__ %1
echo %1.obj > msvc.tmp
echo c:\fwh\lib\FiveHM.lib c:\fwh\lib\FiveHCM.lib >> msvc.tmp
echo %hdirl%\hbrtl.lib >> msvc.tmp
echo %hdirl%\hbvm.lib >> msvc.tmp
echo %hdirl%\gtgui.lib >> msvc.tmp
echo %hdirl%\hblang.lib >> msvc.tmp
echo %hdirl%\hbmacro.lib >> msvc.tmp
echo %hdirl%\hbrdd.lib >> msvc.tmp
echo %hdirl%\rddntx.lib >> msvc.tmp
echo %hdirl%\rddcdx.lib >> msvc.tmp
echo %hdirl%\rddfpt.lib >> msvc.tmp
echo %hdirl%\hbsix.lib >> msvc.tmp
echo %hdirl%\hbdebug.lib >> msvc.tmp
echo %hdirl%\hbcommon.lib >> msvc.tmp
echo %hdirl%\hbpp.lib >> msvc.tmp
echo %hdirl%\hbcpage.lib >> msvc.tmp
echo %hdirl%\hbw32.lib >> msvc.tmp
rem Uncomment these two lines to use Advantage RDD
rem echo %hdirl%\rddads.lib >> msvc.tmp
rem echo %hdirl%\ace32.lib >> msvc.tmp
echo %vcdir%\lib\kernel32.lib >> msvc.tmp
echo %vcdir%\lib\user32.lib >> msvc.tmp
echo %vcdir%\lib\gdi32.lib >> msvc.tmp
echo %vcdir%\lib\winspool.lib >> msvc.tmp
echo %vcdir%\lib\comctl32.lib >> msvc.tmp
echo %vcdir%\lib\comdlg32.lib >> msvc.tmp
echo %vcdir%\lib\advapi32.lib >> msvc.tmp
echo %vcdir%\lib\shell32.lib >> msvc.tmp
echo %vcdir%\lib\ole32.lib >> msvc.tmp
echo %vcdir%\lib\oleaut32.lib >> msvc.tmp
echo %vcdir%\lib\uuid.lib >> msvc.tmp
echo %vcdir%\lib\odbc32.lib >> msvc.tmp
echo %vcdir%\lib\odbccp32.lib >> msvc.tmp
echo %vcdir%\lib\iphlpapi.lib >> msvc.tmp
echo %vcdir%\lib\mpr.lib >> msvc.tmp
echo %vcdir%\lib\version.lib >> msvc.tmp
echo %vcdir%\lib\wsock32.lib >> msvc.tmp
echo %vcdir%\lib\msimg32.lib >> msvc.tmp
IF EXIST %1.res echo %1.res >> msvc.tmp
%vcdir%\bin\link @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:libcmt
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
@del msvc.tmp
:COMPILEERROR
@type comp.log
ECHO * Compiling errors *
GOTO EXIT
:LINKERROR
ECHO * Linking errors *
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
[/code:3421hpg9] |
Compiling FWH Tutor01-08 with VC98 Errors in link | Antonio,I had to change the BuildHM.bat to get it to work. Just the initial command to set HBDIR variable.Revised BuildHM.bat:[code:317wue49]@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour 8.09 (MSVC++) Sep. 2008 Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2008 for Microsoft Windows 9X/NT/200X/ME/XP/Vista ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
set HBDIR="c:\harbourm"
ECHO Compiling...
set hdir=c:\harbourm
set hdirl=%hdir%\lib
set vcdir=c:\vc98
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\lib;%lib%
%hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > comp.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
%vcdir%\bin\cl -TP -W3 -c /GA %1.c
:ENDCOMPILE
IF EXIST %1.rc %vcdir%\bin\rc -r -d__FLAT__ %1
echo %1.obj > msvc.tmp
echo c:\fwh\lib\FiveHM.lib c:\fwh\lib\FiveHCM.lib >> msvc.tmp
echo %hdirl%\hbrtl.lib >> msvc.tmp
echo %hdirl%\hbvm.lib >> msvc.tmp
echo %hdirl%\gtgui.lib >> msvc.tmp
echo %hdirl%\hblang.lib >> msvc.tmp
echo %hdirl%\hbmacro.lib >> msvc.tmp
echo %hdirl%\hbrdd.lib >> msvc.tmp
echo %hdirl%\rddntx.lib >> msvc.tmp
echo %hdirl%\rddcdx.lib >> msvc.tmp
echo %hdirl%\rddfpt.lib >> msvc.tmp
echo %hdirl%\hbsix.lib >> msvc.tmp
echo %hdirl%\hbdebug.lib >> msvc.tmp
echo %hdirl%\hbcommon.lib >> msvc.tmp
echo %hdirl%\hbpp.lib >> msvc.tmp
echo %hdirl%\hbcpage.lib >> msvc.tmp
echo %hdirl%\hbw32.lib >> msvc.tmp
rem Uncomment these two lines to use Advantage RDD
rem echo %hdirl%\rddads.lib >> msvc.tmp
rem echo %hdirl%\ace32.lib >> msvc.tmp
echo %vcdir%\lib\kernel32.lib >> msvc.tmp
echo %vcdir%\lib\user32.lib >> msvc.tmp
echo %vcdir%\lib\gdi32.lib >> msvc.tmp
echo %vcdir%\lib\winspool.lib >> msvc.tmp
echo %vcdir%\lib\comctl32.lib >> msvc.tmp
echo %vcdir%\lib\comdlg32.lib >> msvc.tmp
echo %vcdir%\lib\advapi32.lib >> msvc.tmp
echo %vcdir%\lib\shell32.lib >> msvc.tmp
echo %vcdir%\lib\ole32.lib >> msvc.tmp
echo %vcdir%\lib\oleaut32.lib >> msvc.tmp
echo %vcdir%\lib\uuid.lib >> msvc.tmp
echo %vcdir%\lib\odbc32.lib >> msvc.tmp
echo %vcdir%\lib\odbccp32.lib >> msvc.tmp
echo %vcdir%\lib\iphlpapi.lib >> msvc.tmp
echo %vcdir%\lib\mpr.lib >> msvc.tmp
echo %vcdir%\lib\version.lib >> msvc.tmp
echo %vcdir%\lib\wsock32.lib >> msvc.tmp
echo %vcdir%\lib\msimg32.lib >> msvc.tmp
IF EXIST %1.res echo %1.res >> msvc.tmp
%vcdir%\bin\link @msvc.tmp /nologo /subsystem:windows /force:multiple /NODEFAULTLIB:libcmt
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
@del msvc.tmp
:COMPILEERROR
@type comp.log
ECHO * Compiling errors *
GOTO EXIT
:LINKERROR
ECHO * Linking errors *
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
[/code:317wue49]Results of execution:[quote:317wue49]ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin for Harbour 8.09 (MSVC++) Sep. 2008 Harbour development power ³Ü
³ (c) FiveTech, 1993-2008 for Microsoft Windows 9X/NT/200X/ME/XP/Vista ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
tutor01.c
gtgui.lib(gtgui.obj) : warning LNK4006: _HB_FUN_HB_GT_GUI_DEFAULT already defined in FiveHM.lib(ERRSYSW.obj); second definition ignored
FiveHM.lib(HELP32.obj) : error LNK2001: unresolved external symbol _HB_FUN_CHMHELPPOPUP
FiveHM.lib(HELP32.obj) : error LNK2001: unresolved external symbol _HB_FUN_CHMHELPINDEX
FiveHM.lib(HELP32.obj) : error LNK2001: unresolved external symbol _HB_FUN_CHMHELPTOPIC
tutor01.exe : fatal error LNK1120: 3 unresolved externals
* Linking errors *
[/quote:317wue49] |
Compiling FWH Tutor01-08 with VC98 Errors in link | Paul,>FiveHM.lib(HELP32.obj) : error LNK2001: unresolved external symbol _HB_FUN_CHMHELPPOPUP FiveHM.lib(HELP32.obj) : error LNK2001: unresolved external symbol _HB_FUN_CHMHELPINDEX FiveHM.lib(HELP32.obj) : error LNK2001: unresolved external symbol _HB_FUN_CHMHELPTOPIC>We are going to review why those external symbols are missing.In the meantime, please add these functions to your main PRG:function ChmHelpPopup() ; return nilfunction ChmHelpIndex() ; return nilfunction ChmHelpTopic() ; return nil |
Compiling Harbour | After I compile Harbour using win-make, I notice a lot of dlls in harbour\bin. How to compile Harbour so they won't be created? |
Compiling Harbour | Hua,
I really dont know it. You should post your question here:
[url:cihesut9]https://groups.google.com/forum/#!forum/harbour-devel[/url:cihesut9] |
Compiling Harbour | It's ok Antonio.
It's just annoying that last time I can copy and run hbrun.exe anywhere but if I use the version I compiled myself I got the message below
[img:9tvceoj0]http://s24.postimg.org/uxxx41z0l/hbrun.jpg[/img:9tvceoj0] |
Compiling Harbour from source code | Dear friends, I'm trying to compile Harbour from source code. All is working but some of the include files and libraries are missing (as an example, hbarc4.h). Do you know what could be the cause? |
Compiling Harbour from source code | Dear Enrico,
hbarc4.h is at c:\harbour\include\ so it seems as your include path it is not pointing to harbour/include |
Compiling Harbour from source code | Dear Antonio,
I'm compiling Harbour from source code. So win-make should take care of copying all the Harbour's include directory to the HB_INSTALL_PREFIX directory. It does except some files. Anyway, Harbour is working fine at the end. I only wonder why some files are missing. |
Compiling Harbour from source code | Dear Enrico,
oHrb = hb_compileFromBuf( cCode, .T., "-n", "-q2", "-I c:\harbour\include" ) |
Compiling Harbour from source code | I don't understand. |
Compiling Harbour from source code | Dear Enrico,
> I'm trying to compile Harbour from source code
How are you doing it ?
Usually to compile Harbour code at runtime we use hb_compileFromBuf() |
Compiling Harbour from source code | I'm using this batch:
[code=fw:3s8ef8ls]<div class="fw" id="{CB}" style="font-family: monospace;">@ ECHO OFF<br /><br />SET MSC=e:\msc32\msc<br /><br />SET PATH=%MSC%\bin<br />SET HB_INSTALL_PREFIX=e:\fw\temp\harbour\harbour<br /><br />SET INCLUDE=%MSC%\include\ucrt;%MSC%\include;%MSC%\include\sdk<br />SET LIB=%MSC%\lib;%MSC%\lib\sdk<br /><br />SET HB_USER_CFLAGS=-MD -O1<br /><br />win-make clean install<br /><br /><span style="color: #00C800;">PAUSE</span></div>[/code:3s8ef8ls] |
Compiling Harbour from source code | Dear Enrico,
The Harbour compiler itself is inside hbcplr.lib, you don't need to call harbour.exe <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
you can directly compile and execute from your EXE !!! |
Compiling Harbour from source code | Dear Antonio,
you are missing the point. I wanted Harbour from the latest source code in the git repository. Anyway, never mind. I'm happy with the result. |
Compiling Harbour from source code | ok, very good <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Compiling TSButton with MinGW gcc | I need to compile TSButton version 7 with Harbour 3.1 ( not "X" ) and MinGW gcc 4.5.2-dw2 and I need some help on some errors in C.
To generate the .lib, based on the SBUTTONH.VRC I built this TSButton7.hbp :
[code=nada:3m64z7o1]<div id="{CB}" style="font-family: monospace;">-incpath=..\..\..\INCLUDE<br />-incpath=F:\FWH\INCLUDE<br />-incpath=g:\hb31\include<br />-m<br />-n<br />-w<br />-q0<br />-es2<br />-gc1<br />-p<br />-hblib<br /><br />..\..\FUNCTION\TSBUTT~1\BPAINT.C </div>[/code:3m64z7o1]
And when I do the [b:3m64z7o1]hbmk2 TSButton7.hbp[/b:3m64z7o1] I got this errors:
[quote:3m64z7o1]In file included from F:/FWH/TSButton/source/FUNCTION/TSBUTT~1/BPAINT.C:7:0:
F:/FWH/INCLUDE/ClipApi.h:69:28: error: conflicting declaration 'typedef unsigned int WORD'
c:\hb31\comp\mingw\bin\../lib/gcc/mingw32/4.5.2-dw2/../../../../include/windef.h:241:24: error: 'WORD' has a previous declaration as 'typedef short unsigned int WORD'
F:/FWH/INCLUDE/ClipApi.h:80:21: error: expected identifier before numeric constant
F:/FWH/INCLUDE/ClipApi.h:80:21: error: expected '}' before numeric constant
F:/FWH/INCLUDE/ClipApi.h:80:21: error: expected unqualified-id before numeric constant
F:/FWH/INCLUDE/ClipApi.h:80:33: error: expected declaration before '}' token
hbmk2: Erro: Executando compilador C/C++. 1
g++.exe -c -O3 -march=i586 -mtune=pentiumpro -fomit-frame-pointer -W -Wall -pipe -IC:/hb31/include -IF:/FWH/TSButton/INCLUDE -I
F:/FWH/INCLUDE -Ig:/hb31/include F:/FWH/TSButton/source/FUNCTION/TSBUTT~1/BPAINT.C[/quote:3m64z7o1]
The [b:3m64z7o1]ClipApi.h[/b:3m64z7o1] is added in the begginning of the .C :
[code=fw:3m64z7o1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/* TSButton Class, paint routines<br /> Author: Manuel Mercado<br /> Last update: Sept 11th, 2009 */</span><br /><br /><span style="color: #00D7D7;">#include</span> <WinTen.h> <span style="color: #B900B9;">/* set your own path if needed */</span><br /><span style="color: #00D7D7;">#include</span> <Windows.h><br /><span style="color: #00D7D7;">#include</span> <ClipApi.h> <span style="color: #B900B9;">/* set your own path if needed */</span><br /><span style="color: #00D7D7;">#include</span> <StdLib.h><br /><span style="color: #00D7D7;">#define</span> NOTSRCAND 0x220326<br />.<br />.<br />.<br />.</div>[/code:3m64z7o1]
Could anyone help me with this ?
P.S. TSButton 7 can be downloaded from [url:3m64z7o1]http://fivewin-contributions.googlecode.com/files/TSButton7.rar[/url:3m64z7o1] |
Compiling TSButton with MinGW gcc | Antonio, could you review this, please ?
I am not very good with C.
Thanks. |
Compiling TSButton with MinGW gcc | I'm joining to this question too . I too get an errors trying to build TsButtons lib with harbour + minGw . Can any to help ? Just idea - maybe Manuel Mercado have a forum , where we can post question to him ?
With best regards ! |
Compiling TSButton with MinGW gcc | Change clipapi.ch by hbapi.ch and try againg.
Regards |
Compiling TSButton with MinGW gcc | use this example change paths for your include paths
c:\mingw\bin\gcc -c -D__FLAT__ -D__HARBOUR__ -Ic:\mingw\include -Ic:\harbourg\include -Ic:\fwhg\include -obpaint.o bpaint.c
Rgds |
Compiling TSButton with MinGW gcc | Hi Nicanor, thanks for your help.
I discarded TSButton as an option and replaced it with standard buttons, since I got no help with this...
But I still need help with TSBrowse !
You said to change clipapi.ch by hbapi.ch but in this case, the code is was already with hbapi.ch.
And when compiled, I get the following errors:
[code=fw:3a235eaw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />hbmk2: <span style="color: #000000;">Compiling</span> C++...<br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void HB_FUN_REGISTER_CLASS()'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">76</span>:<span style="color: #000000;">22</span>: <span style="color: #000000;">error</span>: <span style="color: #ff0000;">'ISNIL'</span> was not declared in this scope<br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void HB_FUN__CREATEWINDOWEX()'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">97</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">error</span>: <span style="color: #ff0000;">'ISNIL'</span> was not declared in this scope<br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void MaskRegion(HDC__*, RECT*, COLORREF, COLORREF)'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">133</span>:<span style="color: #000000;">49</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HBITMAP__*'</span><br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">134</span>:<span style="color: #000000;">46</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HBITMAP__*'</span><br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">135</span>:<span style="color: #000000;">49</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HBITMAP__*'</span><br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">136</span>:<span style="color: #000000;">55</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HBITMAP__*'</span><br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">138</span>:<span style="color: #000000;">42</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HBRUSH__*'</span><br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void DrawMasked(HDC__*, HBITMAP__*, WORD, WORD)'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">192</span>:<span style="color: #000000;">70</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HBITMAP__*'</span><br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">201</span>:<span style="color: #000000;">50</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HBITMAP__*'</span><br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void HB_FUN_TSDRAWCELL()'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">255</span>:<span style="color: #000000;">32</span>: <span style="color: #000000;">error</span>: <span style="color: #ff0000;">'ISNIL'</span> was not declared in this scope<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">297</span>:<span style="color: #000000;">43</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HFONT__*'</span><br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void WndBoxDraw(HDC__*, RECT*, HPEN__*, HPEN__*, int, BOOL)'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">565</span>:<span style="color: #000000;">48</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HPEN__*'</span><br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void HB_FUN_TSBRWSCROLL()'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">637</span>:<span style="color: #000000;">43</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HFONT__*'</span><br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void HB_FUN_SBGETHEIGHT()'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">735</span>:<span style="color: #000000;">46</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HFONT__*'</span><br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void DrawCheck(HDC__*, tagRECT*, HPEN__*, int, BOOL)'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">813</span>:<span style="color: #000000;">46</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HBRUSH__*'</span><br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">832</span>:<span style="color: #000000;">43</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HPEN__*'</span><br />../../TSBrowse/TSBFUNCS.C: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> <span style="color: #ff0000;">'void DegradColor(HDC__*, RECT*, COLORREF, COLORREF)'</span>:<br />../../TSBrowse/TSBFUNCS.C:<span style="color: #000000;">941</span>:<span style="color: #000000;">42</span>: <span style="color: #000000;">error</span>: <span style="color: #000000;">invalid</span> conversion <span style="color: #0000ff;">from</span> <span style="color: #ff0000;">'void*'</span> <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'HBRUSH__*'</span><br />hbmk2: <span style="color: #000000;">Erro</span>: <span style="color: #000000;">Executando</span> compilador C/C++. <span style="color: #000000;">1</span><br /> </div>[/code:3a235eaw]
Is it possible to send us a light in this ?
And I think it may also help with TSButton question.
The full [b:3a235eaw]TSBFUNCS.C[/b:3a235eaw] is:
[code=fw:3a235eaw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/***************************************************************<br />This file contains the special painting routines used by TSBrowse Class<br />Last update: 22/02/2006<br />***************************************************************/</span><br /><span style="color: #00D7D7;">#define</span> _WIN32_IE 0x0500<br /><span style="color: #00D7D7;">#define</span> HB_OS_WIN_USED<br /><span style="color: #00D7D7;">#define</span> _WIN32_WINNT 0x0400<br /><span style="color: #00D7D7;">#include</span> <shlobj.h><br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <commctrl.h><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbvm.h"</span><br /><br />#ifdef __XHARBOUR__<br /><span style="color: #00D7D7;">#define</span> HB_STORNI<span style="color: #000000;">(</span> n, x, y <span style="color: #000000;">)</span> hb_storni<span style="color: #000000;">(</span> n, x, y <span style="color: #000000;">)</span><br />#else<br /><span style="color: #00D7D7;">#define</span> HB_STORNI<span style="color: #000000;">(</span> n, x, y <span style="color: #000000;">)</span> hb_storvni<span style="color: #000000;">(</span> n, x, y <span style="color: #000000;">)</span><br />#endif<br /><br />void WndBoxDraw<span style="color: #000000;">(</span> HDC, LPRECT, HPEN, HPEN, int, BOOL <span style="color: #000000;">)</span>;<br />void cDrawCursor<span style="color: #000000;">(</span> HWND, LPRECT, long, COLORREF <span style="color: #000000;">)</span>;<br />void DrawCheck<span style="color: #000000;">(</span> HDC, LPRECT, HPEN, int, BOOL <span style="color: #000000;">)</span>;<br /><span style="color: #00C800;">static</span> void GoToPoint<span style="color: #000000;">(</span> HDC, int, int <span style="color: #000000;">)</span>;<br /><span style="color: #00C800;">static</span> void DegradColor<span style="color: #000000;">(</span> HDC, RECT *, COLORREF, COLORREF <span style="color: #000000;">)</span>;<br /><br />LRESULT CALLBACK WndProcBrw<span style="color: #000000;">(</span> HWND hWnd, UINT <span style="color: #0000ff;">message</span>, WPARAM wParam, LPARAM lParam <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> <span style="color: #00C800;">static</span> PHB_SYMB pSymbol = <span style="color: #00C800;">NULL</span>;<br /> long int r;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !pSymbol <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> pSymbol = hb_dynsymSymbol<span style="color: #000000;">(</span> hb_dynsymGet<span style="color: #000000;">(</span><span style="color: #ff0000;">"EVENTS"</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pSymbol <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> hb_vmPushSymbol<span style="color: #000000;">(</span> pSymbol <span style="color: #000000;">)</span>;<br /> hb_vmPushNil<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>LONG<span style="color: #000000;">)</span> hWnd <span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> <span style="color: #0000ff;">message</span> <span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> wParam <span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> lParam <span style="color: #000000;">)</span>;<br /> hb_vmDo<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> r = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> r != <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">return</span> r;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">return</span><span style="color: #000000;">(</span> DefWindowProc<span style="color: #000000;">(</span>hWnd, <span style="color: #0000ff;">message</span>, wParam, lParam<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> REGISTER_CLASS <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> WNDCLASS WndClass;<br /><br /> HBRUSH hbrush; <span style="color: #B900B9;">//= (HBRUSH)( COLOR_BTNFACE + 1 ) ;</span><br /><br /> <span style="color: #B900B9;">// WndClass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS ;</span><br /><br /> WndClass.<span style="color: #0000ff;">style</span> = CS_DBLCLKS;<br /> WndClass.lpfnWndProc = WndProcBrw;<br /> WndClass.cbClsExtra = <span style="color: #000000;">0</span>;<br /> WndClass.cbWndExtra = <span style="color: #000000;">0</span>;<br /> WndClass.hInstance = GetModuleHandle<span style="color: #000000;">(</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;<br /> WndClass.hIcon = <span style="color: #000000;">0</span>;<br /> WndClass.hCursor = LoadCursor<span style="color: #000000;">(</span> <span style="color: #00C800;">NULL</span>, IDC_ARROW <span style="color: #000000;">)</span>;<br /> hbrush = <span style="color: #000000;">(</span> ISNIL<span style="color: #000000;">(</span><span style="color: #000000;">2</span><span style="color: #000000;">)</span> ? <span style="color: #000000;">0</span> : <span style="color: #000000;"><span style="color: #000000;">(</span>HBRUSH</span><span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span><span style="color: #000000;">2</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> WndClass.hbrBackground = hbrush;<br /> WndClass.lpszMenuName = <span style="color: #00C800;">NULL</span>;<br /> WndClass.lpszClassName = hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !RegisterClass<span style="color: #000000;">(</span>&WndClass<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"Window Registration Failed!"</span>, <span style="color: #ff0000;">"Error!"</span>, MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL <span style="color: #000000;">)</span>;<br /> ExitProcess<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>LONG<span style="color: #000000;">)</span> hbrush <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> _CREATEWINDOWEX <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HWND hWnd;<br /> DWORD dwExStyle = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> LPCSTR cClass = <span style="color: #000000;">(</span> LPCSTR <span style="color: #000000;">)</span> hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> LPCSTR cTitle = <span style="color: #000000;">(</span> LPCSTR <span style="color: #000000;">)</span> hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /> int nStyle = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> int x = <span style="color: #000000;">(</span> ISNIL<span style="color: #000000;">(</span><span style="color: #000000;">5</span><span style="color: #000000;">)</span> ? CW_USEDEFAULT : <span style="color: #000000;">hb_parni</span><span style="color: #000000;">(</span><span style="color: #000000;">5</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> int y = <span style="color: #000000;">(</span> ISNIL<span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span> ? CW_USEDEFAULT : <span style="color: #000000;">hb_parni</span><span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> int nWidth = <span style="color: #000000;">(</span> ISNIL<span style="color: #000000;">(</span><span style="color: #000000;">7</span><span style="color: #000000;">)</span> ? CW_USEDEFAULT : <span style="color: #000000;">hb_parni</span><span style="color: #000000;">(</span><span style="color: #000000;">7</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> int nHeight = <span style="color: #000000;">(</span> ISNIL<span style="color: #000000;">(</span><span style="color: #000000;">8</span><span style="color: #000000;">)</span> ? CW_USEDEFAULT : <span style="color: #000000;">hb_parni</span><span style="color: #000000;">(</span><span style="color: #000000;">8</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> HWND hWndParent = <span style="color: #000000;">(</span> HWND <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">9</span> <span style="color: #000000;">)</span>;<br /> HMENU hMenu = <span style="color: #000000;">(</span> HMENU <span style="color: #000000;">)</span> <span style="color: #00C800;">NULL</span>;<br /> HANDLE hInstance = GetModuleHandle<span style="color: #000000;">(</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;<br /><br /> hWnd = CreateWindowEx<span style="color: #000000;">(</span> dwExStyle, cClass, cTitle, nStyle, x, y, nWidth, nHeight, hWndParent, hMenu, <span style="color: #000000;">(</span>HINSTANCE<span style="color: #000000;">)</span> hInstance, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;<br /><br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>LONG<span style="color: #000000;">)</span> hWnd <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />void MaskRegion<span style="color: #000000;">(</span> HDC hdc, RECT *rct, COLORREF cTransparentColor, COLORREF cBackgroundColor <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HDC hdcTemp, hdcObject, hdcBack, hdcMem;<br /> POINT ptSize;<br /> COLORREF cColor;<br /> HBITMAP bmAndObject, bmAndBack, bmBackOld, bmObjectOld, bmAndTemp, bmTempOld, bmAndMem, bmMemOld;<br /> HBRUSH hBrush, hBrOld;<br /><br /> ptSize.x = rct->right - rct->left + <span style="color: #000000;">1</span>;<br /> ptSize.y = rct->bottom - rct->top + <span style="color: #000000;">1</span>;<br /><br /> hBrush = CreateSolidBrush<span style="color: #000000;">(</span> cBackgroundColor <span style="color: #000000;">)</span>;<br /><br /> hdcTemp = CreateCompatibleDC<span style="color: #000000;">(</span> hdc <span style="color: #000000;">)</span>;<br /> hdcObject = CreateCompatibleDC<span style="color: #000000;">(</span> hdc <span style="color: #000000;">)</span>;<br /> hdcBack = CreateCompatibleDC<span style="color: #000000;">(</span> hdc <span style="color: #000000;">)</span>;<br /> hdcMem = CreateCompatibleDC<span style="color: #000000;">(</span> hdc <span style="color: #000000;">)</span>;<br /><br /> bmAndTemp = CreateCompatibleBitmap<span style="color: #000000;">(</span> hdc, ptSize.x, ptSize.y <span style="color: #000000;">)</span>;<br /> bmAndMem = CreateCompatibleBitmap<span style="color: #000000;">(</span> hdc, ptSize.x, ptSize.y <span style="color: #000000;">)</span>;<br /> bmAndObject = CreateBitmap<span style="color: #000000;">(</span> ptSize.x, ptSize.y, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;<br /> bmAndBack = CreateBitmap<span style="color: #000000;">(</span> ptSize.x, ptSize.y, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span>;<br /><br /> bmTempOld = SelectObject<span style="color: #000000;">(</span> hdcTemp, bmAndTemp <span style="color: #000000;">)</span>;<br /> bmMemOld = SelectObject<span style="color: #000000;">(</span> hdcMem, bmAndMem <span style="color: #000000;">)</span>;<br /> bmBackOld = SelectObject<span style="color: #000000;">(</span> hdcBack, bmAndBack <span style="color: #000000;">)</span>;<br /> bmObjectOld = SelectObject<span style="color: #000000;">(</span> hdcObject, bmAndObject <span style="color: #000000;">)</span>;<br /><br /> hBrOld = SelectObject<span style="color: #000000;">(</span> hdcMem, hBrush <span style="color: #000000;">)</span>;<br /><br /> BitBlt<span style="color: #000000;">(</span> hdcTemp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ptSize.x, ptSize.y, hdc, rct->left, rct->top, SRCCOPY <span style="color: #000000;">)</span>;<br /><br /> SetMapMode<span style="color: #000000;">(</span> hdcTemp, GetMapMode<span style="color: #000000;">(</span>hdc<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> cColor = SetBkColor<span style="color: #000000;">(</span> hdcTemp, cTransparentColor <span style="color: #000000;">)</span>;<br /><br /> BitBlt<span style="color: #000000;">(</span> hdcObject, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ptSize.x, ptSize.y, hdcTemp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, SRCCOPY <span style="color: #000000;">)</span>;<br /><br /> SetBkColor<span style="color: #000000;">(</span> hdcTemp, cColor <span style="color: #000000;">)</span>;<br /><br /> BitBlt<span style="color: #000000;">(</span> hdcBack, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ptSize.x, ptSize.y, hdcObject, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, NOTSRCCOPY <span style="color: #000000;">)</span>;<br /> PatBlt<span style="color: #000000;">(</span> hdcMem, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ptSize.x, ptSize.y, PATCOPY <span style="color: #000000;">)</span>;<br /> BitBlt<span style="color: #000000;">(</span> hdcMem, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ptSize.x, ptSize.y, hdcObject, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, SRCAND <span style="color: #000000;">)</span>;<br /> BitBlt<span style="color: #000000;">(</span> hdcTemp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ptSize.x, ptSize.y, hdcBack, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, SRCAND <span style="color: #000000;">)</span>;<br /> BitBlt<span style="color: #000000;">(</span> hdcMem, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ptSize.x, ptSize.y, hdcTemp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, SRCPAINT <span style="color: #000000;">)</span>;<br /> BitBlt<span style="color: #000000;">(</span> hdc, rct->left, rct->top, ptSize.x, ptSize.y, hdcMem, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, SRCCOPY <span style="color: #000000;">)</span>;<br /><br /> DeleteObject<span style="color: #000000;">(</span> SelectObject<span style="color: #000000;">(</span>hdcMem, hBrOld<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> SelectObject<span style="color: #000000;">(</span>hdcTemp, bmTempOld<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> SelectObject<span style="color: #000000;">(</span>hdcMem, bmMemOld<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> SelectObject<span style="color: #000000;">(</span>hdcBack, bmBackOld<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> SelectObject<span style="color: #000000;">(</span>hdcObject, bmObjectOld<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> DeleteDC<span style="color: #000000;">(</span> hdcMem <span style="color: #000000;">)</span>;<br /> DeleteDC<span style="color: #000000;">(</span> hdcBack <span style="color: #000000;">)</span>;<br /> DeleteDC<span style="color: #000000;">(</span> hdcObject <span style="color: #000000;">)</span>;<br /> DeleteDC<span style="color: #000000;">(</span> hdcTemp <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />void DrawBitmap<span style="color: #000000;">(</span> HDC hDC, HBITMAP hBitmap, WORD wRow, WORD wCol, WORD wWidth, WORD wHeight, DWORD dwRaster <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HDC hDCmem = CreateCompatibleDC<span style="color: #000000;">(</span> hDC <span style="color: #000000;">)</span>;<br /> BITMAP bitmap;<br /> dwRaster = SRCCOPY;<br /><br /> SelectObject<span style="color: #000000;">(</span> hDCmem, hBitmap <span style="color: #000000;">)</span>;<br /> GetObject<span style="color: #000000;">(</span> hBitmap, sizeof<span style="color: #000000;">(</span>BITMAP<span style="color: #000000;">)</span>, <span style="color: #000000;">(</span>LPVOID<span style="color: #000000;">)</span> & bitmap <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> wWidth && <span style="color: #000000;">(</span>wWidth != bitmap.bmWidth || wHeight != bitmap.bmHeight<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> StretchBlt<span style="color: #000000;">(</span> hDC, wCol, wRow, wWidth, wHeight, hDCmem, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, bitmap.bmWidth, bitmap.bmHeight, dwRaster <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> BitBlt<span style="color: #000000;">(</span> hDC, wCol, wRow, bitmap.bmWidth, bitmap.bmHeight, hDCmem, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, dwRaster <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> DeleteDC<span style="color: #000000;">(</span> hDCmem <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />void DrawMasked<span style="color: #000000;">(</span> HDC hDC, HBITMAP hbm, WORD wRow, WORD wCol <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HDC hDcBmp = CreateCompatibleDC<span style="color: #000000;">(</span> hDC <span style="color: #000000;">)</span>;<br /> HDC hDcMask;<br /> HBITMAP hBmpMask, hOldBmp2, hOldBmp1 = SelectObject<span style="color: #000000;">(</span> hDcBmp, hbm <span style="color: #000000;">)</span>;<br /> BITMAP bm;<br /> COLORREF rgbBack;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> GetPixel<span style="color: #000000;">(</span>hDcBmp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> != GetSysColor<span style="color: #000000;">(</span><span style="color: #000000;">15</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> GetObject<span style="color: #000000;">(</span> hbm, sizeof<span style="color: #000000;">(</span>BITMAP<span style="color: #000000;">)</span>, <span style="color: #000000;">(</span>LPSTR<span style="color: #000000;">)</span> & bm <span style="color: #000000;">)</span>;<br /> hDcMask = CreateCompatibleDC<span style="color: #000000;">(</span> hDC <span style="color: #000000;">)</span>;<br /> hBmpMask = CreateCompatibleBitmap<span style="color: #000000;">(</span> hDcMask, bm.bmWidth, bm.bmHeight <span style="color: #000000;">)</span>;<br /> hOldBmp2 = SelectObject<span style="color: #000000;">(</span> hDcMask, hBmpMask <span style="color: #000000;">)</span>;<br /> rgbBack = SetBkColor<span style="color: #000000;">(</span> hDcBmp, GetPixel<span style="color: #000000;">(</span>hDcBmp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> BitBlt<span style="color: #000000;">(</span> hDcMask, wRow, wCol, bm.bmWidth, bm.bmHeight, hDcBmp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, SRCCOPY <span style="color: #000000;">)</span>;<br /> SetBkColor<span style="color: #000000;">(</span> hDcBmp, rgbBack <span style="color: #000000;">)</span>;<br /><br /> BitBlt<span style="color: #000000;">(</span> hDC, wRow, wCol, bm.bmWidth, bm.bmHeight, hDcBmp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, SRCINVERT <span style="color: #000000;">)</span>;<br /> BitBlt<span style="color: #000000;">(</span> hDC, wRow, wCol, bm.bmWidth, bm.bmHeight, hDcMask, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, SRCAND <span style="color: #000000;">)</span>;<br /> BitBlt<span style="color: #000000;">(</span> hDC, wRow, wCol, bm.bmWidth, bm.bmHeight, hDcBmp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, SRCINVERT <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #B900B9;">//</span><br /><br /> BitBlt<span style="color: #000000;">(</span> hDcBmp, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, bm.bmWidth, bm.bmHeight, hDC, wRow, wCol, SRCCOPY <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #B900B9;">//</span><br /><br /> SelectObject<span style="color: #000000;">(</span> hDcMask, hOldBmp2 <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hBmpMask <span style="color: #000000;">)</span>;<br /> DeleteDC<span style="color: #000000;">(</span> hDcMask <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> SelectObject<span style="color: #000000;">(</span> hDcBmp, hOldBmp1 <span style="color: #000000;">)</span>;<br /> DeleteDC<span style="color: #000000;">(</span> hDcBmp <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> TSDRAWCELL <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HWND hWnd = <span style="color: #000000;">(</span> HWND <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> HDC hDC = <span style="color: #000000;">(</span> HDC <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> int nRow = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /> int nColumn = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> int nWidth = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span>;<br /> LPSTR cData = <span style="color: #000000;">(</span> LPSTR <span style="color: #000000;">)</span> hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">6</span> <span style="color: #000000;">)</span>;<br /> int nLen = hb_parclen<span style="color: #000000;">(</span> <span style="color: #000000;">6</span> <span style="color: #000000;">)</span>;<br /> DWORD nAlign = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">7</span> <span style="color: #000000;">)</span>;<br /> COLORREF clrFore = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">8</span> <span style="color: #000000;">)</span>;<br /> COLORREF clrBack = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">9</span> <span style="color: #000000;">)</span>;<br /> HFONT hFont = <span style="color: #000000;">(</span> HFONT <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span>;<br /> HBITMAP hBitMap = <span style="color: #000000;">(</span> HBITMAP <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">11</span> <span style="color: #000000;">)</span>;<br /> int nHeightCell = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">12</span> <span style="color: #000000;">)</span>;<br /> BOOL b3DLook = hb_parl<span style="color: #000000;">(</span> <span style="color: #000000;">13</span> <span style="color: #000000;">)</span>;<br /> int nLineStyle = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">14</span> <span style="color: #000000;">)</span>;<br /> COLORREF clrLine = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">15</span> <span style="color: #000000;">)</span>;<br /> int nHeadFoot = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">16</span> <span style="color: #000000;">)</span>;<br /> int nHeightHead = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">17</span> <span style="color: #000000;">)</span>;<br /> int nHeightFoot = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">18</span> <span style="color: #000000;">)</span>;<br /> int nHeightSuper = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">19</span> <span style="color: #000000;">)</span>;<br /> int nHeightSpec = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span>;<br /> BOOL bAdjBmp = hb_parl<span style="color: #000000;">(</span> <span style="color: #000000;">21</span> <span style="color: #000000;">)</span>;<br /> BOOL bMultiLine = hb_parl<span style="color: #000000;">(</span> <span style="color: #000000;">22</span> <span style="color: #000000;">)</span>;<br /> int nVAlign = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">23</span> <span style="color: #000000;">)</span>;<br /> int nVertText = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">24</span> <span style="color: #000000;">)</span>;<br /> COLORREF clrTo = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">25</span> <span style="color: #000000;">)</span>;<br /> BOOL bOpaque = hb_parl<span style="color: #000000;">(</span> <span style="color: #000000;">26</span> <span style="color: #000000;">)</span>;<br /> HBRUSH wBrush = <span style="color: #000000;">(</span> HBRUSH <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">27</span> <span style="color: #000000;">)</span>;<br /> BOOL b3DInv = <span style="color: #000000;">(</span> ISNIL<span style="color: #000000;">(</span><span style="color: #000000;">28</span><span style="color: #000000;">)</span> ? <span style="color: #00C800;">FALSE</span> : !hb_parl<span style="color: #000000;">(</span><span style="color: #000000;">28</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> BOOL b3D = <span style="color: #000000;">(</span> ISNIL<span style="color: #000000;">(</span><span style="color: #000000;">28</span><span style="color: #000000;">)</span> ? <span style="color: #00C800;">FALSE</span> : <span style="color: #00C800;">TRUE</span> <span style="color: #000000;">)</span>;<br /> COLORREF nClr3DL = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">29</span> <span style="color: #000000;">)</span>;<br /> COLORREF nClr3DS = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">30</span> <span style="color: #000000;">)</span>;<br /> long lCursor = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">31</span> <span style="color: #000000;">)</span>;<br /><br /> int ixLayOut = HIWORD<span style="color: #000000;">(</span> nAlign <span style="color: #000000;">)</span>;<br /> int iAlign = LOWORD<span style="color: #000000;">(</span> nAlign <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #B900B9;">// int iTxtW = 0; //LOWORD( GetTextExtentPoint( hDC, cData, nLen,0 ) ) ;</span><br /><br /> BOOL bGrid = <span style="color: #000000;">(</span> nLineStyle > <span style="color: #000000;">0</span> ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">)</span>;<br /> BOOL bHeader = <span style="color: #000000;">(</span> nHeadFoot == <span style="color: #000000;">1</span> ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">)</span>;<br /> BOOL bFooter = <span style="color: #000000;">(</span> nHeadFoot == <span style="color: #000000;">2</span> ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">)</span>;<br /> BOOL bSuper = <span style="color: #000000;">(</span> nHeadFoot == <span style="color: #000000;">3</span> ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">)</span>;<br /> BOOL bSpecHd = <span style="color: #000000;">(</span> nHeadFoot == <span style="color: #000000;">4</span> ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">//New SH</span><br /> BOOL bChecked = <span style="color: #000000;">(</span> nVertText == <span style="color: #000000;">3</span> ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">)</span>;<br /> BOOL bBrush = <span style="color: #00C800;">FALSE</span>; <span style="color: #B900B9;">//( wBrush > 0 ? TRUE : FALSE ) ;</span><br /> BOOL bDegrad = <span style="color: #000000;">(</span> clrTo == clrBack ? <span style="color: #00C800;">FALSE</span> : <span style="color: #00C800;">TRUE</span> <span style="color: #000000;">)</span>;<br /> HFONT hOldFont = <span style="color: #000000;">0</span>;<br /> BOOL bDestroyDC = <span style="color: #00C800;">FALSE</span>;<br /> HPEN hGrayPen = CreatePen<span style="color: #000000;">(</span> PS_SOLID, <span style="color: #000000;">1</span>, clrLine <span style="color: #000000;">)</span>;<br /> HPEN hWhitePen = CreatePen<span style="color: #000000;">(</span> PS_SOLID, <span style="color: #000000;">1</span>, GetSysColor<span style="color: #000000;">(</span>COLOR_BTNHIGHLIGHT<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> RECT rct;<br /> BITMAP bm;<br /> int nTop, nLeft, nBkOld, iFlags;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #0000ff;">size</span>;<br /> int iTxtW = <span style="color: #000000;">0</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> GetTextExtentPoint32<span style="color: #000000;">(</span>hDC, cData, nLen, &size<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> iTxtW = <span style="color: #0000ff;">size</span>.cx;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !hDC <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> bDestroyDC = <span style="color: #00C800;">TRUE</span>;<br /> hDC = GetDC<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hFont <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> hOldFont = SelectObject<span style="color: #000000;">(</span> hDC, hFont <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> GetClientRect<span style="color: #000000;">(</span> hWnd, &rct <span style="color: #000000;">)</span>;<br /><br /> SetTextColor<span style="color: #000000;">(</span> hDC, clrFore <span style="color: #000000;">)</span>;<br /> SetBkColor<span style="color: #000000;">(</span> hDC, clrBack <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nRow == <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> bSpecHd <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.top = <span style="color: #000000;">(</span> nHeightHead + nHeightSuper - <span style="color: #000000;">(</span>nHeightSuper ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> rct.top = <span style="color: #000000;">(</span> bHeader ? nHeightSuper - <span style="color: #000000;">(</span>nHeightSuper ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> : <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> rct.top = <span style="color: #000000;">(</span> bFooter ? rct.bottom - nHeightFoot + <span style="color: #000000;">1</span> : <span style="color: #000000;">nHeightHead</span> + nHeightSuper - <span style="color: #000000;">(</span>nHeightSuper ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> + nHeightSpec + <span style="color: #000000;">(</span>nHeightCell * <span style="color: #000000;">(</span>nRow - <span style="color: #000000;">1</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> rct.bottom = rct.top + <span style="color: #000000;">(</span> bHeader ? nHeightHead : <span style="color: #000000;"><span style="color: #000000;">(</span>bSuper</span> ? nHeightSuper : <span style="color: #000000;">nHeightCell</span><span style="color: #000000;">)</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> rct.bottom = <span style="color: #000000;">(</span> bSpecHd ? rct.bottom + nHeightSpec : <span style="color: #000000;">rct</span>.bottom <span style="color: #000000;">)</span> ;<br /><br /> <span style="color: #B900B9;">/* Don't let left side go beyond rct.right of Client Rect. */</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nColumn - <span style="color: #000000;">(</span>rct.<span style="color: #0000ff;">right</span> - rct.<span style="color: #0000ff;">left</span><span style="color: #000000;">)</span> <= <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.<span style="color: #0000ff;">left</span> = nColumn;<br /><br /> <span style="color: #B900B9;">/* if nWidth == -1 or -2, it indicates the last column so go to limit,<br /> Don't let right side go beyond rct.right of Client Rect. */</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nWidth >= <span style="color: #000000;">0</span><span style="color: #000000;">)</span> && <span style="color: #000000;">(</span><span style="color: #000000;">(</span>rct.<span style="color: #0000ff;">left</span> + nWidth - rct.<span style="color: #0000ff;">right</span><span style="color: #000000;">)</span> <= <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span> <span style="color: #B900B9;">// negative values have different meanings</span><br /> rct.<span style="color: #0000ff;">right</span> = rct.<span style="color: #0000ff;">left</span> + nWidth;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !bDegrad <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.bottom += <span style="color: #000000;">(</span> bHeader ? <span style="color: #000000;">0</span> : <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> rct.<span style="color: #0000ff;">right</span> += <span style="color: #000000;">1</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !bBrush <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> ExtTextOut<span style="color: #000000;">(</span> hDC, rct.<span style="color: #0000ff;">left</span>, rct.top, ETO_OPAQUE | ETO_CLIPPED, &rct, <span style="color: #ff0000;">""</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> FillRect<span style="color: #000000;">(</span> hDC, &rct, wBrush <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> rct.bottom -= <span style="color: #000000;">(</span> bHeader ? <span style="color: #000000;">0</span> : <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> rct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">1</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> DegradColor<span style="color: #000000;">(</span> hDC, &rct, clrBack, clrTo <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hBitMap <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !bAdjBmp <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> GetObject<span style="color: #000000;">(</span> hBitMap, sizeof<span style="color: #000000;">(</span>BITMAP<span style="color: #000000;">)</span>, <span style="color: #000000;">(</span>LPSTR<span style="color: #000000;">)</span> & bm <span style="color: #000000;">)</span>;<br /> nTop = rct.top + <span style="color: #000000;">(</span> <span style="color: #000000;">(</span>rct.bottom - rct.top + <span style="color: #000000;">1</span><span style="color: #000000;">)</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> - <span style="color: #000000;">(</span> bm.bmHeight / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">switch</span><span style="color: #000000;">(</span> ixLayOut <span style="color: #000000;">)</span> <span style="color: #B900B9;">// bitmap layout x coordinate</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">0</span>: <span style="color: #B900B9;">// column left</span><br /> nLeft = rct.<span style="color: #0000ff;">left</span>;<br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">1</span>: <span style="color: #B900B9;">// column center (text -if any- may overwrite the bitmap)</span><br /> nLeft = rct.<span style="color: #0000ff;">left</span> + <span style="color: #000000;">(</span> <span style="color: #000000;">(</span>rct.<span style="color: #0000ff;">right</span> - rct.<span style="color: #0000ff;">left</span> + <span style="color: #000000;">1</span><span style="color: #000000;">)</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> - <span style="color: #000000;">(</span> bm.bmWidth / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> - <span style="color: #000000;">1</span>;<br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">2</span>: <span style="color: #B900B9;">// column right</span><br /> nLeft = rct.<span style="color: #0000ff;">right</span> - <span style="color: #000000;">(</span> bm.bmWidth + <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">3</span>: <span style="color: #B900B9;">// left of centered text</span><br /> nLeft = <span style="color: #0000ff;">max</span><span style="color: #000000;">(</span> rct.<span style="color: #0000ff;">left</span>, rct.<span style="color: #0000ff;">left</span> + <span style="color: #000000;">(</span><span style="color: #000000;">(</span>rct.<span style="color: #0000ff;">right</span> - rct.<span style="color: #0000ff;">left</span> + <span style="color: #000000;">1</span><span style="color: #000000;">)</span> / <span style="color: #000000;">2</span><span style="color: #000000;">)</span> - <span style="color: #000000;">(</span>iTxtW / <span style="color: #000000;">2</span><span style="color: #000000;">)</span> - bm.bmWidth - <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">4</span>: <span style="color: #B900B9;">// right of centered text</span><br /> nLeft = rct.<span style="color: #0000ff;">left</span> + <span style="color: #000000;">(</span> <span style="color: #000000;">(</span>rct.<span style="color: #0000ff;">right</span> - rct.<span style="color: #0000ff;">left</span> + <span style="color: #000000;">1</span><span style="color: #000000;">)</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> + <span style="color: #000000;">(</span> iTxtW / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> + <span style="color: #000000;">2</span>;<br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">default</span>: <span style="color: #B900B9;">// a value > 4 means specific pixel location from column left</span><br /> nLeft = rct.<span style="color: #0000ff;">left</span> + ixLayOut;<br /> <span style="color: #00C800;">break</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> nTop = rct.top;<br /> nLeft = rct.<span style="color: #0000ff;">left</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> b3DLook <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bAdjBmp <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> nTop = rct.top + <span style="color: #000000;">1</span>;<br /> DrawBitmap<span style="color: #000000;">(</span> hDC, hBitMap, nTop, rct.<span style="color: #0000ff;">left</span> - <span style="color: #000000;">1</span>, rct.<span style="color: #0000ff;">right</span> - rct.<span style="color: #0000ff;">left</span> + <span style="color: #000000;">1</span>, rct.bottom - rct.top - <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> hBitMap = <span style="color: #000000;">0</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !bOpaque <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> MaskRegion<span style="color: #000000;">(</span> hDC, &rct, GetPixel<span style="color: #000000;">(</span>hDC, nLeft, nTop<span style="color: #000000;">)</span>, GetBkColor<span style="color: #000000;">(</span>hDC<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bOpaque <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> DrawBitmap<span style="color: #000000;">(</span> hDC, hBitMap, nTop, nLeft, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> DrawMasked<span style="color: #000000;">(</span> hDC, hBitMap, nTop, nLeft <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bAdjBmp <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> DrawBitmap<span style="color: #000000;">(</span> hDC, hBitMap, rct.top, rct.<span style="color: #0000ff;">left</span> - <span style="color: #000000;">2</span>, rct.<span style="color: #0000ff;">right</span> - rct.<span style="color: #0000ff;">left</span> + <span style="color: #000000;">3</span>, rct.bottom - rct.top - <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> hBitMap = <span style="color: #000000;">0</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !bOpaque <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> MaskRegion<span style="color: #000000;">(</span> hDC, &rct, GetPixel<span style="color: #000000;">(</span>hDC, nLeft, nTop<span style="color: #000000;">)</span>, GetBkColor<span style="color: #000000;">(</span>hDC<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bOpaque <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> DrawBitmap<span style="color: #000000;">(</span> hDC, hBitMap, nTop, nLeft, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> DrawMasked<span style="color: #000000;">(</span> hDC, hBitMap, nTop, nLeft <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nLen > <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iAlign == DT_LEFT <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.<span style="color: #0000ff;">left</span> += <span style="color: #000000;">(</span> <span style="color: #000000;">2</span> + <span style="color: #000000;">(</span>hBitMap && ixLayOut == <span style="color: #000000;">0</span> ? bm.bmWidth + <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iAlign == DT_RIGHT <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">(</span> <span style="color: #000000;">2</span> + <span style="color: #000000;">(</span>hBitMap && ixLayOut == <span style="color: #000000;">2</span> ? bm.bmWidth + <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nVertText == <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.<span style="color: #0000ff;">right</span> += <span style="color: #000000;">(</span> <span style="color: #000000;">4</span> * nLen <span style="color: #000000;">)</span>;<br /> rct.bottom += <span style="color: #000000;">8</span>;<br /> <span style="color: #000000;">}</span><br /><br /> iFlags = iAlign | DT_NOPREFIX | nVAlign * <span style="color: #000000;">4</span> | <span style="color: #000000;">(</span> bMultiLine && nVAlign < <span style="color: #000000;">2</span> ? <span style="color: #000000;">0</span> : <span style="color: #000000;">DT_SINGLELINE</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nVertText == <span style="color: #000000;">3</span> || nVertText == <span style="color: #000000;">4</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> DrawCheck<span style="color: #000000;">(</span> hDC, &rct, hWhitePen, iAlign, bChecked <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> nBkOld = SetBkMode<span style="color: #000000;">(</span> hDC, TRANSPARENT <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> b3D <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.top -= <span style="color: #000000;">1</span>;<br /> rct.<span style="color: #0000ff;">left</span> -= <span style="color: #000000;">1</span>;<br /> rct.bottom -= <span style="color: #000000;">1</span>;<br /> rct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">1</span>;<br /><br /> SetTextColor<span style="color: #000000;">(</span> hDC, b3DInv ? nClr3DS : <span style="color: #000000;">nClr3DL</span> <span style="color: #000000;">)</span>;<br /> DrawText<span style="color: #000000;">(</span> hDC, cData, nLen, &rct, iFlags <span style="color: #000000;">)</span>;<br /><br /> rct.top += <span style="color: #000000;">2</span>;<br /> rct.<span style="color: #0000ff;">left</span> += <span style="color: #000000;">2</span>;<br /> rct.bottom += <span style="color: #000000;">2</span>;<br /> rct.<span style="color: #0000ff;">right</span> += <span style="color: #000000;">2</span>;<br /><br /> SetTextColor<span style="color: #000000;">(</span> hDC, b3DInv ? nClr3DL : <span style="color: #000000;">nClr3DS</span> <span style="color: #000000;">)</span>;<br /> DrawText<span style="color: #000000;">(</span> hDC, cData, nLen, &rct, iFlags <span style="color: #000000;">)</span>;<br /><br /> rct.top -= <span style="color: #000000;">1</span>;<br /> rct.<span style="color: #0000ff;">left</span> -= <span style="color: #000000;">1</span>;<br /> rct.bottom -= <span style="color: #000000;">1</span>;<br /> rct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">1</span>;<br /><br /> SetTextColor<span style="color: #000000;">(</span> hDC, clrFore <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> DrawText<span style="color: #000000;">(</span> hDC, cData, nLen, &rct, iFlags <span style="color: #000000;">)</span>;<br /> SetBkMode<span style="color: #000000;">(</span> hDC, nBkOld <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iAlign == DT_LEFT <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.<span style="color: #0000ff;">left</span> -= <span style="color: #000000;">(</span> <span style="color: #000000;">2</span> + <span style="color: #000000;">(</span>hBitMap && ixLayOut == <span style="color: #000000;">0</span> ? bm.bmWidth + <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iAlign == DT_RIGHT <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.<span style="color: #0000ff;">right</span> += <span style="color: #000000;">(</span> <span style="color: #000000;">2</span> + <span style="color: #000000;">(</span>hBitMap && ixLayOut == <span style="color: #000000;">2</span> ? bm.bmWidth + <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nVertText == <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">(</span> <span style="color: #000000;">4</span> * nLen <span style="color: #000000;">)</span>;<br /> rct.bottom -= <span style="color: #000000;">8</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> b3DLook <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> bHeader = <span style="color: #000000;">(</span> bSuper ? bSuper : <span style="color: #000000;">bHeader</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nWidth != <span style="color: #000000;">-2</span><span style="color: #000000;">)</span> && bGrid <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span> <span style="color: #B900B9;">// -1 draw gridline in phantom column; -2 don't draw gridline in phantom column</span><br /> WndBoxDraw<span style="color: #000000;">(</span> hDC, &rct, hWhitePen, hGrayPen, b3DLook ? <span style="color: #000000;">4</span> : <span style="color: #000000;">nLineStyle</span>, bHeader <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lCursor > <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> cDrawCursor<span style="color: #000000;">(</span> hWnd, &rct, lCursor, clrFore <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> bHeader = <span style="color: #000000;">(</span> bFooter ? bFooter : <span style="color: #000000;"><span style="color: #000000;">(</span>bHeader</span> || bSuper<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nWidth != <span style="color: #000000;">-2</span><span style="color: #000000;">)</span> && bGrid <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span> <span style="color: #B900B9;">// -1 draw gridline in phantom column; -2 don't draw gridline in phantom column</span><br /> WndBoxDraw<span style="color: #000000;">(</span> hDC, &rct, hGrayPen, hGrayPen, nLineStyle, bHeader <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lCursor > <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> cDrawCursor<span style="color: #000000;">(</span> hWnd, &rct, lCursor, clrFore <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /> <span style="color: #000000;">}</span><br /><br /> DeleteObject<span style="color: #000000;">(</span> hGrayPen <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hWhitePen <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hFont <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldFont <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bDestroyDC <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> ReleaseDC<span style="color: #000000;">(</span> hWnd, hDC <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><span style="color: #000000;">}</span><br /><br />void WndBoxDraw<span style="color: #000000;">(</span> HDC hDC, RECT *rct, HPEN hPUpLeft, HPEN hPBotRit, int nLineStyle, BOOL bHeader <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HPEN hOldPen = SelectObject<span style="color: #000000;">(</span> hDC, hPUpLeft <span style="color: #000000;">)</span>;<br /> HPEN hBlack = CreatePen<span style="color: #000000;">(</span> PS_SOLID, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">switch</span><span style="color: #000000;">(</span> nLineStyle <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">0</span>:<br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">1</span>:<br /> SelectObject<span style="color: #000000;">(</span> hDC, hPBotRit <span style="color: #000000;">)</span>;<br /> GoToPoint<span style="color: #000000;">(</span> hDC, rct->left, rct->bottom - <span style="color: #000000;">(</span>bHeader ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, rct->right - <span style="color: #000000;">1</span>, rct->bottom - <span style="color: #000000;">(</span>bHeader ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, rct->right - <span style="color: #000000;">1</span>, rct->top - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bHeader <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> LineTo<span style="color: #000000;">(</span> hDC, rct->left - <span style="color: #000000;">1</span>, rct->top - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">2</span>:<br /> SelectObject<span style="color: #000000;">(</span> hDC, hPBotRit <span style="color: #000000;">)</span>;<br /> GoToPoint<span style="color: #000000;">(</span> hDC, rct->right - <span style="color: #000000;">1</span>, rct->bottom <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, rct->right - <span style="color: #000000;">1</span>, rct->top - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">3</span>:<br /> SelectObject<span style="color: #000000;">(</span> hDC, hPBotRit <span style="color: #000000;">)</span>;<br /> GoToPoint<span style="color: #000000;">(</span> hDC, rct->left, rct->bottom <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, rct->right, rct->bottom <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">4</span>:<br /> SelectObject<span style="color: #000000;">(</span> hDC, hPUpLeft <span style="color: #000000;">)</span>;<br /> GoToPoint<span style="color: #000000;">(</span> hDC, rct->left, rct->bottom <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, rct->left, rct->top <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, rct->right, rct->top <span style="color: #000000;">)</span>;<br /> SelectObject<span style="color: #000000;">(</span> hDC, hPBotRit <span style="color: #000000;">)</span>;<br /> GoToPoint<span style="color: #000000;">(</span> hDC, rct->left, rct->bottom - <span style="color: #000000;">(</span>bHeader ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, rct->right - <span style="color: #000000;">1</span>, rct->bottom - <span style="color: #000000;">(</span>bHeader ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, rct->right - <span style="color: #000000;">1</span>, rct->top - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">break</span>;<br /><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">5</span>:<br /> rct->top += <span style="color: #000000;">1</span>;<br /> rct->left += <span style="color: #000000;">1</span>;<br /> rct->bottom -= <span style="color: #000000;">1</span>;<br /> rct->right -= <span style="color: #000000;">1</span>;<br /> DrawFocusRect<span style="color: #000000;">(</span> hDC, rct <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">break</span>;<br /> <span style="color: #000000;">}</span><br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldPen <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hBlack <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_TSBRWSCROLL<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HWND hWnd = <span style="color: #000000;">(</span> HWND <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> int iRows = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> HFONT hFont = <span style="color: #000000;">(</span> HFONT <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /> int nHeightCell = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> int nHeightHead = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span>;<br /> int nHeightFoot = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">6</span> <span style="color: #000000;">)</span>;<br /> int nHeightSuper = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">7</span> <span style="color: #000000;">)</span>;<br /> int nHeightSpecHd = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">8</span> <span style="color: #000000;">)</span>;<br /><br /> HFONT hOldFont = <span style="color: #000000;">0</span>;<br /> HDC hDC = GetDC<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span>;<br /> RECT rct;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hFont <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> hOldFont = SelectObject<span style="color: #000000;">(</span> hDC, hFont <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> GetClientRect<span style="color: #000000;">(</span> hWnd, &rct <span style="color: #000000;">)</span>;<br /><br /> rct.top += <span style="color: #000000;">(</span> nHeightHead + nHeightSuper - <span style="color: #000000;">(</span>nHeightSuper ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span>+ nHeightSpecHd - <span style="color: #000000;">(</span>nHeightSpecHd ? <span style="color: #000000;">1</span> : <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// exclude heading from scrolling</span><br /> rct.bottom -= nHeightFoot; <span style="color: #B900B9;">// exclude footing from scrolling</span><br /> rct.bottom -= <span style="color: #000000;">(</span> <span style="color: #000000;">(</span>rct.bottom - rct.top + <span style="color: #000000;">1</span><span style="color: #000000;">)</span> % nHeightCell <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// exclude unused portion at bottom</span><br /> ScrollWindowEx<span style="color: #000000;">(</span> hWnd, <span style="color: #000000;">0</span>, <span style="color: #000000;">(</span> int <span style="color: #000000;">)</span> -<span style="color: #000000;">(</span>nHeightCell * iRows<span style="color: #000000;">)</span>, <span style="color: #000000;">0</span>, &rct, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hFont <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldFont <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> ReleaseDC<span style="color: #000000;">(</span> hWnd, hDC <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_TSBRWHSCROLL<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HWND hWnd = <span style="color: #000000;">(</span> HWND <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> WORD wCols = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> int nLeft = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /> int nRight = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /><br /> HDC hDC = GetDC<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span>;<br /> RECT rct;<br /><br /> GetClientRect<span style="color: #000000;">(</span> hWnd, &rct <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nLeft <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.<span style="color: #0000ff;">left</span> = nLeft;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nRight <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> rct.<span style="color: #0000ff;">right</span> = nRight;<br /> <span style="color: #000000;">}</span><br /><br /> ScrollWindowEx<span style="color: #000000;">(</span> hWnd, wCols, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, &rct, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /><br /> ReleaseDC<span style="color: #000000;">(</span> hWnd, hDC <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_ROWFROMPIX<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HWND hWnd = <span style="color: #000000;">(</span> HWND <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> int iPixR = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> int iCell = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /> int iHead = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> int iFoot = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span>;<br /> int iSupH = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">6</span> <span style="color: #000000;">)</span>;<br /> int iSpcH = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">7</span> <span style="color: #000000;">)</span>;<br /><br /> RECT rct;<br /> int iRow;<br /><br /> GetClientRect<span style="color: #000000;">(</span> hWnd, &rct <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iPixR <= <span style="color: #000000;">(</span>rct.top + iHead + iSupH<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> iRow = <span style="color: #000000;">0</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iPixR >= <span style="color: #000000;">(</span>rct.top + iHead + iSupH <span style="color: #000000;">)</span> && iPixR <= <span style="color: #000000;">(</span>rct.top + iHead + iSupH + iSpcH<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> iRow = <span style="color: #000000;">-2</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iPixR >= <span style="color: #000000;">(</span>rct.bottom - iFoot<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> iRow = <span style="color: #000000;">-1</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> rct.top += <span style="color: #000000;">(</span> iHead + iSupH + iSpcH <span style="color: #000000;">)</span>;<br /> iRow = <span style="color: #000000;">(</span> <span style="color: #000000;">(</span>iPixR - rct.top<span style="color: #000000;">)</span> / iCell <span style="color: #000000;">)</span> + <span style="color: #000000;">1</span>;<br /> <span style="color: #000000;">}</span><br /><br /> hb_retni<span style="color: #000000;">(</span> iRow <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_SBGETHEIGHT<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//SBGetHeigh( hWnd, hFont, nTotal )</span><br /><span style="color: #000000;">{</span><br /> HWND hWnd = <span style="color: #000000;">(</span> HWND <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> HFONT hFont = <span style="color: #000000;">(</span> HFONT <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> int iTotal = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /><br /> TEXTMETRIC tm;<br /><br /> RECT rct;<br /> HDC hDC = GetDC<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span>;<br /> HFONT hOldFont;<br /> LONG lTotHeight, lReturn;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> iTotal < <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hFont <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> hOldFont = SelectObject<span style="color: #000000;">(</span> hDC, hFont <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> GetTextMetrics<span style="color: #000000;">(</span> hDC, &tm <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hFont <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldFont <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> ReleaseDC<span style="color: #000000;">(</span> hWnd, hDC <span style="color: #000000;">)</span>;<br /> lReturn = <span style="color: #000000;">(</span> iTotal == <span style="color: #000000;">1</span> ? tm.tmAveCharWidth : <span style="color: #000000;">tm</span>.tmHeight <span style="color: #000000;">)</span>;<br /> hb_retnl<span style="color: #000000;">(</span> lReturn <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> GetWindowRect<span style="color: #000000;">(</span> hWnd, &rct <span style="color: #000000;">)</span>;<br /> lTotHeight = rct.bottom - rct.top + <span style="color: #000000;">1</span>;<br /> ReleaseDC<span style="color: #000000;">(</span> hWnd, hDC <span style="color: #000000;">)</span>;<br /> hb_retnl<span style="color: #000000;">(</span> lTotHeight <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_COUNTROWS<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// ( hWnd, nHeightCell, nHeightHead,</span><br /><br /><span style="color: #B900B9;">// nHeightFoot, nHeightSuper, nHeightSpec ) -> nRows</span><br /><br /><span style="color: #000000;">{</span><br /> HWND hWnd = <span style="color: #000000;">(</span> HWND <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> int iCell = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /><br /> int iHead = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /> int iFoot = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> int iSupH = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span>;<br /> int iSpcH = hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">6</span> <span style="color: #000000;">)</span>;<br /><br /> RECT rct;<br /> int iRows, iFree;<br /><br /> GetClientRect<span style="color: #000000;">(</span> hWnd, &rct <span style="color: #000000;">)</span>;<br /><br /> iFree = rct.bottom - rct.top + <span style="color: #000000;">1</span> - iSupH - iHead - iFoot - iSpcH;<br /> iRows = iFree / iCell;<br /><br /> hb_retni<span style="color: #000000;">(</span> iRows <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_SBMPHEIGHT<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// ( hBmp )</span><br /><span style="color: #000000;">{</span><br /> HBITMAP hBmp = <span style="color: #000000;">(</span> HBITMAP <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> BITMAP bm;<br /><br /> GetObject<span style="color: #000000;">(</span> hBmp, sizeof<span style="color: #000000;">(</span>BITMAP<span style="color: #000000;">)</span>, <span style="color: #000000;">(</span>LPSTR<span style="color: #000000;">)</span> & bm <span style="color: #000000;">)</span>;<br /><br /> hb_retni<span style="color: #000000;">(</span> bm.bmHeight <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_SBMPWIDTH<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HBITMAP hBmp = <span style="color: #000000;">(</span> HBITMAP <span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> BITMAP bm;<br /><br /> GetObject<span style="color: #000000;">(</span> hBmp, sizeof<span style="color: #000000;">(</span>BITMAP<span style="color: #000000;">)</span>, <span style="color: #000000;">(</span>LPSTR<span style="color: #000000;">)</span> & bm <span style="color: #000000;">)</span>;<br /><br /> hb_retni<span style="color: #000000;">(</span> bm.bmWidth <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />void DrawCheck<span style="color: #000000;">(</span> HDC hDC, LPRECT rct, HPEN hWhitePen, int nAlign, BOOL bChecked <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> RECT lrct;<br /> HPEN hOldPen;<br /> HBRUSH hOldBrush;<br /><br /> HBRUSH hGrayBrush = CreateSolidBrush<span style="color: #000000;">(</span> RGB<span style="color: #000000;">(</span><span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> HBRUSH hWhiteBrush = CreateSolidBrush<span style="color: #000000;">(</span> RGB<span style="color: #000000;">(</span><span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> HPEN hBlackPen = CreatePen<span style="color: #000000;">(</span> PS_SOLID, <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">(</span><span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> HPEN hLGrayPen = CreatePen<span style="color: #000000;">(</span> PS_SOLID, <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">(</span><span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> HPEN hGrayPen = CreatePen<span style="color: #000000;">(</span> PS_SOLID, <span style="color: #000000;">1</span>, RGB<span style="color: #000000;">(</span><span style="color: #000000;">128</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> hOldBrush = SelectObject<span style="color: #000000;">(</span> hDC, hGrayBrush <span style="color: #000000;">)</span>;<br /><br /> lrct.top = rct->top + <span style="color: #000000;">(</span> <span style="color: #000000;">(</span><span style="color: #000000;">(</span>rct->bottom - rct->top + <span style="color: #000000;">1</span><span style="color: #000000;">)</span> / <span style="color: #000000;">2</span><span style="color: #000000;">)</span> - <span style="color: #000000;">8</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">switch</span><span style="color: #000000;">(</span> nAlign <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">0</span>: lrct.<span style="color: #0000ff;">left</span> = rct->left; <span style="color: #00C800;">break</span>;<br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">1</span>: lrct.<span style="color: #0000ff;">left</span> = rct->left + <span style="color: #000000;">(</span> <span style="color: #000000;">(</span>rct->right - rct->left + <span style="color: #000000;">1</span><span style="color: #000000;">)</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> - <span style="color: #000000;">8</span>; <span style="color: #00C800;">break</span>;<br /> <span style="color: #00C800;">case</span> <span style="color: #000000;">2</span>: lrct.<span style="color: #0000ff;">left</span> = rct->right - <span style="color: #000000;">16</span>; <span style="color: #00C800;">break</span>;<br /> <span style="color: #000000;">}</span><br /><br /> lrct.bottom = lrct.top + <span style="color: #000000;">16</span>;<br /> lrct.<span style="color: #0000ff;">right</span> = lrct.<span style="color: #0000ff;">left</span> + <span style="color: #000000;">16</span>;<br /><br /> lrct.<span style="color: #0000ff;">left</span> -= <span style="color: #000000;">1</span>;<br /> lrct.top -= <span style="color: #000000;">1</span>;<br /> lrct.<span style="color: #0000ff;">right</span> += <span style="color: #000000;">1</span>;<br /> lrct.bottom += <span style="color: #000000;">1</span>;<br /><br /> hOldPen = SelectObject<span style="color: #000000;">(</span> hDC, hBlackPen <span style="color: #000000;">)</span>;<br /> Rectangle<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">left</span>, lrct.top, lrct.<span style="color: #0000ff;">right</span>, lrct.bottom <span style="color: #000000;">)</span>;<br /><br /> lrct.<span style="color: #0000ff;">left</span> += <span style="color: #000000;">1</span>;<br /> lrct.top += <span style="color: #000000;">1</span>;<br /> lrct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">1</span>;<br /> lrct.bottom -= <span style="color: #000000;">1</span>;<br /><br /> FillRect<span style="color: #000000;">(</span> hDC, &lrct, hGrayBrush <span style="color: #000000;">)</span>;<br /><br /> lrct.top += <span style="color: #000000;">2</span>;<br /> lrct.<span style="color: #0000ff;">left</span> += <span style="color: #000000;">2</span>;<br /> lrct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">1</span>;<br /> lrct.bottom -= <span style="color: #000000;">1</span>;<br /><br /> FillRect<span style="color: #000000;">(</span> hDC, &lrct, hWhiteBrush <span style="color: #000000;">)</span>;<br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldBrush <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hGrayBrush <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hWhiteBrush <span style="color: #000000;">)</span>;<br /><br /> lrct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">1</span>;<br /> lrct.bottom -= <span style="color: #000000;">1</span>;<br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hGrayPen <span style="color: #000000;">)</span>;<br /> Rectangle<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">left</span>, lrct.top, lrct.<span style="color: #0000ff;">right</span>, lrct.bottom <span style="color: #000000;">)</span>;<br /><br /> lrct.top += <span style="color: #000000;">1</span>;<br /> lrct.<span style="color: #0000ff;">left</span> += <span style="color: #000000;">1</span>;<br /> lrct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">1</span>;<br /> lrct.bottom -= <span style="color: #000000;">1</span>;<br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hBlackPen <span style="color: #000000;">)</span>;<br /> Rectangle<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">left</span>, lrct.top, lrct.<span style="color: #0000ff;">right</span>, lrct.bottom <span style="color: #000000;">)</span>;<br /><br /> lrct.top += <span style="color: #000000;">1</span>;<br /> lrct.<span style="color: #0000ff;">left</span> += <span style="color: #000000;">1</span>;<br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hWhitePen <span style="color: #000000;">)</span>;<br /> Rectangle<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">left</span>, lrct.top, lrct.<span style="color: #0000ff;">right</span>, lrct.bottom <span style="color: #000000;">)</span>;<br /><br /> lrct.top += <span style="color: #000000;">1</span>;<br /> lrct.<span style="color: #0000ff;">right</span> -= <span style="color: #000000;">2</span>;<br /> lrct.bottom -= <span style="color: #000000;">1</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bChecked <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> GoToPoint<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">right</span>, lrct.top <span style="color: #000000;">)</span>;<br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hBlackPen <span style="color: #000000;">)</span>;<br /><br /> LineTo<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">right</span> - <span style="color: #000000;">4</span>, lrct.bottom - <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">right</span> - <span style="color: #000000;">6</span>, lrct.bottom - <span style="color: #000000;">5</span> <span style="color: #000000;">)</span>;<br /><br /> GoToPoint<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">right</span>, lrct.top + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">right</span> - <span style="color: #000000;">4</span>, lrct.bottom - <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">right</span> - <span style="color: #000000;">6</span>, lrct.bottom - <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /><br /> GoToPoint<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">right</span>, lrct.top + <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">right</span> - <span style="color: #000000;">4</span>, lrct.bottom - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> LineTo<span style="color: #000000;">(</span> hDC, lrct.<span style="color: #0000ff;">right</span> - <span style="color: #000000;">6</span>, lrct.bottom - <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldPen <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hGrayPen <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hLGrayPen <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hBlackPen <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">static</span> void GoToPoint<span style="color: #000000;">(</span> HDC hDC, int ix, int iy <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> POINT <span style="color: #0000ff;">pt</span>;<br /><br /> MoveToEx<span style="color: #000000;">(</span> hDC, ix, iy, &pt <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">static</span> void DegradColor<span style="color: #000000;">(</span> HDC hDC, RECT *rori, COLORREF cFrom, COLORREF cTo <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> int clr1r, clr1g, clr1b, clr2r, clr2g, clr2b;<br /> signed int iEle, iRed, iGreen, iBlue;<br /> int iTot = <span style="color: #000000;">(</span> rori->bottom + <span style="color: #000000;">2</span> - rori->top <span style="color: #000000;">)</span>;<br /> BOOL bDir;<br /> RECT rct;<br /> HBRUSH hOldBrush, hBrush;<br /><br /> rct.top = rori->top;<br /> rct.<span style="color: #0000ff;">left</span> = rori->left;<br /> rct.bottom = rori->bottom;<br /> rct.<span style="color: #0000ff;">right</span> = rori->right;<br /><br /> clr1r = GetRValue<span style="color: #000000;">(</span> cFrom <span style="color: #000000;">)</span>;<br /> clr1g = GetGValue<span style="color: #000000;">(</span> cFrom <span style="color: #000000;">)</span>;<br /> clr1b = GetBValue<span style="color: #000000;">(</span> cFrom <span style="color: #000000;">)</span>;<br /><br /> clr2r = GetRValue<span style="color: #000000;">(</span> cTo <span style="color: #000000;">)</span>;<br /> clr2g = GetGValue<span style="color: #000000;">(</span> cTo <span style="color: #000000;">)</span>;<br /> clr2b = GetBValue<span style="color: #000000;">(</span> cTo <span style="color: #000000;">)</span>;<br /><br /> iRed = <span style="color: #0000ff;">abs</span><span style="color: #000000;">(</span> clr2r - clr1r <span style="color: #000000;">)</span>;<br /> iGreen = <span style="color: #0000ff;">abs</span><span style="color: #000000;">(</span> clr2g - clr1g <span style="color: #000000;">)</span>;<br /> iBlue = <span style="color: #0000ff;">abs</span><span style="color: #000000;">(</span> clr2b - clr1b <span style="color: #000000;">)</span>;<br /><br /> iRed = <span style="color: #000000;">(</span> iRed < <span style="color: #000000;">0</span> ? <span style="color: #000000;">0</span> : <span style="color: #000000;"><span style="color: #000000;">(</span>iRed</span> / iTot<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> iGreen = <span style="color: #000000;">(</span> iGreen < <span style="color: #000000;">0</span> ? <span style="color: #000000;">0</span> : <span style="color: #000000;"><span style="color: #000000;">(</span>iGreen</span> / iTot<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> iBlue = <span style="color: #000000;">(</span> iBlue < <span style="color: #000000;">0</span> ? <span style="color: #000000;">0</span> : <span style="color: #000000;"><span style="color: #000000;">(</span>iBlue</span> / iTot<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> rct.bottom = rct.top + <span style="color: #000000;">1</span>;<br /><br /> hBrush = CreateSolidBrush<span style="color: #000000;">(</span> RGB<span style="color: #000000;">(</span>clr1r, clr1g, clr1b<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> hOldBrush = SelectObject<span style="color: #000000;">(</span> hDC, hBrush <span style="color: #000000;">)</span>;<br /> FillRect<span style="color: #000000;">(</span> hDC, &rct, hBrush <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">for</span><span style="color: #000000;">(</span> iEle = <span style="color: #000000;">1</span>; iEle < iTot; iEle++ <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> bDir = <span style="color: #000000;">(</span> clr2r >= clr1r ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bDir <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> clr1r += iRed;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> clr1r -= iRed;<br /> <span style="color: #000000;">}</span><br /><br /> clr1r = <span style="color: #000000;">(</span> clr1r < <span style="color: #000000;">0</span> ? <span style="color: #000000;">0</span> : <span style="color: #000000;">clr1r</span> > <span style="color: #000000;">255</span> ? <span style="color: #000000;">255</span> : <span style="color: #000000;">clr1r</span> <span style="color: #000000;">)</span>;<br /><br /> bDir = <span style="color: #000000;">(</span> clr2g >= clr1g ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bDir <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> clr1g += iGreen;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> clr1g -= iGreen;<br /> <span style="color: #000000;">}</span><br /><br /> clr1g = <span style="color: #000000;">(</span> clr1g < <span style="color: #000000;">0</span> ? <span style="color: #000000;">0</span> : <span style="color: #000000;">clr1g</span> > <span style="color: #000000;">255</span> ? <span style="color: #000000;">255</span> : <span style="color: #000000;">clr1g</span> <span style="color: #000000;">)</span>;<br /><br /> bDir = <span style="color: #000000;">(</span> clr2b >= clr1b ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> bDir <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> clr1b += iBlue;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> clr1b -= iBlue;<br /> <span style="color: #000000;">}</span><br /><br /> clr1b = <span style="color: #000000;">(</span> clr1b < <span style="color: #000000;">0</span> ? <span style="color: #000000;">0</span> : <span style="color: #000000;">clr1b</span> > <span style="color: #000000;">255</span> ? <span style="color: #000000;">255</span> : <span style="color: #000000;">clr1b</span> <span style="color: #000000;">)</span>;<br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldBrush <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hBrush <span style="color: #000000;">)</span>;<br /> hBrush = CreateSolidBrush<span style="color: #000000;">(</span> RGB<span style="color: #000000;">(</span>clr1r, clr1g, clr1b<span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> SelectObject<span style="color: #000000;">(</span> hDC, hBrush <span style="color: #000000;">)</span>;<br /> FillRect<span style="color: #000000;">(</span> hDC, &rct, hBrush <span style="color: #000000;">)</span>;<br /><br /> rct.top++;<br /> rct.bottom++;<br /> <span style="color: #000000;">}</span><br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldBrush <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hBrush <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />void cDrawCursor<span style="color: #000000;">(</span> HWND hWnd, RECT *rctc, long lCursor, COLORREF nClr <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HDC hDC;<br /> HRGN hReg;<br /> COLORREF lclr = <span style="color: #000000;">(</span> lCursor == <span style="color: #000000;">1</span> ? RGB<span style="color: #000000;">(</span><span style="color: #000000;">5</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">5</span><span style="color: #000000;">)</span> : <span style="color: #000000;">lCursor</span> == <span style="color: #000000;">2</span> ? nClr : <span style="color: #000000;">lCursor</span> <span style="color: #000000;">)</span>;<br /> HBRUSH hBr;<br /> RECT rct;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> lCursor != <span style="color: #000000;">3</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">{</span><br /> hBr = CreateSolidBrush<span style="color: #000000;">(</span> lclr <span style="color: #000000;">)</span>;<br /> hReg = CreateRectRgn<span style="color: #000000;">(</span> rctc->left, rctc->top, rctc->right - <span style="color: #000000;">1</span>, rctc->bottom <span style="color: #000000;">)</span>;<br /> hDC = GetDCEx<span style="color: #000000;">(</span> hWnd, hReg, DCX_CACHE <span style="color: #000000;">)</span>;<br /><br /> FrameRgn<span style="color: #000000;">(</span> hDC, hReg, hBr, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /><br /> ReleaseDC<span style="color: #000000;">(</span> hWnd, hDC <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hReg <span style="color: #000000;">)</span>;<br /> DeleteObject<span style="color: #000000;">(</span> hBr <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #000000;">{</span><br /> rct.top = rctc->top + <span style="color: #000000;">1</span>;<br /> rct.<span style="color: #0000ff;">left</span> = rctc->left + <span style="color: #000000;">1</span>;<br /> rct.bottom = rctc->bottom - <span style="color: #000000;">1</span>;<br /> rct.<span style="color: #0000ff;">right</span> = rctc->right - <span style="color: #000000;">1</span>;<br /><br /> hDC = GetDC<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span>;<br /> DrawFocusRect<span style="color: #000000;">(</span> hDC, &rct <span style="color: #000000;">)</span>;<br /> ReleaseDC<span style="color: #000000;">(</span> hWnd, hDC <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">}</span><br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_GETSCRLRANGE<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// ( hWnd, nFlags )</span><br /><span style="color: #000000;">{</span><br /> int iMin = <span style="color: #000000;">0</span>, iMax = <span style="color: #000000;">0</span>;<br /><br /> GetScrollRange<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>HWND<span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span>, <span style="color: #B900B9;">// its hWnd</span><br /> hb_parni<span style="color: #000000;">(</span><span style="color: #000000;">2</span><span style="color: #000000;">)</span>, <span style="color: #B900B9;">// Scroll bar flags</span><br /> &iMin, &iMax <span style="color: #000000;">)</span>;<br /><br /> hb_reta<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// { nMin, nMax }</span><br /> HB_STORNI<span style="color: #000000;">(</span> iMin, <span style="color: #000000;">-1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> HB_STORNI<span style="color: #000000;">(</span> iMax, <span style="color: #000000;">-1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_GETSCRLPOS<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// ( hWnd, nFlags )</span><br /><span style="color: #000000;">{</span><br /> hb_retni<span style="color: #000000;">(</span> GetScrollPos<span style="color: #000000;">(</span><span style="color: #000000;">(</span>HWND<span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span>, <span style="color: #B900B9;">// its hWnd</span><br /> hb_parni<span style="color: #000000;">(</span><span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>; <span style="color: #B900B9;">// Scroll bar flags</span><br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_INITEDSPINNER<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HWND hwnd;<br /> HWND hedit;<br /> HWND hupdown;<br /> int <span style="color: #0000ff;">Style</span> = WS_CHILD | UDS_ARROWKEYS | UDS_ALIGNRIGHT | UDS_SETBUDDYINT | UDS_NOTHOUSANDS |WS_VISIBLE |UDS_HOTTRACK ;<span style="color: #B900B9;">//| UDS_AUTOBUDDY ;</span><br /><br /> INITCOMMONCONTROLSEX i;<br /><br /> i.dwSize = sizeof<span style="color: #000000;">(</span> INITCOMMONCONTROLSEX <span style="color: #000000;">)</span>;<br /> InitCommonControlsEx<span style="color: #000000;">(</span> &i <span style="color: #000000;">)</span>;<br /><br /> hwnd = <span style="color: #000000;">(</span> HWND <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> hedit = <span style="color: #000000;">(</span> HWND <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /><br /> hupdown = CreateUpDownControl<span style="color: #000000;">(</span> <span style="color: #0000ff;">Style</span>,hb_parni<span style="color: #000000;">(</span><span style="color: #000000;">3</span><span style="color: #000000;">)</span>,hb_parni<span style="color: #000000;">(</span><span style="color: #000000;">4</span><span style="color: #000000;">)</span>,<span style="color: #000000;">15</span>,hb_parni<span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span>,hwnd, <span style="color: #000000;">777</span>,GetModuleHandle<span style="color: #000000;">(</span><span style="color: #00C800;">NULL</span><span style="color: #000000;">)</span>,<br /> hedit,hb_parni<span style="color: #000000;">(</span><span style="color: #000000;">8</span><span style="color: #000000;">)</span>,hb_parni<span style="color: #000000;">(</span><span style="color: #000000;">7</span><span style="color: #000000;">)</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span>;<br /> SendMessage<span style="color: #000000;">(</span> hupdown, UDM_SETRANGE32, <span style="color: #000000;">(</span>WPARAM<span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span><span style="color: #000000;">7</span><span style="color: #000000;">)</span>, <span style="color: #000000;">(</span>LPARAM<span style="color: #000000;">)</span> hb_parni<span style="color: #000000;">(</span><span style="color: #000000;">8</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>LONG<span style="color: #000000;">)</span> hupdown <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br />HARBOUR HB_FUN_SETINCREMENTSPINNER<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /><br /> UDACCEL inc;<br /> SendMessage<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>HWND<span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span>, UDM_GETACCEL, <span style="color: #000000;">(</span>WPARAM<span style="color: #000000;">)</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">(</span>LPARAM<span style="color: #000000;">)</span> & inc <span style="color: #000000;">)</span>;<br /> inc.nInc = hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;<br /> SendMessage<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>HWND<span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span>, UDM_SETACCEL, <span style="color: #000000;">(</span>WPARAM<span style="color: #000000;">)</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">(</span>LPARAM<span style="color: #000000;">)</span> & inc <span style="color: #000000;">)</span>;<br /><br /><span style="color: #000000;">}</span><br /><br /> </div>[/code:3a235eaw]
Thanks in advance. |
Compiling TSButton with MinGW gcc | Ok,
I going to compile tsbrowse and feedback in asap
Regards, |
Compiling TSButton with MinGW gcc | Thanks. |
Compiling TSButton with MinGW gcc | Hi,
Need help with TsButtons & MinGW . Creating of library - succesfull , but trying to build application with tsbutton library I'm getting errors . Sbuh3m.a here Tsbutton lib for MinGw
[quote:1ck3q8jc]
hbmk2: Linking... Ts.exe
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x9040): multiple definition of `HB_FUN_LIGHTCOLOR'
C:/Fwh/lib/fivehgc.lib(COLORTON.o):COLORTON.C:(.text+0x341): first defined here
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x10bb): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x10c9): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x10ec): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x10fc): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x110a): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x1118): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x1168): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x1178): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x1186): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x1194): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x11cf): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x11df): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x11ed): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x11fd): more undefined references to `_parni' follow
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x121d): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2c42): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2c50): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2c5e): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2c6c): undefined reference to `_parc'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2c7c): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2c8a): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2c9a): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2caa): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2cbd): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2cd0): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2ce3): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2cf3): undefined reference to `ISLOGICAL'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2d0d): undefined reference to `ISLOGICAL'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2d20): undefined reference to `ISLOGICAL'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2d3a): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2d4a): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2d5d): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2d70): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2d80): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x2d93): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x30af): undefined reference to `_parclen'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x33f8): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x340d): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3e60): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3e6e): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3f2d): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3f3b): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3f7a): undefined reference to `_retni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3fab): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3fb9): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3fc7): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3fd5): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3fe3): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4033): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4041): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x404f): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x405f): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x406f): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x437a): undefined reference to `_parclen'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4e9f): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4eaf): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4ebf): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4ecf): undefined reference to `_parc'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4edf): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4eef): undefined reference to `ISNUM'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4f09): undefined reference to `ISNUM'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4f1d): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4f2b): undefined reference to `ISNUM'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4f3f): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4f4d): undefined reference to `ISNUM'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4f61): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4f73): undefined reference to `ISCHAR'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x4f83): undefined reference to `_parclen'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5138): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x51f2): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5200): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5213): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5223): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5233): undefined reference to `_parc'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5246): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5256): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5269): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5277): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x528a): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x529a): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x52aa): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x52b8): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x52c8): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x52db): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x52eb): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x52fe): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x530e): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x531e): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5331): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5341): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5351): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5364): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5377): undefined reference to `ISLOGICAL'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5394): undefined reference to `ISLOGICAL'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x53af): undefined reference to `ISNUM'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x53c3): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x53d6): undefined reference to `ISNUM'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x53ea): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x53fd): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5410): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5423): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5436): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5449): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x545c): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x546c): undefined reference to `ISNUM'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5486): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5499): undefined reference to `ISNUM'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x5798): undefined reference to `_parl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x57f8): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x8dde): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x8df0): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x8e04): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x8e1b): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x8e32): more undefined references to `_parni' follow
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x8fa9): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x8fb9): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x8fc7): undefined reference to `ISNUM'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x8fdc): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x9060): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x906e): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x913f): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x914d): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x915b): undefined reference to `_parnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x916b): more undefined references to `_parnl' follow
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x917b): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x918b): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x9199): undefined reference to `_parni'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x3eec): undefined reference to `_retnl'
ffmpeg/lib/Sbuh3m.a(bpaint.o):bpaint.c:(.text+0x9128): undefined reference to `_retnl'
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe .hbmk/win/mingw/Koni.o .hbmk/win/mingw/_hbmkaut_Koni.o .hbmk/win/mingw/Koni.reso -mconsole -Wl,--start-group -lcomctl32 -lcomdlg32 -lgdi32 -lhbcplr -lhbct -lhbmzip -lhbpcre -lhbsqlit3 -lhbtip -lhbwin -lhbzlib -lmsimg32 -lodbc32 -lole32 -loleaut32 -luser32 -luuid -lvfw32 -lwinmm -lwinspool -lwsock32 -lgtgui -lkernel32 -lpsapi -lwin32k -loledlg -lstdc++ -lmfcuia32 -lversion -lhbcommon -lhbcpage -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbpp -lhbrdd -lhbsix -lhbusrrdd -lhbvm -lrddcdx -lrddfpt -lrddntx -lxhb -lfivehg -lfivehgc -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainstd -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib ffmpeg/lib/Sbuh3m.a ffmpeg/lib/libavcodec.dll.a ffmpeg/lib/libavformat.dll.a ffmpeg/lib/libavutil.dll.a -Wl,--end-group -oTs.exe -Lc:/hrb/lib/win/mingw -Lc:/hrb/bin -LC:/Fwh/lib
[/quote:1ck3q8jc]
hbp for lib :
[quote:1ck3q8jc]
-n
-omylib
-hblib
-inc
-incpath=include\
-incpath=..\include\
-l..\lib\fivehg
-l..\lib\fivehgc
classes\TSBAR.PRG
classes\TSBUTTON.PRG
classes\TSGradie.PRG
classes\TSLINES.PRG
classes\TSRADIO.PRG
classes\TSTSAY.PRG
function\RGB2HSL.PRG
function\bpaint.c
[/quote:1ck3q8jc]
What I must to do to avoid errors ?
Many thanks in advance ! |
Compiling TSButton with MinGW gcc | Rimantas, seems that nobody else is interested in TsBrowse/TsButton and MinGW...
And Manuel disappears from time to time...
But after studying the C code I managed to compile the TsBrowse C code.
So, lets try to do this.
First in bpaint.c change all references of
_parclen, _parl, _parni, _parnl, etc.
to
hb_parclen, hb_parl, hb_parni, hb_parnl, hb_etc.
And do the same with _retnl.
Seems that this changed in Harbour some time ago.
I will see the other issues and will post here ASAP.
[[]] Mauricio Ventura Faria |
Compiling TSButton with MinGW gcc | Rimantas, what version of TsButton are you using ? |
Compiling TSButton with MinGW gcc | And for ISLOGICAL, ISNUM and ISCHAR put this defines in top of .C.
#define S_LNUM 0x0002
#define S_DNUM 0x0008
#define S_LOG 0x0080
#define S_CHAR 0x0400
#define S_ANYNUM ( S_LNUM | S_DNUM )
#define ISCHAR( s ) ( hb_param( s, S_CHAR ) != NULL )
#define ISNUM( s ) ( hb_param( s, S_ANYNUM ) != NULL )
#define ISLOGICAL( s ) ( hb_param( s, S_LOG ) != NULL )
[[]] |
Compiling TSButton with MinGW gcc | [quote="concentra":4i9rqc8i]And for ISLOGICAL, ISNUM and ISCHAR put this defines in top of .C.
#define S_LNUM 0x0002
#define S_DNUM 0x0008
#define S_LOG 0x0080
#define S_CHAR 0x0400
#define S_ANYNUM ( S_LNUM | S_DNUM )
#define ISCHAR( s ) ( hb_param( s, S_CHAR ) != NULL )
#define ISNUM( s ) ( hb_param( s, S_ANYNUM ) != NULL )
#define ISLOGICAL( s ) ( hb_param( s, S_LOG ) != NULL )
[[]][/quote:4i9rqc8i]
Wowww ! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Thanks concentra for your support ! It seems that together we will do something good ! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->) I'm using the latest TsButton 7 version . Sorry , but with TsBrowse I'm not working , with xBrowse only . But buttons are needfulls fronm TsButtons . So if I'll know something usefull I'll let you know here .. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
With best regards ! |
Compiling WINDOWS 7 /AntiVir Guard | Compiling under
WINDOWS 7 /AntiVir Guard installed
I get sometimes a warning: HTML-Scriptvirus HTML/Crypted.Gen. in one of the c-files.
Does someone know what this could be?
Thanks in advance
Otto |
Compiling WINDOWS 7 /AntiVir Guard | Does it tell you which file it doesn't like? |
Compiling WINDOWS 7 /AntiVir Guard | Michael, it was a c-file created from my source code.
I will post more when I see the warning again.
Best regards,
Otto |
Compiling WINDOWS 7 /AntiVir Guard | It's clearly a false alarm by AntiVir Guard.
EMG |
Compiling WINDOWS 7 /AntiVir Guard | Hello Michael, hello Enrico,
today I never saw the warning. I noticed that AntiVir Guard made 6 or 7 updates yesterday.
Maybe they changed something.
Best regards,
Otto |
Compiling WINDOWS 7 /AntiVir Guard | Now the warning is back.
Best regards,
Otto
[img:v8wt3pm6]http://www.atzwanger-software.com/fw/Unbenannt.JPG[/img:v8wt3pm6] |
Compiling WINDOWS 7 /AntiVir Guard | You should write to the AntiVir Guard staff to report the false alarm, attaching the offending C source code.
EMG |
Compiling WINDOWS 7 /AntiVir Guard | I suppose that is it possible that it is not a false alarm and that some virus is adding code to the compiler output. Either way I would send it to the AV company for analysis.
James |
Compiling WINDOWS 7 /AntiVir Guard | Possible maybe yes, but very far from probable.
EMG |
Compiling WINDOWS 7 /AntiVir Guard | Hello Enrico, hello james,
I will send the file to AntiVir Guard.
But today the warning only appeared once and I missed to save the output – file.
Best regards,
Otto |
Compiling erp2.prg (test tDolphin) | Hello ,
FWH1305
Using buildh.bat the aplication is built , but
"Cannot start the aplication (0xc000007b) ..."
Frank |
Compiling erp2.prg (test tDolphin) | usualmente cuando la version de la dll libmysql.dll con la libreria extraida de la misma no corresponden en su version.
deberas extraer la lib con implib.exe
salu2
carlos vargas |
Compiling parameters | AntonioAre there any parameters to warn undefined variables just like -w used to do in old clipper compiler?John Regards |
Compiling parameters | Just call Harbour.exe without parameters and you will see all the available parameters:/w[<level>] set warning level number (0..3, default 1) |
Compiling problem - SOLVED | Hello Antonio
I followed all notes in <!-- m --><a class="postlink" href="http://www.fivetechsoft.com/wiki/doku.php?id=fivelinux_installation">http://www.fivetechsoft.com/wiki/doku.p ... stallation</a><!-- m -->
when I try to compile I have this error [code=fw:cu0zy3bq]<div class="fw" id="{CB}" style="font-family: monospace;">compiling...<br />Harbour <span style="color: #000000;">2.1</span>.0rc2 <span style="color: #000000;">(</span>Rev. <span style="color: #000000;">16643</span><span style="color: #000000;">)</span><br />Copyright <span style="color: #000000;">(</span>c<span style="color: #000000;">)</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2011</span>, http:<span style="color: #B900B9;">//harbour-project.org/</span><br />Compiling <span style="color: #ff0000;">'tutor01.prg'</span>...<br />Lines <span style="color: #000000;">1114</span>, Functions/Procedures <span style="color: #000000;">1</span><br />Generating C source output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'tutor01.c'</span>... Done.<br />compiling C module...<br />linking...<br />./../lib/libfivec.a<span style="color: #000000;">(</span>buttons.o<span style="color: #000000;">)</span>: <span style="color: #000000;">In</span> <span style="color: #00C800;">function</span> `HB_FUN_CREATEBUTTON<span style="color: #ff0000;">':<br />buttons.c:(.text+0x2f): undefined reference to `gtk_button_new_from_stock'</span><br />buttons.c:<span style="color: #000000;"><span style="color: #000000;">(</span></span>.<span style="color: #0000ff;">text</span>+0x265<span style="color: #000000;">)</span>: <span style="color: #000000;">undefined</span> reference <span style="color: #0000ff;">to</span> `g_type_check_instance_cast<span style="color: #ff0000;">'<br />buttons.c:(.text+0x270): undefined reference to `g_list_last'</span><br /> </div>[/code:cu0zy3bq]
MAurizio |
Compiling problem - SOLVED | <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=21060#p21060">viewtopic.php?p=21060#p21060</a><!-- l --> |
Compiling problem with xharbour 1.2.1 (6717) | Hi all,
with the last 1.2.1 (6717) xharbour version there are problems with static declaration on the head of the prg:
[color=#FF0000:28zsozm0]k:\XHARBOUR\Bin\Harbour.Exe K:\ACTIVEXP\SOURCE\ACTIVE.PRG -m -n -es2 -ik:\XHARBOUR\Include -dHB_API_MACROS -dHB_FM_STATISTICS_OFF -dHB_STACK_MACROS -ik:\XHARBOUR\Contrib\What32\Include;k:\fwh\include -oK:\ACTIVEXP\Obj\ACTIVE.c
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6717)
Copyright 1999-2010, <!-- m --><a class="postlink" href="http://www.xharbour.org">http://www.xharbour.org</a><!-- m --> <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m -->
Compiling 'K:\ACTIVEXP\SOURCE\ACTIVE.PRG'...
k:\fwh\include\FiveWin.ch(441) Error E0001 Statement not allowed outside of procedure or function
K:\ACTIVEXP\SOURCE\ACTIVE.PRG(17) Error E0004 STATIC declaration follows executable statement
K:\ACTIVEXP\SOURCE\ACTIVE.PRG(18) Error E0004 STATIC declaration follows executable statement
3 errors
No code generated[/color:28zsozm0]
This is my prg:
#include "FiveWin.ch"
#include "UrlLink.ch"
#include "menu.ch"
#define SRCPAINT 15597702 // 0xEE0086
#define SRCAND 8913094
#DEFINE CLOCK_ON "Shows the clock at the MsgBar..."
#DEFINE CLOCK_OFF "Hides the clock at the MsgBar..."
#DEFINE DATE_ON "Shows the Date at the MsgBar..."
#DEFINE DATE_OFF "Hides the Date at the MsgBar..."
#DEFINE KEYB_ON "Shows the Keyboard status at the MsgBar..."
#DEFINE KEYB_OFF "Hides the KeyBoard status at the MsgBar..."
STATIC oDlg,oBmp,oBar,ownd
static oToolBar
FUNCTION Main()
ownd:=0
set exact on
..
.
..
Any ideas ? |
Compiling problem with xharbour 1.2.1 (6717) | These are the lines 440 and 441 in fivewin.ch:
[code=fw:1ya40gem]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*----------------------------------------------------------------------------//<br />!short: COMBOBOX */</span><br /> </div>[/code:1ya40gem]
Please substitute these two lines with two blank lines and try. |
Compiling problem with xharbour 1.2.1 (6717) | Hi, this problem is solved with thanks.
I am trying BCC 558 and the lib UUID.LIB seems isn't included in this BCC version, any ideas ?
Thanks in advance.
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Fatal: Unable to open file 'UUID.LIB' |
Compiling problem with xharbour 1.2.1 (6717) | solved |
Compiling roundrec.c for harbour | Converting a big application to harbour i have problems with :
roundrec.c
[code=fw:i7pbfu59]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/* TSLines Class, rounded rectangle paint routine<br /> Author: Manuel Mercado<br /> January 1st, 2002 */</span><br /><br /><span style="color: #00D7D7;">#define</span> __HARBOUR__<br /><br /><span style="color: #00D7D7;">#include</span> <WinTen.h><br /><span style="color: #00D7D7;">#include</span> <Windows.h><br /><span style="color: #00D7D7;">#include</span> <ClipApi.h><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br />#ifndef __HARBOUR__<br /> CLIPPER RECTROUND<span style="color: #000000;">(</span> PARAMS <span style="color: #000000;">)</span> <span style="color: #B900B9;">// ( hDC, nLeft, nTop, nRight, nBottom,</span><br /> <span style="color: #B900B9;">// nWidth, nHeight )</span><br />#else<br /> HARBOUR HB_FUN_RECTROUND<span style="color: #000000;">(</span> PARAMS <span style="color: #000000;">)</span><br />#endif<br /><br /><span style="color: #000000;">{</span><br /> _retl<span style="color: #000000;">(</span> RoundRect<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HDC <span style="color: #000000;">)</span> _parni<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, _parni<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>, _parni<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>, _parni<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>,<br /> _parni<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span>, _parni<span style="color: #000000;">(</span> <span style="color: #000000;">6</span> <span style="color: #000000;">)</span>, _parni<span style="color: #000000;">(</span> <span style="color: #000000;">7</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /><span style="color: #000000;">}</span><br /> </div>[/code:i7pbfu59]
Errors :
Error E2238 B:\HB31\Include\clipdefs.h 84: Multiple declaration for 'WORD'
Error E2344 B:\BCC582\Include\windef.h 155: Earlier declaration of 'WORD'
Error E2238 B:\HB31\Include\clipdefs.h 86: Multiple declaration for 'PWORD'
Error E2344 B:\BCC582\Include\windef.h 164: Earlier declaration of 'PWORD'
Error E2238 B:\HB31\Include\clipdefs.h 106: Multiple declaration for 'BOOL'
Error E2344 B:\BCC582\Include\windef.h 153: Earlier declaration of 'BOOL'
Error E2238 B:\HB31\Include\clipdefs.h 109: Multiple declaration for 'PBOOL'
Error E2344 B:\BCC582\Include\windef.h 158: Earlier declaration of 'PBOOL'
Error E2238 B:\HB31\Include\clipdefs.h 118: Multiple declaration for 'HANDLE'
Error E2344 B:\BCC582\Include\winnt.h 335: Earlier declaration of 'HANDLE' |
Compiling roundrec.c for harbour | [code=fw:154mpsan]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> ROUNDRECT <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> hb_retl<span style="color: #000000;">(</span> RoundRect<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> HDC <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>, hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>, hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>, hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>,<br /> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">5</span> <span style="color: #000000;">)</span>, hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">6</span> <span style="color: #000000;">)</span>, hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">7</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /><span style="color: #000000;">}</span><br /> </div>[/code:154mpsan] |
Compiling roundrec.c for harbour | Antonio ,
Thanks , but still warnings :
Warning W8065 roundrec.c 15: Call to function 'hb_parnl' with no prototype in function HB_FUNC
Warning W8065 roundrec.c 16: Call to function 'hb_parnl' with no prototype in function HB_FUNC
Warning W8070 roundrec.c 17: Function should return a value in function HB_FUNC
Warning W8057 roundrec.c 17: Parameter 'ROUNDRECT' is never used in function HB_FUNC
HB_FUNC( ROUNDRECT )
{
hb_retl( RoundRect( ( HDC ) hb_parnl( 1 ), hb_parnl( 2 ), hb_parnl( 3 ), hb_parnl( 4 ),
hb_parnl( 5 ), hb_parnl( 6 ), hb_parnl( 7 ) ) ) ;
} |
Compiling roundrec.c for harbour | It seems as you have not included #include <hbapi.h>
is it in scope when you compile ? |
Compiling roundrec.c for harbour | Antonio ,
I had also an external .
I downloaded TsButtun and now it is ok.
The batch-file to build the lib must be changed (missing a prg-file )
Frank |
Compiling tDolphin | I'm trying to compile tDolphin for xHARBOR using SETENVX.BAT but it has error 2 in win-make. Has anyone ever experienced this?
Thanks |
Compiling tDolphin | Qual erro ? |
Compiling tDolphin | I gave up using |
Compiling under Vista | Dear friends,
I did my first steps compiling a project with xHarbour and BCC under Vista. If i use only the standard lib of FWH, everything works fine, but if i try to link in third party libs (like TWbrowse of Hernan), these lib are not propely linked in and i get a runtime error using the replaced functions.
I´m using xMate for compiling.
Did anyone notice this behavior ?
I compile as administrator, so there should be no problems with rights.
kind regrads
Stefan |
Compiling under Vista | Stefan,
> these lib are not propely linked
why ? what errors or warnings do you get ?
> in and i get a runtime error using the replaced functions.
what runtime error ? |
Compiling under Vista | Antonio,
it´s very curious. I don´t get any errors or warning messages during link.
Example:
If i link the version of hernan´s twbrowse and i´m using a variable declared in this new class i get this error:
error/BASE 1005: message not found: TWBROWSE_LHSCROLL
lHScroll cannot be found in the original TwBrowse class, so the new lib is not linked in. Every new lib, which is replacing functions from the original libs (with the same names) does not seem to work.
This is the trace.log:
*** WARNING! Function: TGRAPH in Module: TGRAPH.PRG is hidden by previously registered Module: TGRAPH.PRG
*** WARNING! Function: TSMTP in Module: tsmtp.prg is hidden by previously registered Module: TSMTP.PRG
*** WARNING! Function: TPOP3 in Module: tpop3.prg is hidden by previously registered Module: TPop3.PRG
*** WARNING! Function: TSOCKET in Module: tsocket.prg is hidden by previously registered Module: TSOCKET.PRG
*** WARNING! Function: MENUBEGIN in Module: PDMENU.PRG is hidden by previously registered Module: PDMENU.PRG
*** WARNING! Function: MENUADDITEM in Module: PDMENU.PRG is hidden by previously registered Module: PDMENU.PRG
*** WARNING! Function: MENUEND in Module: PDMENU.PRG is hidden by previously registered Module: PDMENU.PRG
*** WARNING! Function: LASTMENU in Module: PDMENU.PRG is hidden by previously registered Module: PDMENU.PRG
*** WARNING! Function: LASTITEMPOS in Module: PDMENU.PRG is hidden by previously registered Module: PDMENU.PRG
*** WARNING! Function: TMENU in Module: MENU.PRG is hidden by previously registered Module: MENU.PRG
*** WARNING! Function: MEMOEDIT in Module: memoedit.prg is hidden by previously registered Module: MemoEdit.PRG
*** WARNING! Function: GETNEW in Module: tgetint.prg is hidden by previously registered Module: TCLIPGET.PRG
The link order should be ok
.....
d:\Borland\BCC55\Lib\C0W32.OBJ, +
D:\Projekte\WIN\WT\bin\Wt32.Exe, +
D:\Projekte\WIN\WT\Debug\Wt32.Map, +
D:\FwH\LIBx\XP_Menu.Lib +
D:\FWH\Libx\TwBrw32x.LIB +
D:\FwH\LIBx\Tsbrw613.LIB +
D:\FwH\LIBx\FwTools32.Lib +
D:\FwH\LIBx\SButtonX.LIB +
D:\FWH\lib\Fivehx.lib +
D:\FWH\lib\Fivehc.lib +
d:\xHARBOUR71\Lib\rtl.lib +
....
kind regards
Stefan |
Compiling under Vista | It´s seems this behavior does only occur in projects with more than 20 or 25 source files. Smaller projects or little samples are working fine.
Maybe the linker of bcc has problems under vista with to many files.
BTW, i made these tests on two different pc´s with vista business to exclude problems with the pc or vista installation.
kind regards
Stefan |
Compiling under Vista | Stefan,
You may rename Hernan browse as Class THBrowse, so there are no conflicts with FWH Class TWBrowse |
Compiling under Vista | Antonio,
yes, that would be a workaround, but would not solve the problem. And, besides a lot work (i´m replacing the menu system,too, and some other functions), this would cancel the possibility of replacing functions just by linking the changed modul.
Another point is that it´s working under XP and though it´s a 1:1 copy there are errors under Vista.
I will do some further investigations and report the results here.
kind regards
Stefan |
Compiling under Vista | Ok, I did some tests over the weekend.
It really seemes to depend on the number of prg files you use. The magical number is in my case 24. With more than 24 prg files linking does not work correctly. No matter what size the files have, only the number of files is important.
Please, can anyone confirm this behaviour ?
I´m using the bcc55 compiler
kind regards
Stefan |
Compiling using hbmk2 | Steps I did to allow me to compile fwh\samples using hbmk2
[b:2tt0sz5p]i.[/b:2tt0sz5p] Ensure there's only 1 C compiler along my path and it's the one I want to use. Add harbour's path too.
[b:2tt0sz5p]ii.[/b:2tt0sz5p] Copy fwh.hbc below to the root of FWH (modified from fwh.hbc found at harbour\utils\hbmk2\examples)
[code=fw:2tt0sz5p]<div class="fw" id="{CB}" style="font-family: monospace;">#<br /># $Id: <span style="color: #000000;">fwh</span>.hbc <span style="color: #000000;">11227</span> <span style="color: #000000;">2009</span><span style="color: #000000;">-06</span><span style="color: #000000;">-05</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">55</span>:43Z vszakats $<br />#<br /><br /># Copy this file <span style="color: #0000ff;">to</span> FWH root dir and include it in hbmk2<br /># command line <span style="color: #0000ff;">to</span> build an app:<br /># > hbmk2 test.prg C:\fwh\fwh.hbc<br /><br />xhb.hbc<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>incpaths=include<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libpaths=lib<br /><br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>gt=gtgui<br /><br /><br /><span style="color: #000000;">{</span>msvc<span style="color: #000000;">}</span>libs=fivehm fivehcm xhb<br /><span style="color: #000000;">{</span>allmingw<span style="color: #000000;">}</span>libs=fivehg fivehgc xhb<br /><span style="color: #000000;">{</span>bcc<span style="color: #000000;">}</span>libs=fiveh fivehc xhb<br /><br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=comctl32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=comdlg32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=gdi32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbcplr<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbct<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbmzip<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbpcre<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbsqlit3<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbtip<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbwin<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbzlib<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=msimg32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=odbc32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=ole32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=oleaut32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=user32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=uuid<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=vfw32<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=winmm<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=winspool<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=wsock32</div>[/code:2tt0sz5p]
Note that the above .hbc doesn't contain harbour core libraries. Do not add it in as it's added by hbmk2 automatically.
[b:2tt0sz5p]iii.[/b:2tt0sz5p] In fwh\samples, I created the following batch file, -.bat
[code=fw:2tt0sz5p]<div class="fw" id="{CB}" style="font-family: monospace;">hbmk2 %<span style="color: #000000;">1</span> %<span style="color: #000000;">2</span> %<span style="color: #000000;">3</span> c:\fwh\fwh.hbc</div>[/code:2tt0sz5p]
So now at command prompt I just need to type:
>- invoice <Enter>
There. Now if I were to change my C compiler, the only thing I should need to do is adjusting the path to the C compiler that I want to use. |
Compiling using hbmk2 | Here's how I build my private library by using hbmk2.
i. Create a mylib.hbp
[code=fw:vfoxlcwj]<div class="fw" id="{CB}" style="font-family: monospace;"><br />-n<br />-omylib<br />-hblib<br />-ic:\fwh\include;c:\harbour\include<br />xhb.hbc<br /><br />a.prg<br />b.c<br />c.prg<br /> </div>[/code:vfoxlcwj]
So later I just do:
>hbmk2 mylib.hbp
I guess a lot of improvement could still be done to how I configure things as I'm still new with using hbmk2 |
Compiling with minigw | Hello Antonio
I'm trying minigw with buildg.bat ( Fw 12.4)
this is my path :
if "%fwh%" == "" set fwh=.\..
set hdir=c:\HB30
set hdirc=%hdir%\bin\harbour.exe
set hlibs=%hdir%\lib\win\mingw
set mingw=C:\hb30\comp\mingw
set path=C:\hb30\comp\mingw\bin
this is the error
??????????????????????????????????????????????????????????????????????????????
? FiveWin for Harbour 12.04 and GCC - Apr. 2012 Harbour development power ??
? (c) FiveTech, 1993-2012 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 ??
???????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????
Compiling...
Harbour 3.0.0 (Rev. 16951)
Copyright (c) 1999-2011, <!-- m --><a class="postlink" href="http://harbour-project.org/">http://harbour-project.org/</a><!-- m -->
Compiling 'ALERT.prg' and generating preprocessed output to 'ALERT.ppo'...
Lines 5272, Functions/Procedures 2
Generating C source output to 'ALERT.c'... Done.
.\..\lib/fivehgc.lib(PROFILE.o):PROFILE.C:(.text+0x5d): undefined reference to `__chkstk_ms'
.\..\lib/fivehgc.lib(PROFILE.o):PROFILE.C:(.text+0x177): undefined reference to `__chkstk_ms'
.\..\lib/fivehgc.lib(C5CNEW.o):C5CNEW.C:(.text+0x63bd): undefined reference to `__chkstk_ms'
collect2: ld returned 1 exit status
* Link errors *
Regards Maurizio |
Compiling with minigw | Maurizio,
Those problems have been solved on FWH 12.06:
[img:g41ecnug]http://img819.imageshack.us/img819/7688/capturevwi.png[/img:g41ecnug] |
Compiling with minigw | Antonio ,
OK with 12.06 works ,
is possible compilink with hbmk2.exe ?
I Try with gccmake.zip
[quote:18uw5g9e]HB:C:\fwh_06\1>go
HB:C:\fwh_06\1>PATH=C:\hb30\comp\mingw\bin;C:\hb30\comp\mingw\bin;C:\hb30\comp\mingw\bin;C:\hb30\comp\mingw\bin;C:\MinGW\bin;C:\
MinGW\bin;C:\MinGW\bin;C:\hb30\comp\mingw\bin
HB:C:\fwh_06\1>if not exist obj md obj
HB:C:\fwh_06\1>win-make -ftest.mak
if not exist obj mkdir obj
c:\HB30\bin\harbour.exe one.prg -oobj/one.c -n -Ic:\HB30\include -Ic:\fwh_06\include
Harbour 3.0.0 (Rev. 16951)
Copyright (c) 1999-2011, <!-- m --><a class="postlink" href="http://harbour-project.org/">http://harbour-project.org/</a><!-- m -->
Compiling 'one.prg'...
Lines 3874, Functions/Procedures 1
Generating C source output to 'obj/one.c'... Done.
if not exist obj mkdir obj
c:\HB30\bin\harbour.exe two.prg -oobj/two.c -n -Ic:\HB30\include -Ic:\fwh_06\include
Harbour 3.0.0 (Rev. 16951)
Copyright (c) 1999-2011, <!-- m --><a class="postlink" href="http://harbour-project.org/">http://harbour-project.org/</a><!-- m -->
Compiling 'two.prg'...
Lines 3, Functions/Procedures 1
Generating C source output to 'obj/two.c'... Done.
gcc -c -oobj/one.o -Ic:\HB30\include obj/one.c
gcc -c -oobj/two.o -Ic:\HB30\include obj/two.c
gcc -c -oobj/three.o -Ic:\HB30\include three.c
if not exist one.rc C:\hb30\comp\mingw\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o \
-Wall -s -mwindows -LC:\hb30\comp\mingw\lib -Lc:\HB30\lib\win\mingw -Lc:\fwh_06\lib -mno-cygwin -Wl,--start-group -lfivehg -lfiv
ehgc -lgtgui -ldll -lsocket -luser32 -lwinspool -lcomctl32 -lcomdlg32 -lgdi32 -lole32 -loleaut32 -luuid -lwinmm -lvfw32 -lwsock3
2 -lmsimg32 -llibhbbtree -lhbclipsm -lhbcommon -lhbcpage -lhbcplr -lhbct -lhbcurl -lhbfbird -lhbgd -lhbhpdf -lhbhsx -lhblang -lh
bmacro -lhbmainstd -lhbmisc -lhbmsql -lhbmysql -lmysqldll -lhbmzip -lhbnf -lhbodbc -lodbc32 -lhbpcre -lhbpgsql -lhbpp -lhbrdd -l
hbrtl -lhbsix -lhbsqlit3 -lhbtip -lhbusrrdd -lhbvm -lhbvpdf -lhbw32 -lhbzlib -lrddado -lrddads -lrddcdx -lrddfpt -lrddntx -lxhb
-Wl,--end-group
c:/hb30/comp/mingw/bin/../lib/gcc/mingw32/4.5.2-dw2/../../../../mingw32/bin/ld.exe: cannot find -ldll
c:/hb30/comp/mingw/bin/../lib/gcc/mingw32/4.5.2-dw2/../../../../mingw32/bin/ld.exe: cannot find -lsocket
c:/hb30/comp/mingw/bin/../lib/gcc/mingw32/4.5.2-dw2/../../../../mingw32/bin/ld.exe: cannot find -llibhbbtree
c:/hb30/comp/mingw/bin/../lib/gcc/mingw32/4.5.2-dw2/../../../../mingw32/bin/ld.exe: cannot find -lhbmsql
c:/hb30/comp/mingw/bin/../lib/gcc/mingw32/4.5.2-dw2/../../../../mingw32/bin/ld.exe: cannot find -lmysqldll
c:/hb30/comp/mingw/bin/../lib/gcc/mingw32/4.5.2-dw2/../../../../mingw32/bin/ld.exe: cannot find -lhbvpdf
c:/hb30/comp/mingw/bin/../lib/gcc/mingw32/4.5.2-dw2/../../../../mingw32/bin/ld.exe: cannot find -lhbw32
c:/hb30/comp/mingw/bin/../lib/gcc/mingw32/4.5.2-dw2/../../../../mingw32/bin/ld.exe: cannot find -lrddado
collect2: ld returned 1 exit status
win-make: *** [test.exe] Error 1
HB:C:\fwh_06\1>
[/quote:18uw5g9e]
Maurizio |
Compiling with minigw | Maurizio,
This is the closer I have just tried:
set path=c:\mingw\bin
c:\harbour\bin\hbmk2 tutor02 -compiler=mingw -ic:\fwh\include -lfivehg.a -lfivehgc.a -lhbwin.a -Lc:\fwh\lib
I understand that hbmk2 is easy, but its sources are really complex in case that it may not work as desired...
I do prefer FWH buildg.bat, much simpler and easy to modify |
Compiling with minigw | Thank Antonio ,
I also prefer to use FWH buildg.bat
but with FWH\makes\gccmake.zip and win-make.exe I have the errors above
Maurizio |
Compiling with minigw | Maurizio,
This Makefile seems to be working fine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[code=fw:13z8ow3f]<div class="fw" id="{CB}" style="font-family: monospace;"># gcc make example <span style="color: #00C800;">for</span> Windows, developed by FiveTech Software<br /><br />hdir=c:\harbour<br />hdirc=$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\bin\harbour.exe<br />hlibs=$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\lib\gcc<br />fwh=c:\fwh<br />mingw=c:\mingw<br />fwfiles=-lfivehg -lfivehgc<br />winfiles=-luser32 -lwinspool -lkernel32 -lcomctl32 -lcomdlg32 -lgdi32 -lgdiplus -lole32 -loleaut32 -lpsapi -loledlg -lmfcuia32 -lmsimg32 -lwin32k -lstdc++ -lversion -luuid -lwinmm -lvfw32 -lwsock32<br />hbfiles=-lhbcommon -lhbcpage -lhbcplr -lhbct -lhbhpdf \<br /> -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmisc -lhbmzip \<br /> -lhbnf -lhbodbc -lodbc32 -lhbpcre -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 \<br /> -lhbtip -lhbusrrdd -lhbvm -lhbwin -lhbzlib -lrddcdx -lrddfpt -lrddntx -lxhb<br />libraries=$<span style="color: #000000;">(</span>winfiles<span style="color: #000000;">)</span> $<span style="color: #000000;">(</span>fwfiles<span style="color: #000000;">)</span> -lgtgui $<span style="color: #000000;">(</span>hbfiles<span style="color: #000000;">)</span><br />libspath=-L$<span style="color: #000000;">(</span>mingw<span style="color: #000000;">)</span>\lib -L$<span style="color: #000000;">(</span>hlibs<span style="color: #000000;">)</span> -L$<span style="color: #000000;">(</span>fwh<span style="color: #000000;">)</span>\lib<br /><br />all : <span style="color: #000000;">test</span>.exe<br /> test.exe<br /><br />PRG_OBJS = ./obj/one.c \<br /> ./obj/two.c<br /><br />C_OBJS = ./obj/one.o \<br /> ./obj/two.o \<br /> ./obj/three.o<br /><br />test.exe : $<span style="color: #000000;">(</span>PRG_OBJS<span style="color: #000000;">)</span> $<span style="color: #000000;">(</span>C_OBJS<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> not exist one.rc $<span style="color: #000000;">(</span>mingw<span style="color: #000000;">)</span>\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o \<br /> -Wall -s -mwindows $<span style="color: #000000;">(</span>libspath<span style="color: #000000;">)</span> -mno-cygwin -Wl,--start-group $<span style="color: #000000;">(</span>libraries<span style="color: #000000;">)</span> -Wl,--end-group<br /> <span style="color: #00C800;">if</span> exist one.rc $<span style="color: #000000;">(</span>mingw<span style="color: #000000;">)</span>\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o _one.o \<br /> -Wall -s $<span style="color: #000000;">(</span>libspath<span style="color: #000000;">)</span> -mno-cygwin -Wl,--start-group $<span style="color: #000000;">(</span>libraries<span style="color: #000000;">)</span> -Wl,--end-group<br /><br />./obj/%.c : %.prg<br /> <span style="color: #00C800;">if</span> not exist obj mkdir obj<br /> $<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\bin\harbour.exe $< -o$@ -n -I$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\include -I$<span style="color: #000000;">(</span>fwh<span style="color: #000000;">)</span>\include<br /> <br />./obj/%.o : ./obj/%.c<br /> $<span style="color: #000000;">(</span>mingw<span style="color: #000000;">)</span>\bin\gcc -c -o$@ -I$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\include $< <br /> <br />./obj/%.o : %.c<br /> gcc -c -o$@ -I$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\include $< <br /> </div>[/code:13z8ow3f] |
Compiling with minigw | I have been using hbmk2 from a nightly build downloaded from harbour site with no problem.
Version: Harbour 3.2.0dev (Rev. 17445)
Compiler: MinGW GNU C 4.6.1 (32-bit)
I use a simple .bat file.
[code=fw:31qim33x]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SET PATH=e:\hb32\comp\mingw;e:\hb32\bin\;C:\WINDOWS;C:\WINDOWS\SYSTEM32<br />hbmk2 -inc -ldflag=<span style="color: #000000;">{</span>allgcc<span style="color: #000000;">}</span>-Wl,--allow-multiple-definition -ic:\fwh\include -iincludes vav.hbm c:\fwh\fwhgc.hbc<br /> </div>[/code:31qim33x]
where includes is a directory of my application directory.
vav.hbm
[code=fw:31qim33x]<div class="fw" id="{CB}" style="font-family: monospace;"><br />C:\PROJETOS\VAVLOG\SOURCES\VAV.PRG<br />C:\PROJETOS\VAVLOG\SOURCES\VAV_PRV.PRG<br />C:\PROJETOS\VAVLOG\SOURCES\VAV_PRN.PRG<br />... all prgs<br />C:\PROJETOS\VAVLOG\RES\VAV.RES <br /> </div>[/code:31qim33x]
fwhgc.hbc
[code=fw:31qim33x]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libpaths=lib<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>incpaths=include<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>gt=gtgui<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=kernel32 comctl32 comdlg32 gdi32 ole32 oleaut32 psapi msimg32 win32k oledlg stdc++ mfcuia32 version uuid winmm vfw32 wsock32 gcc<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=hbwin hbct xhb hbmemio hbmisc png hbtip<br /><span style="color: #000000;">{</span>win<span style="color: #000000;">}</span>libs=fivehg fivehgc<br /> </div>[/code:31qim33x]
I use hbmk2 with BCC582 and MSVC too. |
Compiling with minigw | André,
Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Compiling with minigw | Hello Antonio ,
with these changes your make works
[code=fw:1cp1l695]<div class="fw" id="{CB}" style="font-family: monospace;"># gcc make example <span style="color: #00C800;">for</span> Windows, developed by FiveTech Software<br /><br /><br />hdir=c:\HB30<br />hdirc=$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\bin<br />hlibs=$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\lib\win\mingw<br />fwh=c:\fwh_06<br />mingw=C:\hb30\comp\mingw<br /><br /><br /><br />fwfiles=-lfivehg -lfivehgc<br />winfiles=-luser32 -lwinspool -lkernel32 -lcomctl32 -lcomdlg32 -lgdi32 -lgdiplus -lole32 -loleaut32 -lpsapi -loledlg -lmfcuia32 -lmsimg32 -lwin32k -lstdc++ -lversion -luuid -lwinmm -lvfw32 -lwsock32<br />hbfiles=-lhbcommon -lhbcpage -lhbcplr -lhbct -lhbhpdf \<br /> -lhbhsx -lhblang -lhbmacro -lhbmainstd -lhbmisc -lhbmzip \<br /> -lhbnf -lhbodbc -lodbc32 -lhbpcre -lhbpp -lhbrdd -lhbrtl -lhbsix -lhbsqlit3 \<br /> -lhbtip -lhbusrrdd -lhbvm -lhbwin -lhbzlib -lrddcdx -lrddfpt -lrddntx -lxhb<br />libraries=$<span style="color: #000000;">(</span>winfiles<span style="color: #000000;">)</span> $<span style="color: #000000;">(</span>fwfiles<span style="color: #000000;">)</span> -lgtgui $<span style="color: #000000;">(</span>hbfiles<span style="color: #000000;">)</span><br />libspath=-L$<span style="color: #000000;">(</span>mingw<span style="color: #000000;">)</span>\lib -L$<span style="color: #000000;">(</span>hlibs<span style="color: #000000;">)</span> -L$<span style="color: #000000;">(</span>fwh<span style="color: #000000;">)</span>\lib<br /><br />all : <span style="color: #000000;">test</span>.exe<br /> test.exe<br /><br />PRG_OBJS = ./obj/one.c \<br /> ./obj/two.c<br /><br />C_OBJS = ./obj/one.o \<br /> ./obj/two.o \<br /> ./obj/three.o<br /><br />test.exe : $<span style="color: #000000;">(</span>PRG_OBJS<span style="color: #000000;">)</span> $<span style="color: #000000;">(</span>C_OBJS<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> not exist one.rc $<span style="color: #000000;">(</span>mingw<span style="color: #000000;">)</span>\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o \<br /> -Wall -s -mwindows $<span style="color: #000000;">(</span>libspath<span style="color: #000000;">)</span> -mno-cygwin -Wl,--start-group $<span style="color: #000000;">(</span>libraries<span style="color: #000000;">)</span> -Wl,--end-group<br /> <span style="color: #00C800;">if</span> exist one.rc $<span style="color: #000000;">(</span>mingw<span style="color: #000000;">)</span>\bin\gcc -otest.exe ./obj/one.o ./obj/two.o ./obj/three.o _one.o \<br /> -Wall -s $<span style="color: #000000;">(</span>libspath<span style="color: #000000;">)</span> -mno-cygwin -Wl,--start-group $<span style="color: #000000;">(</span>libraries<span style="color: #000000;">)</span> -Wl,--end-group<br /><br />./obj/%.c : %.prg<br /> <span style="color: #00C800;">if</span> not exist obj mkdir obj<br /> $<span style="color: #000000;">(</span>hdirc<span style="color: #000000;">)</span>\harbour.exe $< -o$@ -n -I$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\include -I$<span style="color: #000000;">(</span>fwh<span style="color: #000000;">)</span>\include<br /> <br />./obj/%.o : ./obj/%.c<br /> gcc -c -o$@ -I$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\include $< <br /> <br />./obj/%.o : %.c<br /> gcc -c -o$@ -I$<span style="color: #000000;">(</span>hdir<span style="color: #000000;">)</span>\include $< </div>[/code:1cp1l695]
Thanks
Hello André
Now I will try your nmake
Thanks |
Compiling with minigw | Maurizio,
Yes, you have to set your own paths into it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Compiling with minigw | Antonio
in your make the problems are :
hdirc=$(hdir)\bin\harbour.exe
you have to change in
hdirc=$(hdir)\bin
in the FWH LIB for minigw missing some function :
TWEBCAM()
MAPILOGOFF()
MAPISENDMAIL()
Thanks MAurizo |
Compiling with minigw | Antonio ,
do you cann try FHW\samples\TESTMAIL.PRG ? does't work .
Maurizio |
Compiling with minigw | Maurizio,
I am emailing you a modified Fivehcg.lib, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Compiling xHarbour Oct 2006 on Windows 7 32 bit | When I attempt to compile an xharbour / Fivewin for xHarbour app on me Windows 7 32 bit laptop I get this error.
Type: C >>>xhb.exe -o"EtExcel.c" -m -n -p -q -gc0 -I"C:\fwh\include" -I"c:\xhb\include" -I"c:\xhb\include\w32" "EtExcel.prg"<<<
Type: C >>>Couldn't build: EtExcel.obj<<<
Anyone know how to correct this, works fine on my Windows XP workstation. |
Complejidad ciclomatica | La semana pasada fui a una charla, y me enseñaron una herramienta, sonar, <!-- m --><a class="postlink" href="http://www.sonarsource.org/">http://www.sonarsource.org/</a><!-- m --> ,que entre otras cosas nos indica la complejidad ciclomática del software, <!-- m --><a class="postlink" href="https://es.wikipedia.org/wiki/Complejidad_ciclom%C3%A1tica">https://es.wikipedia.org/wiki/Complejid ... %C3%A1tica</a><!-- m -->
¿ Alguien usa/usado alguna herramienta para aplicarla a Harbour ? |
Complejidad ciclomatica | Rafa,
La primera vez que lo veo pero tambien me parece muy interesante, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Has conseguido usar el software Sonar ? |
Complemento .... Manejando CDROM | En vista que no hubo respuesta al requerimiento de trozo de codigo para manejar un CDROM, hago otra pregunta.... ¿Conoce alguien una aplicaciòn que me permita ver el interior de las DLL que vienen con Windows? Me parece que debo buscar dentro de las rutinas del Windows para ver què modulos contienen y, de ser posible, ver què rutinas se debe utilizar para manejar el CDROM. Acepto sugerencias de cualquier tipo! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
Complemento .... Manejando CDROM | Armando Picon,
La ExplorerLib de Andrés Reyes te servirá.
codigo-base.blogspot.com
saludos |
Complemento .... Manejando CDROM | Me parece, que talvez usando el objeto WMI encuentres ayuda,
WMI nos permite obtener informacion sobre casi cualquier cosa de windows
podria buscar informacion de "unidades de discos que sean de tipo unidad optica no removibles".
las consultas son incluso tipo consultas SQL (te dejo un ejemplo).
busca en el foro como crear un objeto WMI, luego en google como buscar x tipo de dispositivo usando ese objeto WMI.
Muchos de los ejemplos de google son con Visual Basic Script, pero son facilmente convertidos a sintaxis xbase.
ejemplo:
[code=fw:8lm8hc2o]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oWMI := CreateObject <span style="color: #000000;">(</span><span style="color: #ff0000;">"wbemScripting.SwbemLocator"</span><span style="color: #000000;">)</span><br />oWMICon := oWMI:<span style="color: #000000;">ConnectServer</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br />oADSServ := oWMICon:<span style="color: #000000;">ExecQuery</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Select * from Win32_Service where DisplayName = 'Advantage Database Server'"</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">IF</span> oADSServ:<span style="color: #000000;">State</span> == <span style="color: #ff0000;">"Stopped"</span><br /><br />oADSServ:<span style="color: #000000;">StartService</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #B900B9;">//NOTA:ejemplo tomado de Objeto Persitente</span><br /> </div>[/code:8lm8hc2o]
Esta Direccion te lleva al MSDN
[url:8lm8hc2o]http://msdn.microsoft.com/en-us/library/aa394582%28VS.85%29.aspx[/url:8lm8hc2o] |
Complemento .... Manejando CDROM | [quote="wmormar":2h0jefsw]Armando Picon,
La ExplorerLib de Andrés Reyes te servirá.
codigo-base.blogspot.com
saludos[/quote:2h0jefsw]
He probado la aplicaciòn de Andrès y solamente opera con .LIB y no con .DLL |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.