It is currently April 19th, 2024, 6:13 am

Is there a way to save the current Windows DPI setting to a variable?

Get help with creating, editing & fixing problems with skins
User avatar
Cariboudjan
Posts: 268
Joined: May 12th, 2019, 8:55 am

Is there a way to save the current Windows DPI setting to a variable?

Post by Cariboudjan »

I'm working on a project. It uses InputText.dll. I also override the Windows DPI to give better pixel clarity with Rainmeter. If I could access the Windows DPI value, I could negate the extra large font problem by using:

Code: Select all

FontSize=(16*#DPISETTING#)
Also curious, is there any plan to replace InputText.dll with something built-in to Rainmeter itself?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Is there a way to save the current Windows DPI setting to a variable?

Post by eclectic-tech »

Cariboudjan wrote: May 12th, 2019, 9:12 am I'm working on a project. It uses InputText.dll. I also override the Windows DPI to give better pixel clarity with Rainmeter. If I could access the Windows DPI value, I could negate the extra large font problem by using:

Code: Select all

FontSize=(16*#DPISETTING#)
This plugin will return the current DPI scale as a variable: https://forum.rainmeter.net/viewtopic.php?f=128&t=31145
User avatar
Cariboudjan
Posts: 268
Joined: May 12th, 2019, 8:55 am

Re: Is there a way to save the current Windows DPI setting to a variable?

Post by Cariboudjan »

I found the solution.

Code: Select all

[MeasureRegistry]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Control Panel\Desktop\WindowMetrics
RegValue=AppliedDPI
UpdateDivider=-1
Gets the DPI value from the registry.