Page 1 of 1

ZOOM IN and ZOOM OUT

Posted: Fri Apr 10, 2020 1:30 pm
by Silvio.Falconi
I tried to make a simulation zoom in and zoom out on my application


the problem is when I reduce the btnbmp are reduced ok but then I cannot see the numbers

to draw a number I use on bPainted ( for each btnbmp) a function

FW_SayText( hDC, ;
ltrim( str( ncella ) ), ;
{ 30, 2, 48, 25 },,oBold, CLR_WHITE, nARGB(255, colororange) , .f. )

I understood it show the number on these coordinates { 30, 2, 48, 25 }

but id the btnbmp is big the number is moved
if the btnbmp is smaller I not see the number

how I can make to calculate the coordinates of each btnbmp and recalculate the right position of number on the btnbmp ?

Re: ZOOM IN and ZOOM OUT

Posted: Fri Apr 10, 2020 3:02 pm
by Silvio.Falconi
I tried making
local aRect:= GetClientRect(oBtn:hWnd)

FW_SayText( hDC, ;
ltrim( str( ncella ) ), ;
{ aRect[1], aRect[2]+5 ,aRect[3]-10,aRect[4]-20 },oBold, CLR_WHITE, nARGB(255, colororange) , .f. )

Image


but it is lottery because i cannot guess the right position

I'd like to insert the box in the lower left corner the box must have 3 cr from 1 to 999

Re: ZOOM IN and ZOOM OUT

Posted: Sun Apr 12, 2020 5:02 pm
by Silvio.Falconi
any solution please ?