Hello paul, its great to see the progress with the DPI awareness!!. :)
Right now im guessing we will need to replace the coded functions to create fonts and change the setwindowpos api call. Is there something else we will need to do to make the change? Perhaps there is more than that, if you have a list or suggestions, i believe those will be very welcome. :)
I must have posted this link a hundred times...
http://msdn.microsoft.com/en-us/library/windows/desktop/dd464660%28v=vs.85%29.aspx
If you want a quick answer... All and every one function that uses physical pixels.
Thanks Jose. :)
Actually, the answer I was just trying to get was specifically related to firefly. For example, will i need to change my code for applications that use FF_Control_SetLoc? Asking paul is the best way to know. :)
I will have to look at the FireFly Functions to ensure that they are all High DPI aware. Haven't gotten that far yet.
Quote
I will have to look at the FireFly Functions to ensure that they are all High DPI aware. Haven't gotten that far yet.
You SHOULD NOT, unless you do it by adding two optional parametes at the end, e.g. rx and ry, to pass the ratios, or dpiX and dpiY to pass the DPIs, that currently are the same but in a future could be different.
I think it would be easier to modify those functions to do the conversions internally (possibly by making a call to your class functions instead of api calls). That way no special modifications are required? So, why not Jose?
If it was done automatically, other that destroying a feature of CWindow that allows to change the aspect ratio, what will happen if, for example, you need to use an absolute position, such 1, 1, regardless of te DPI being used? And what will happen if you pass values returmed by a function that has already scaled them?
If you don't want to learn all that it is involved, just don't change anything, run it in virtualized mode and forget that DPI exists.
Sometimes i wish they made a completely new OS from scratch. :)
QuoteSometimes i wish they made a completely new OS from scratch.
Amen to that!
Rolf
Quote from: Elias Montoya on March 02, 2012, 01:15:16 AM
Sometimes i wish they made a completely new OS from scratch. :)
I am hoping that ReactOS matures fast ....
Windows will get worse and worse ... Look at the way they are going with Windows 8 .... >:( :'(
High DPI is not a Windows problem. Is the price to pay for having high resolution LCD monitors.
Quote from: Jose Roca on March 02, 2012, 06:31:17 AM
High DPI is not a Windows problem. Is the price to pay for having high resolution LCD monitors.
True, but its a price we have to pay in "windows cash" in the "windows world". the bad organization of API's returning non DPI resolutions and coordinates in a DPI OS, is a windows problem. I mean, if they are going this way, why not correctling the full api? Answer: because its impossible to know what coordinates have already been processed.
Added:
In a OS from scratch that problem could be easily solved by always working with pixels, except when positioning, sizing or creating objects like fonts to be displayed visually. Even sizes could be retrieved in normal pixels.
Quote
In a OS from scratch that problem could be easily solved by always working with pixels, except when positioning, sizing or creating objects like fonts to be displayed visually. Even sizes could be retrieved in normal pixels.
This is what Vista/Windows 7 virtualization do. If you like the results, you have it easy: as I said "just don't change anything, run it in virtualized mode and forget that DPI exists."
Doesn't it stretches stuff instead of redimensioning it?
Quote
Windows first renders the entire application window to an internal bitmap using 96 DPI sizes, and then scales up that bitmap to the current DPI setting before putting it on the screen.
http://www.kynosarges.de/WindowsDpi.html