Page 1 of 1

Problem with FW_SayText RESOLVED

PostPosted: Thu Apr 25, 2019 9:34 am
by Silvio.Falconi
For nY := 1 to TOTY
For nX := 1 To TOTX
cSettore:= aSettori[nY,nX]
nElemento:= aNumeri[nY,nX]
cTypeRoom := aData[nY,nX]
nStatus:= 5

aBmps[nY,nX]:cargo := {nElemento,cSettore,cTypeRoom,nStatus }

aBmps[nY,nX]:bPainted:= { |hDC| FW_SayText( hDC, ltrim(str(nElemento)), { 30, 2, 48, 25 },,oFontOmbrelloni:hFont, CLR_WHITE, nARGB(255,COLOR_ARANCIONE) , .t. ) }

next nx
next ny



Image



write all zero as you can see why ?

I check nElemento and this variable have a number it take from an array aNumeri

and on the array aNumeri there are number as you can see here

Image





any solution pls

Re: Problem with FW_SayText

PostPosted: Thu Apr 25, 2019 12:43 pm
by karinha

Re: Problem with FW_SayText

PostPosted: Thu Apr 25, 2019 1:47 pm
by Silvio.Falconi
??????????????????????
I ask another question...

Re: Problem with FW_SayText

PostPosted: Thu Apr 25, 2019 1:55 pm
by nageswaragunupudi
You need to keep changing this rect { 30, 2, 48, 25 } for each iteration

Re: Problem with FW_SayText

PostPosted: Thu Apr 25, 2019 2:16 pm
by Silvio.Falconi
I not understood

I mean the text to write

str(nElemento) nElemento is a number and I take it from an array aNumeri you can see on picture ( xbrowse)

you sad the arect but arect is the coordinates ?

Re: Problem with FW_SayText

PostPosted: Thu Apr 25, 2019 2:39 pm
by nageswaragunupudi
They are the coordinates for writing the text.
Do you write all the numbers in the same coordinates, i.e., do you write all numbers at the same place?
For each nx,ny you need to change the coordinates.

Re: Problem with FW_SayText

PostPosted: Thu Apr 25, 2019 2:54 pm
by Silvio.Falconi
yes I write it on the same coordinates for each btnbmp


If I set

aBmps[nY,nX]:ccaption := ALLTRIM(STR(nElemento))

I see the numbers on btnbmp as you can see here but as cCaption

Image


I not Understood with old fwh it run ok , is there something modified ?

on this your sample viewtopic.php?f=3&t=35666&p=212422&hilit=+FW_SayText#p212422

the coordinates are the same

Re: Problem with FW_SayText

PostPosted: Thu Apr 25, 2019 3:04 pm
by nageswaragunupudi
Code: Select all  Expand view
aBmps[nY,nX]:bPainted:= { |hDC,ps,oBtn| FW_SayText( hDC, ;
   ltrim( str( oBtn:Cargo[ 1 ] ) ), ;
   { 30, 2, 48, 25 },,oFontOmbrelloni, CLR_WHITE, nARGB(255,COLOR_ARANCIONE) , .t. ) }
 

Re: Problem with FW_SayText

PostPosted: Thu Apr 25, 2019 3:27 pm
by Silvio.Falconi
thanks