JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::ScopedDPIAwarenessDisabler Class Reference

A Windows-specific class that temporarily sets the DPI awareness context of the current thread to be DPI unaware and resets it to the previous context when it goes out of scope. More...

#include <juce_ScopedDPIAwarenessDisabler.h>

Collaboration diagram for juce::ScopedDPIAwarenessDisabler:

Public Member Functions

 ScopedDPIAwarenessDisabler ()
 
 ~ScopedDPIAwarenessDisabler ()
 

Private Attributes

void * previousContext = nullptr
 

Detailed Description

A Windows-specific class that temporarily sets the DPI awareness context of the current thread to be DPI unaware and resets it to the previous context when it goes out of scope.

If you create one of these before creating a top-level window, the window will be DPI unaware and bitmap strectched by the OS on a display with >100% scaling.

You shouldn't use this unless you really know what you are doing and are dealing with native HWNDs.

Constructor & Destructor Documentation

◆ ScopedDPIAwarenessDisabler()

juce::ScopedDPIAwarenessDisabler::ScopedDPIAwarenessDisabler ( )

◆ ~ScopedDPIAwarenessDisabler()

juce::ScopedDPIAwarenessDisabler::~ScopedDPIAwarenessDisabler ( )

Member Data Documentation

◆ previousContext

void* juce::ScopedDPIAwarenessDisabler::previousContext = nullptr
private

The documentation for this class was generated from the following file: