Chris Miller
Programmer
I want to continue the discussion from the previous thread thread184-1821304
Summary
I would first like to summarize what I think is best to do with lower effort and when to go "full in" with all efforts to make an application dpi aware.
First, to summarize what I see in FoxyPreviewer is not using the fast/simple solution call SetProcessDPIAware(). But I do see the benefit of this simplest solution, as it also adjusts report sizing, it seems. Is that right, Mike?
I think the major point is that in GDI+ printers the printer is just another device context and what's printed is rendered with the same graphics routines as on screeen, that's perhaps why Microsoft decided to let the scale factor also scale reports, I wonder about that decision, as reports where in higher resolutions than screens even in the days of the first inkjet printers and surely with laser printers, so why didn't you just keep this separate, Microsoft? At least it explains why SetProcessDPIAware() works.
If you programmed scaling of forms in your application anyway, to address different fullscreen resolutions even with the same display dpi values, I guess this simple and fast solution could be sufficient, as it means Windows won't interfere with your scaling and your scaling will also adjust font sizes, etc., if you did think about keeping the same impression of your overall forms.
Atlopes DPIAwareManager ( - that was also new to me - seems to go the same route as FoxyPreviewer, digging deeper into what current settings are with GetDeviceCaps.
Diving deeper into this topic I also found this: From your GitHub readme I realize your manager is aiming for the awareness per-monitor, i.e. using multiple monitors with different dpi resolutions will be handled. I see that Windows even introduces a v2 of this in that enumeration.
Question
What about the scaling of forms while they are half on one monitor and half on another? Wouldn't that need two forms with everything duplicated? I guess it doesn't go as far but handles a form according to which monitor settings are relevant at its top/left position, right?
Do you handle this in the latest way DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 or DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE?
I know, I could look into your code, but I wanted to ask this on the forum because V2 seems like a new level in this game overall.
Chriss
Summary
I would first like to summarize what I think is best to do with lower effort and when to go "full in" with all efforts to make an application dpi aware.
First, to summarize what I see in FoxyPreviewer is not using the fast/simple solution call SetProcessDPIAware(). But I do see the benefit of this simplest solution, as it also adjusts report sizing, it seems. Is that right, Mike?
I think the major point is that in GDI+ printers the printer is just another device context and what's printed is rendered with the same graphics routines as on screeen, that's perhaps why Microsoft decided to let the scale factor also scale reports, I wonder about that decision, as reports where in higher resolutions than screens even in the days of the first inkjet printers and surely with laser printers, so why didn't you just keep this separate, Microsoft? At least it explains why SetProcessDPIAware() works.
If you programmed scaling of forms in your application anyway, to address different fullscreen resolutions even with the same display dpi values, I guess this simple and fast solution could be sufficient, as it means Windows won't interfere with your scaling and your scaling will also adjust font sizes, etc., if you did think about keeping the same impression of your overall forms.
Atlopes DPIAwareManager ( - that was also new to me - seems to go the same route as FoxyPreviewer, digging deeper into what current settings are with GetDeviceCaps.
Diving deeper into this topic I also found this: From your GitHub readme I realize your manager is aiming for the awareness per-monitor, i.e. using multiple monitors with different dpi resolutions will be handled. I see that Windows even introduces a v2 of this in that enumeration.
Question
What about the scaling of forms while they are half on one monitor and half on another? Wouldn't that need two forms with everything duplicated? I guess it doesn't go as far but handles a form according to which monitor settings are relevant at its top/left position, right?
Do you handle this in the latest way DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 or DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE?
I know, I could look into your code, but I wanted to ask this on the forum because V2 seems like a new level in this game overall.
Chriss