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 ?
ZOOM IN and ZOOM OUT
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
ZOOM IN and ZOOM OUT
Last edited by Silvio.Falconi on Fri Apr 10, 2020 11:49 pm, edited 1 time in total.
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: ZOOM IN and ZOOM OUT
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. )
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
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. )
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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: ZOOM IN and ZOOM OUT
any solution please ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC