JUCE  v6.1.6 (6.0.8-1114)
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 stretched 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.

@tags{GUI}

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: