PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Elias Montoya on June 01, 2012, 04:05:41 PM

Title: DPI aware control locations
Post by: Elias Montoya on June 01, 2012, 04:05:41 PM

Hello,

I have made heavy use of FF_Control_GetSize, FF_Control_SetSize, FF_Control_GetLoc and  FF_Control_SetLoc throgout all my code. I would prefer to modify the code as minimally as possible, so i would like to ask:

Is there a way to convert pixel positions to DPI aware positions? If so, what are those functions? I cant find references to them.

Or do i need to make use of Jose's functions to relocate controls? If so, what is the correct approach?

Thanx!


Title: Re: DPI aware control locations
Post by: José Roca on June 01, 2012, 05:53:32 PM
Quote
Is there a way to convert pixel positions to DPI aware positions? If so, what are those functions? I cant find references to them.

You mst have not looked in the right place. You can use AfxScaleX and AfxScaleY.
Title: Re: DPI aware control locations
Post by: Paul Squires on June 01, 2012, 05:57:33 PM
This is discussed in the help file. You will need to use Jose's afxScaleX and afxScaleY functions if you have function calls that use absolute position numbers.

Title: Re: DPI aware control locations
Post by: Elias Montoya on June 02, 2012, 04:27:15 AM

Hello Paul, Jose.

I see, i have tried those functions but none of them seems to work. I tried making a blank application and learn from the generated code but the generated app also behaves weird.

I created an app using 96 PPP (DPI) have set my DPI configuration to 156% and this is what i get in the designer and the generated window.

Is this what i should be seeing or did i miss any updates? (using 3.60)
Title: Re: DPI aware control locations
Post by: Elias Montoya on June 02, 2012, 04:31:58 AM
Also, no matter how i configure the DPI ratio, the tab font's size remains the same, is this normal?
maybe my computer is special?