ZOOM IN and ZOOM OUT

ZOOM IN and ZOOM OUT

Postby Silvio.Falconi » Fri Apr 10, 2020 1:30 pm

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 ?
Last edited by Silvio.Falconi on Fri Apr 10, 2020 11:49 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: ZOOM IN and ZOOM OUT

Postby Silvio.Falconi » Fri Apr 10, 2020 3:02 pm

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: ZOOM IN and ZOOM OUT

Postby Silvio.Falconi » Sun Apr 12, 2020 5:02 pm

any solution please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests