UEZ wrote:The problem I discovered is only for Win7 - Win10 seems to work properly.
ok, confirmed. Here's what I think is happening:
On Win10, both the window and the display surface (RenderTarget) are scaled by the system DPI - for me,this happens for all older non-DPI aware applications by default . And with fbc in all graphics drivers Direct2D, DirectX, & GDI. All three of these drivers work for me on Win7 and Win10.
On Win7, the display surface is not scaled by the system DPI for Direct X or GDI,. Only in the Direct2D driver the display surface is scaled by the system DPI. However, in all 3 cases the window is the same size.
- One possible fix is to add a ID2D1RenderTarget_SetDpi( pRenderTarget, 96, 96 ); to force scaling to 100% on the render target.
- Result to expect is that will get no scaling on Win7 and default DPI scaling on Win10. Because even though we force scaling to 100% in the program, win10 will still scale it to 125% / 150% just like all the other non-DPI aware programs.
I suspect this is a bug or at the very least a difference in Windows(tm) 7. Not sure the results if the application is manifested with DPI awareness info and the SetDPI() call used if it would mess with scaling.