Page 2 of 3
Re: Antonio: Differences between BORLAND and VCC
Posted: Thu May 17, 2018 1:59 pm
by Enrico Maria Giordano
Rick Lipkin wrote:I would appreciate if anyone has a batch file ( like buildxm.bat ) to be able to compile tutor01.prg
What problem did you get using buildxm.bat?
EMG
Re: Antonio: Differences between BORLAND and VCC
Posted: Thu May 17, 2018 8:06 pm
by Rick Lipkin
Enrico
I gave up on MSVC .... here was the last test before I gave up ... this how I modified my batch file:
Code: Select all | Expand
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour 14.09 (MSVC++) Sep. 2014 Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2014 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
ECHO Compiling...
set hdir=c:\xharbourM
set vcdir=c:\msvc2017
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\lib;%lib%
rem @set fwh=%FWDIR%
rem @set hdir=%HBDIR%
rem @set hdirl=%hdir%\lib
rem set vcdir= c:\vc
rem set vclib=%vcdir%\lib
%hdir%\bin\harbour %1 /n /ic:\Fwh1707\include;%hdir%\include /w /p %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
: mvsc compiler line
%vcdir%\bin\cl.Exe -TP -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.c
:ENDCOMPILE
IF EXIST %1.rc IF EXIST %vcdir%\bin\rc %vcdir%\bin\rc -r -d__FLAT__ %1
IF EXIST %1.rc IF NOT EXIST %1.res rc -r -d__FLAT__ %1
echo %1.obj > msvc.tmp
: fivewin libs
echo c:\Fwh1707\lib\FivehMX.lib c:\fwh1707\lib\FiveHc32.lib >> msvc.tmp
: xHarbourM libs
echo %hdir%\lib\rtl.lib >> msvc.tmp
echo %hdir%\lib\vm.lib >> msvc.tmp
echo %hdir%\lib\gtgui.lib >> msvc.tmp
echo %hdir%\lib\lang.lib >> msvc.tmp
echo %hdir%\lib\macro.lib >> msvc.tmp
echo %hdir%\lib\rdd.lib >> msvc.tmp
echo %hdir%\lib\dbfntx.lib >> msvc.tmp
echo %hdir%\lib\dbfcdx.lib >> msvc.tmp
echo %hdir%\lib\dbffpt.lib >> msvc.tmp
echo %hdir%\lib\hbsix.lib >> msvc.tmp
echo %hdir%\lib\debug.lib >> msvc.tmp
echo %hdir%\lib\common.lib >> msvc.tmp
echo %hdir%\lib\pp.lib >> msvc.tmp
echo %hdir%\lib\pcrepos.lib >> msvc.tmp
echo %hdir%\lib\png.lib >> msvc.tmp
echo %hdir%\lib\ct.lib >> msvc.tmp
rem ... can not find this in xHarbourM
rem echo %hdir%\lib\hbzlib.lib >> msvc.tmp
echo %hdir%\lib\zlib.lib >> msvc.tmp
echo %hdir%\lib\HBMzip.lib >> msvc.tmp
echo %hdir%\lib\HBzip.lib >> msvc.tmp
: msvc libs
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
echo %vcdir%\lib\oledlg.lib >> msvc.tmp
echo %vcdir%\lib\psapi.lib >> msvc.tmp
echo %vcdir%\lib\gdiplus.lib >> msvc.tmp
echo %vcdir%\lib\winmm.lib >> msvc.tmp
echo %vcdir%\lib\libcmt.lib >> msvc.tmp
echo %vcdir%\lib\oldnames.lib >> msvc.tmp
echo %vcdir%\lib\libcpmt.lib >> msvc.tmp
echo %vcdir%\lib\ws2_32.lib >> msvc.tmp
IF EXIST %1.res echo %1.res >> msvc.tmp
%vcdir%\bin\link @msvc.tmp /nologo /NODEFAULTLIB:LIBC /NODEFAULTLIB:msvcrt /force:multiple /nxcompat:NO /subsystem:windows,5.01 /machine:X86 /Ignore:4006 /LIBPATH:c:\Msvc17\lib
rem %vcdir%\bin\link @msvc.tmp /nologo /NODEFAULTLIB:msvcrt /force:multiple /nxcompat:NO /subsystem:windows,5.01 /machine:X86 /Ignore:4006 /LIBPATH:c:\Msvc17\lib
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
@set path=%oldpath%
@set include=%oldinclude%
@set lib=%oldlib%
@set libpath=%oldlibpath%
@set oldpath=""
@set oldinclude=""
@set oldlib=""
@set oldlibpath=""
%1
GOTO EXIT
ECHO
: delete temporary files
@del %1.c
@del msvc.tmp
:COMPILEERROR
@type comp.log
@type warnings.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
Here was the result:
Code: Select all | Expand
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin
for Harbour
14.09 (MSVC++
) Sep.
2014 Harbour development
power ³Ü
³
(c
) FiveTech,
1993-2014 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/
7/
8 ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
xHarbour
1.2.3 Intl.
(SimpLex
) (Build
20180420)Copyright
1999-2018, http:
//www.xharbour.org http://www.harbour-project.org/Compiling
'Tutor01.prg' and generating preprocessed output
to 'Tutor01.ppo'...
Generating C source output
to 'Tutor01.c'...
Done.
Lines
13, Functions/Procedures
1, pCodes
14Tutor01.c
Creating
library Tutor01.lib and object Tutor01.
expTutor01.exe :
warning LNK4088:
image being generated due
to /FORCE option;
image may not run
* Application successfully built *
Msvc.Tmp
Code: Select all | Expand
Tutor01.obj
c:\Fwh1707\lib\FivehMX.lib c:\fwh1707\lib\FiveHc32.lib
c:\xharbourM\lib\rtl.lib
c:\xharbourM\lib\vm.lib
c:\xharbourM\lib\gtgui.lib
c:\xharbourM\lib\lang.lib
c:\xharbourM\lib\macro.lib
c:\xharbourM\lib\rdd.lib
c:\xharbourM\lib\dbfntx.lib
c:\xharbourM\lib\dbfcdx.lib
c:\xharbourM\lib\dbffpt.lib
c:\xharbourM\lib\hbsix.lib
c:\xharbourM\lib\debug.lib
c:\xharbourM\lib\common.lib
c:\xharbourM\lib\pp.lib
c:\xharbourM\lib\pcrepos.lib
c:\xharbourM\lib\png.lib
c:\xharbourM\lib\ct.lib
c:\xharbourM\lib\zlib.lib
c:\xharbourM\lib\HBMzip.lib
c:\xharbourM\lib\HBzip.lib
c:\msvc2017\lib\kernel32.lib
c:\msvc2017\lib\user32.lib
c:\msvc2017\lib\gdi32.lib
c:\msvc2017\lib\winspool.lib
c:\msvc2017\lib\comctl32.lib
c:\msvc2017\lib\comdlg32.lib
c:\msvc2017\lib\advapi32.lib
c:\msvc2017\lib\shell32.lib
c:\msvc2017\lib\ole32.lib
c:\msvc2017\lib\oleaut32.lib
c:\msvc2017\lib\uuid.lib
c:\msvc2017\lib\odbc32.lib
c:\msvc2017\lib\odbccp32.lib
c:\msvc2017\lib\iphlpapi.lib
c:\msvc2017\lib\mpr.lib
c:\msvc2017\lib\version.lib
c:\msvc2017\lib\wsock32.lib
c:\msvc2017\lib\msimg32.lib
c:\msvc2017\lib\oledlg.lib
c:\msvc2017\lib\psapi.lib
c:\msvc2017\lib\gdiplus.lib
c:\msvc2017\lib\winmm.lib
c:\msvc2017\lib\libcmt.lib
c:\msvc2017\lib\oldnames.lib
c:\msvc2017\lib\libcpmt.lib
c:\msvc2017\lib\ws2_32.lib
Tutor01.res
The resulting Tutor01.exe will not run
Rick Lipkin
Re: Antonio: Differences between BORLAND and VCC
Posted: Thu May 17, 2018 9:52 pm
by Enrico Maria Giordano
Just remove -TP from here:
Code: Select all | Expand
%vcdir%\bin\cl.Exe -TP -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.c
EMG
Re: Antonio: Differences between BORLAND and VCC
Posted: Fri May 18, 2018 12:45 pm
by Enrico Maria Giordano
Rick,
did you try it?
EMG
Re: Antonio: Differences between BORLAND and VCC
Posted: Fri May 18, 2018 6:27 pm
by Rick Lipkin
ENrico
I made the change you suggested .. same result .. Tutor01.exe is created but will not run ..
Code: Select all | Expand
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour 14.09 (MSVC++) Sep. 2014 Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2014 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
rem if "%FWDIR%" == "" set FWDIR=.\..
rem if "%HBDIR%" == "" set HBDIR=c:\xHarbourM
ECHO Compiling...
set hdir=c:\xharbourM
set vcdir=c:\msvc2017
set include=%vcdir%\include;%hdir%\include;%include%
set lib=%vcdir%\lib;%hdir%\lib;%lib%
rem @set fwh=%FWDIR%
rem @set hdir=%HBDIR%
rem @set hdirl=%hdir%\lib
rem set vcdir= c:\vc
rem set vclib=%vcdir%\lib
%hdir%\bin\harbour %1 /n /ic:\Fwh1707\include;%hdir%\include /w /p %2 %3 > comp.log 2> warnings.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type comp.log
@type warnings.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT
: mvsc compiler line
rem %vcdir%\bin\cl.Exe -TP -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.c
%vcdir%\bin\cl.Exe -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.
:ENDCOMPILE
IF EXIST %1.rc IF EXIST %vcdir%\bin\rc %vcdir%\bin\rc -r -d__FLAT__ %1
IF EXIST %1.rc IF NOT EXIST %1.res rc -r -d__FLAT__ %1
echo %1.obj > msvc.tmp
: fivewin libs
echo c:\Fwh1707\lib\FivehMX.lib c:\fwh1707\lib\FiveHc32.lib >> msvc.tmp
: xHarbourM libs
echo %hdir%\lib\rtl.lib >> msvc.tmp
echo %hdir%\lib\vm.lib >> msvc.tmp
echo %hdir%\lib\gtgui.lib >> msvc.tmp
echo %hdir%\lib\lang.lib >> msvc.tmp
echo %hdir%\lib\macro.lib >> msvc.tmp
echo %hdir%\lib\rdd.lib >> msvc.tmp
echo %hdir%\lib\dbfntx.lib >> msvc.tmp
echo %hdir%\lib\dbfcdx.lib >> msvc.tmp
echo %hdir%\lib\dbffpt.lib >> msvc.tmp
echo %hdir%\lib\hbsix.lib >> msvc.tmp
echo %hdir%\lib\debug.lib >> msvc.tmp
echo %hdir%\lib\common.lib >> msvc.tmp
echo %hdir%\lib\pp.lib >> msvc.tmp
echo %hdir%\lib\pcrepos.lib >> msvc.tmp
echo %hdir%\lib\png.lib >> msvc.tmp
echo %hdir%\lib\ct.lib >> msvc.tmp
rem ... can not find this in xHarbourM
rem echo %hdir%\lib\hbzlib.lib >> msvc.tmp
echo %hdir%\lib\zlib.lib >> msvc.tmp
echo %hdir%\lib\HBMzip.lib >> msvc.tmp
echo %hdir%\lib\HBzip.lib >> msvc.tmp
: msvc libs
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
echo %vcdir%\lib\oledlg.lib >> msvc.tmp
echo %vcdir%\lib\psapi.lib >> msvc.tmp
echo %vcdir%\lib\gdiplus.lib >> msvc.tmp
echo %vcdir%\lib\winmm.lib >> msvc.tmp
echo %vcdir%\lib\libcmt.lib >> msvc.tmp
echo %vcdir%\lib\oldnames.lib >> msvc.tmp
echo %vcdir%\lib\libcpmt.lib >> msvc.tmp
echo %vcdir%\lib\ws2_32.lib >> msvc.tmp
IF EXIST %1.res echo %1.res >> msvc.tmp
%vcdir%\bin\link @msvc.tmp /nologo /NODEFAULTLIB:LIBC /NODEFAULTLIB:msvcrt /force:multiple /nxcompat:NO /subsystem:windows,5.01 /machine:X86 /Ignore:4006 /LIBPATH:c:\Msvc17\lib
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
@set path=%oldpath%
@set include=%oldinclude%
@set lib=%oldlib%
@set libpath=%oldlibpath%
@set oldpath=""
@set oldinclude=""
@set oldlib=""
@set oldlibpath=""
%1
GOTO EXIT
ECHO
: delete temporary files
@del %1.c
@del msvc.tmp
:COMPILEERROR
@type comp.log
@type warnings.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: Select all | Expand
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin
for Harbour
14.09 (MSVC++
) Sep.
2014 Harbour development
power ³Ü
³
(c
) FiveTech,
1993-2014 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/
7/
8 ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
xHarbour
1.2.3 Intl.
(SimpLex
) (Build
20180420)Copyright
1999-2018, http:
//www.xharbour.org http://www.harbour-project.org/Compiling
'tutor01.prg' and generating preprocessed output
to 'tutor01.ppo'...
Generating C source output
to 'tutor01.c'...
Done.
Lines
13, Functions/Procedures
1, pCodes
14cl :
Command line warning D9021 :
no action performed
Creating
library tutor01.lib and object tutor01.
exptutor01.exe :
warning LNK4088:
image being generated due
to /FORCE option;
image may not run
* Application successfully built *
Re: Antonio: Differences between BORLAND and VCC
Posted: Fri May 18, 2018 7:29 pm
by Enrico Maria Giordano
Rick,
you missed a "c":
Code: Select all | Expand
%vcdir%\bin\cl.Exe -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.
EMG
Re: Antonio: Differences between BORLAND and VCC
Posted: Sat May 19, 2018 10:33 am
by byte-one
A new test. As you see, the width and the height of the dialog are 10 pixels higher in MS-VCC. The dialog itself on the screen are exactly the same. Only the capture size is different.
The sizes of the dialogs are different in both cases from the code. See my code above. -> (DEFINE DIALOG oDlg FROM 50, 50 TO 250, 450 PIXEL TITLE "Test" FONT oFont)

Re: Antonio: Differences between BORLAND and VCC
Posted: Sat May 19, 2018 3:01 pm
by Rick Lipkin
Enrick
SUCCESS ... yes, I seemed to have dropped off .c at the end of the link line ...
%vcdir%\bin\cl.Exe -W3 -O2 -nologo -c -GA -GS -EHsc /I%hdir%\include /I%vcdir%\include %1.c
Thank you .. let me see if I can do some tests!
Rick Lipkin
Re: Antonio: Differences between BORLAND and VCC
Posted: Sat May 26, 2018 5:03 pm
by nageswaragunupudi
But the client rect is identical in both cases.
Re: Antonio: Differences between BORLAND and VCC
Posted: Sat May 26, 2018 6:15 pm
by Rick Lipkin
Günther
I tested your code with Bcc73\xHarbour and MSVC2017\xHarbour on Windows 10 Spring Creator Pro 64 bit and got the same result ... here is your code:
Code: Select all | Expand
#Include "FIveWin.ch"
function dlg_test()
local oDlg, oFont, oMemo, oFile, oBtnok, oBtncancel, cFile := space(50), uTemp := " "
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -10
DEFINE DIALOG oDlg FROM 50, 50 TO 250, 450 PIXEL TITLE "Test" FONT oFont
@ 4, 3 GET oMemo VAR uTemp MULTILINE OF oDlg PIXEL SIZE 100, 100 FONT oFont
@ 0, 0 GET oFile VAR cFile OF oDlg PIXEL SIZE 100, 12 FONT oFont
@ 0,0 BUTTON oBtnOk PROMPT "OK" SIZE 46, 13 ACTION oDlg:End()
@ 0,0 BUTTON oBtnCancel PROMPT "&Zurück" SIZE 46, 13 ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
ON INIT ( ;
oMemo:SetSize( oDlg:nWidth() - 17, oDlg:nHeight() - 77 ),;
oMemo:SetSel( 0,0 ), ;
oFile:nTop := oDlg:nHeight() - 64,;
oFile:nLeft := 6,;
oBtnOk:nTop := oDlg:nHeight() - 64,;
oBtnOk:nLeft := oDlg:nWidth() - 197,;
oBtnCancel:nTop := oDlg:nHeight() - 64,;
oBtnCancel:nLeft := oDlg:nWidth() - 104;
)
oFont:End()
return NIL
Here is the result:

I just recently got MSVC2017 working and built your sample with my revised BuildxM.bat ... both results seem identical .. the blue title is because the Borland build was in focus.
Rick Lipkin
ps .. in order to test your code side by side .. I created Gunther1.prg for MSVC2017 and copied the same code to Gunther5.prg for Borland
Re: Antonio: Differences between BORLAND and VCC
Posted: Sun May 27, 2018 1:13 am
by nageswaragunupudi
It is true that the external dimensions of the dialog differ by 10 pixels (both height and width). But the client rect of the dialog is exactly the same in both and also same as the coordintates specified by us while creating the dialog.
So if we position the controls either with absolute coordinates or proportionate to the dimensions we used to create the dialog, the controls in both cases will be placed exactly at the sampe positons inside the dialog. So, this difference does not affect our programming.
Re: Antonio: Differences between BORLAND and VCC
Posted: Mon May 28, 2018 8:37 am
by byte-one
In fact, ::nWidth()/::nHight()/::nWidth/::nHight/::GetRect() differs on both compilers and should not used to calculations for controls!?
Re: Antonio: Differences between BORLAND and VCC
Posted: Tue May 29, 2018 11:22 pm
by nageswaragunupudi
In any case, it is not a good idea to use oDlg:nHeight or oDlg:nWidth for calculating relative position of controls, because these datas give external dimensions. Not client area dimensions.
I personally recommend this way:
local nDlgWidth := 400
local nDlgHeight := 200
DEFINE DIALOG oDlg SIZE nDlgWidth-1, nDlgHeight-1 PIXEL TRUEPIXEL.
Then calculate relative positions of controls with respect to nDlgWidth and nDlgHeight.
Re: Antonio: Differences between BORLAND and VCC
Posted: Wed May 30, 2018 3:02 pm
by byte-one
Thanks, this is no problem to respect!
But i test also ::move(,,nWidth,nHeight) or ::SetSize( nWidth, nHeight). This methods also give differences. (in VCC also the 10 Pixels to small in both directions)
Re: Antonio: Differences between BORLAND and VCC
Posted: Wed May 30, 2018 6:19 pm
by TimStone
I have to admit ... I don't understand why all the different compilers.
I build all code with two options:
1). Older xHabour ( .com version ) with xBuilder ...
2). Preferred option of Visual Studio 2017 Community edition ( MSVCC ) plus Harbour
I only use #1 for those who are using ADS Version 7 or 8 which I can't seem to address with the Harbour libraries. Version 9 and above work great.
So my question is this. Why try to use xHarbour with MSVCC, or use Borland ? What specific advantages do they provide to end users not found using MSVCC plus Harbour with FWH ?
My reason for preferring MS Visual Studio is quite simple. The bottom line is we are interacting with Microsoft Windows 10 ( and if not, you will be ), and obviously VS is built to address that platform. Thus, the fewest complications, and the greatest potential for future features lies with the tools that match the OS the most closely.
Am I missing something here ? I ask, because if all FWH features have to work across a wide variety of compilers, and two versions of the Harbour API ( Harbour, xHarbour ), then do we not slow down progress ?
Could this be part of the reason we are only on 18.03 as we enter are .06 month ?