directx-vs-templates icon indicating copy to clipboard operation
directx-vs-templates copied to clipboard

DpiChanged capability

Open mediabuff opened this issue 6 years ago • 2 comments

would it be possible to add boiler plate code for dpi changes in both win32 and uwp templates ?

mediabuff avatar Dec 13 '17 12:12 mediabuff

The Win32 templates include embedded manifest elements which indicate that the EXE is "dpiAware". This means the app is only told true pixel sizes in all cases, which is typical for Win32 Direct3D apps & games. They already have support for multiple resolutions.

The UWP templates will also communicate 'true pixels' to the Game module. You can also add more code to the OnDpiChanged handler in Main.cpp.

What in particular were you looking for?

walbourn avatar Dec 13 '17 16:12 walbourn

I meant hooking into into WM_DPICHANGED etc. to structure the template for building modern DPI aware applications. Much like DynamicDPI SDK sample. Much of this can be abstracted and setup in the DirectX devices/contexts etc. appropriately. A uniformity brought into Win32 and UWP apps esp. targeting those that build their UI frameworks directly on DirectX (not using XAML or WPF).

mediabuff avatar Dec 14 '17 00:12 mediabuff