Discussion:
WVG problem.
Itamar Lins
2010-05-28 14:41:50 UTC
Permalink
Hi!
My desktop is 1280 X 800 pixels.
I am using function:

SCWIDTH:=HB_GTINFO(HB_GTI_SCREENWIDTH, HB_GTINFO(HB_GTI_DESKTOPWIDTH))

scHEIGHT:=HB_GTINFO(HB_GTI_SCREENHEIGHT,HB_GTINFO(HB_GTI_DESKTOPHEIGHT)-50)

msginfo(str(scWIDTH)) //return 640
msginfo(str(scHEIGHT)) //return 400

How to the function to get real 1280 x 800 ?


Best regards,
Itamar M. Lins Jr.
Pritpal Bedi
2010-05-28 15:01:14 UTC
Permalink
Post by Itamar Lins
My desktop is 1280 X 800 pixels.
SCWIDTH:=HB_GTINFO(HB_GTI_SCREENWIDTH, HB_GTINFO(HB_GTI_DESKTOPWIDTH))
scHEIGHT:=HB_GTINFO(HB_GTI_SCREENHEIGHT,HB_GTINFO(HB_GTI_DESKTOPHEIGHT)-50)
msginfo(str(scWIDTH)) //return 640
msginfo(str(scHEIGHT)) //return 400
How to the function to get real 1280 x 800 ?
SCWIDTH:=HB_GTINFO(HB_GTI_SCREENWIDTH) is readonly

scHEIGHT:=HB_GTINFO(HB_GTI_SCREENHEIGHT) is readonly

You cannot set the screenwidth/height of an console.
This can only be done in SetMode() or through font manipulation.




-----
enjoy hbIDEing...
Pritpal Bedi
http://hbide.vouch.info/
--
View this message in context: http://harbour-devel.1590103.n2.nabble.com/WVG-problem-tp5113392p5113445.html
Sent from the harbour-devel mailing list archive at Nabble.com.
Itamar Lins
2010-05-28 15:11:58 UTC
Permalink
Post by Pritpal Bedi
SCWIDTH:=HB_GTINFO(HB_GTI_SCREENWIDTH) is readonly
scHEIGHT:=HB_GTINFO(HB_GTI_SCREENHEIGHT) is readonly
You cannot set the screenwidth/height of an console.
This can only be done in SetMode() or through font manipulation.
Yes.
But the return HB_GTINFO(HB_GTI_SCREENWIDTH) is correct ?
Because my desktop is 1280 pixels and return is 640 :-(

For example:
ANNOUNCE HB_GTSYS
REQUEST HB_GT_GUI
Function Main

...
elseif screenWidth >= 1024 // 1024*760

Hb_GtInfo( HB_GTI_FONTWIDTH, 12.5 )
HB_GTInfo(HB_GTI_FONTSIZE, 20)

elseif screenWidth >= 800

Hb_GtInfo( HB_GTI_FONTWIDTH, 10 )
HB_GTInfo(HB_GTI_FONTSIZE, 18)

ELSE
...

Function HB_GTSYS()
REQUEST HB_GT_WVG_DEFAULT
REQUEST HB_GT_WVT
REQUEST HB_GT_WGU
Return NIL

Not working.

Best regards,
Itamar M. Lins Jr.
Pritpal Bedi
2010-05-28 15:28:54 UTC
Permalink
Hi

A little update, I have examined the sources.

1. These two calls are not readonly. These also sets the SetMode()
depending upon the width and height you supply as pixels. So beware.

2. The correct approach is:

To get the entire screen width/height

nScrWidth := hb_getInfo( HB_GTI_DESKTOPWIDTH )
nScrHeight := hb_gtInfo( HB_GTI_DESKTOPHEIGHT )

and then base your font parameters onto them.

HB_GTI_SCREENWIDTH/HEIGHT gives you, and optionally sets
( which you must not unless you are aware what it will change ), the WVG
console width and height in pixels.


-----
enjoy hbIDEing...
Pritpal Bedi
http://hbide.vouch.info/
--
View this message in context: http://harbour-devel.1590103.n2.nabble.com/WVG-problem-tp5113392p5113581.html
Sent from the harbour-devel mailing list archive at Nabble.com.
Massimo Belgrano
2010-05-28 15:34:44 UTC
Permalink
sorry pritpal but what i miss?
Why not dispay entire row?

I try but in 19

// hbmk2 wvg.prg -gtwvg -gui
REQUEST HB_GT_WVG_DEFAULT
REQUEST HB_GT_WVG
#INCLUDE "HBGTINFO.CH"
function main
set color to "N/W,N/BG,,,N/W*"
cls
SETMODE(25,80)
hb_gtInfo( HB_GTI_ICONFILE, "sample.ico" )
hb_gtInfo( HB_GTI_WINTITLE, "Programm Title" )
Hb_GtInfo( HB_GTI_SELECTCOPY,.T.)
Hb_GtInfo( HB_GTI_RESIZABLE, .T. )
HB_GTINFO( HB_GTI_CLOSABLE, .T. )
HB_GTINFO( HB_GTI_RESIZABLE, .T. )
HB_GTINFO( HB_GTI_CODEPAGE, 255 )
Hb_GTInfo(HB_GTI_MOUSESTATUS, 1 )
screenWidth:= HB_GTINFO( HB_GTI_DESKTOPWIDTH )
screenHEIGHT:=HB_GTINFO( HB_GTI_DESKTOPHEIGHT )
HB_GTInfo(HB_GTI_FONTNAME, "Courier New")
HB_GTInfo(HB_GTI_FONTQUALITY,HB_GTI_FONTQ_HIGH )
if screenWidth >= 1920
Hb_GtInfo( HB_GTI_FONTWIDTH, 21 )
HB_GTInfo(HB_GTI_FONTSIZE, 40)
ELSEIF screenWidth >= 1600 // 1280 *960
Hb_GtInfo( HB_GTI_FONTWIDTH, 18 )
HB_GTInfo(HB_GTI_FONTSIZE, 32)
elseif screenWidth >= 1280 // 1280 *960
Hb_GtInfo( HB_GTI_FONTWIDTH, 13 )
HB_GTInfo(HB_GTI_FONTSIZE, 20) // 15*80=1200
36*25=900
elseif screenWidth >= 1024 // 1024*760
Hb_GtInfo( HB_GTI_FONTWIDTH, 12.5 )
HB_GTInfo(HB_GTI_FONTSIZE, 20)
elseif screenWidth >= 800
Hb_GtInfo( HB_GTI_FONTWIDTH, 10 )
HB_GTInfo(HB_GTI_FONTSIZE, 18)
ELSE
Hb_GtInfo( HB_GTI_FONTWIDTH, 14 )
HB_GTInfo(HB_GTI_FONTSIZE, 8)
ENDIF
SETMODE(25,80)
clear
FOR A=0 TO 24
@ a,0 say
"1234567890123456789012345678901234567890123456789012345678901234567890123456789"
next a

wait
Post by Pritpal Bedi
Hi
A little update, I have examined the sources.
1. These two calls are not readonly. These also sets the SetMode()
depending upon the width and height you supply as pixels. So beware.
To get the entire screen width/height
nScrWidth := hb_getInfo( HB_GTI_DESKTOPWIDTH )
nScrHeight := hb_gtInfo( HB_GTI_DESKTOPHEIGHT )
and then base your font parameters onto them.
HB_GTI_SCREENWIDTH/HEIGHT gives you, and optionally sets
( which you must not unless you are aware what it will change ), the WVG
console width and height in pixels.
Pritpal Bedi
2010-05-28 16:24:31 UTC
Permalink
Post by Massimo Belgrano
sorry pritpal but what i miss?
Why not dispay entire row?
I try but in 19
SETMODE(25,80)
clear
FOR A=0 TO 24
@ a,0 say
"1234567890123456789012345678901234567890123456789012345678901234567890123456789"
next a
wait
Test the code with GTWVT also and let me know what's the behavior.


-----
enjoy hbIDEing...
Pritpal Bedi
http://hbide.vouch.info/
--
View this message in context: http://harbour-devel.1590103.n2.nabble.com/WVG-problem-tp5113392p5113806.html
Sent from the harbour-devel mailing list archive at Nabble.com.
Massimo Belgrano
2010-05-28 17:19:06 UTC
Permalink
In gtwvt work ok displayn GTWVT each 80 row
in gtwvg display olny 40 col

I am using 1920*1200 resolution
http://shup.com/Shup/350916/gtwvgjpg
Post by Massimo Belgrano
Post by Massimo Belgrano
sorry pritpal but what i miss?
Why not dispay entire row?
I try but in 19
SETMODE(25,80)
clear
FOR A=0 TO 24
@ a,0 say
"1234567890123456789012345678901234567890123456789012345678901234567890123456789"
Post by Massimo Belgrano
next a
wait
Test the code with GTWVT also and let me know what's the behavior.
--
Massimo Belgrano
Loading...