-2

I'm working on a dll for game maker and I'm running into some issues. I seems I can't change the dpi settings on an already created window. Is this true or is there some workaround? I've been using SetProcessDpiAwareness and SetThreadDpiAwarenessContext. I was using c# but I don't mind switching to c++ if needed.

Thanks in advance.

Tthecreator
  • 31
  • 1
  • 4

1 Answers1

0

Prior to Windows 10 the DPI is process wide and constant. Beginning with Windows 10 Anniversary Update you can dynamically change a threads DPI, this is known as mixed mode DPI scaling but it still does not let you dynamically change a windows DPI:

  • When a window is created, its DPI awareness is defined as the DPI awareness of the calling thread at that time.
  • When the window procedure for a window is called, the thread is automatically switched to the DPI awareness context that was in use when the window was created.

The only workaround I can think of is to change the threads DPI and replace the old window with a new instances of your window.

Anders
  • 97,548
  • 12
  • 110
  • 164