Questions tagged [highdpi]

205 questions
3
votes
1 answer

Why is WinForms drawing my image 4x the size?

I'm using WinForms to create a 512x512 px image with 96dpi resolution. After initialization, I use OnPaint to draw this image using Graphics.DrawImage. What I get as I run the program is the image shown below: essentially a 1024x1024 image which…
Dmitri Nesteruk
  • 23,067
  • 22
  • 97
  • 166
3
votes
1 answer

Determine windows DPI settings programmatically?

we've got a problem with one of our non dpi aware MFC applications. If you change the system setting to high dpi (e.g. 120 or 144 dpi), the application icon on the taskbar looks screwed up. Unfortunately, we have to register our own WNDCLASS for the…
humbagumba
  • 2,054
  • 15
  • 16
3
votes
1 answer

How to get the physical display resolution in SDL2?

I have tried SDL_DisplayMode DM; SDL_GetDesktopDisplayMode(0, &DM); auto Width = DM.w; auto Height = DM.h; but on a high-DPI display it returns the virtual screen resolution. SDL_GetCurrentDisplayMode does the same. So, how can I get the physical…
Emil Laine
  • 41,598
  • 9
  • 101
  • 157
3
votes
0 answers

Is it safe to use Delphi visual form designer in high DPI?

In the past we were using standard 96dpi windows most of the time on developer machines, today it is common to go with 120 or even more. Is it safe to save forms in Delphi in high dpi or are there any annoyances or risks involved? I'm not asking how…
kgz
  • 527
  • 2
  • 10
3
votes
1 answer

How do I get a QMenu to react to text size changes on High DPI diplays

The text in menubars and menues automatically change size when a window is moved from a 96 dpi screen to 192 dpi screen. I naively thought Qt would automatically resize menues when the menu text size changed but I'm obviously wrong here. How can I…
mikag
  • 162
  • 8
3
votes
1 answer

Graphics.MeasureString returns different values than Win32 GetTextExtent

i've been trying to find a method in C# to measure the size of a string. The standard method to measure a string in Win32 is to use GetTextExtent. The real goal is to find the average width and height of a font character. The standard method to find…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
3
votes
0 answers

Why not using HTTP headers for Retina Display detection?

I am the developer of the WordPress plugin called WP Retina 2x. It works really well - worked a lot on it - but something bothers me. The well-known trick to detect the Retina Displays on the server-side is to use a cookie based on the…
TigrouMeow
  • 1,038
  • 4
  • 19
  • 30
2
votes
1 answer

Windows 10/11 High DPI Aware, not receiving WM_DPICHANGED message

My Win32 C++ application has a manifest in the resource file containing: PerMonitorV2,PerMonitor" At…
Robinson
  • 9,666
  • 16
  • 71
  • 115
2
votes
1 answer

High DPI scaling in Qt 6.4 not working out of the box on Windows for Qt Examples

I am wondering if I am missing something in setting up Qt high DPI scaling. Right now I have a problem on two displays with 100% and 200% scaling. I am on Windows 10 using Qt 6.4.3 in C++, using Qt Creator. I thought something is wrong with my…
Chris
  • 2,461
  • 1
  • 23
  • 29
2
votes
0 answers

How to make 150% scaled Qt6 app not look pixelated?

I'm trying to add support for High DPI scaling to my Qt6 application. For this I added an @2x set of icons, which are used when scale factor is 200%. But platforms like Windows also have intermediate scale factors like 150%, and rounding up or down…
Ruslan
  • 18,162
  • 8
  • 67
  • 136
2
votes
1 answer

Can font sizes in Qt Designer be specified in pixels instead of points?

After a lot of research I finally realized that my application is looking funny because the fonts specified in Qt Creator are in points and not in pixels, and my laptop is running at 125% scale. Is there a way in which I can change Qt Creator…
Rafael Boy
  • 287
  • 2
  • 8
2
votes
0 answers

Set DPI scaling for CefSharp window only in WPF application

I'm trying to convert IE web browser window into a CefSharp (v 96.0.180) window into as a part of a larger WPF application. The application itself follows the system dpi level (resizes UI with it), but the IE window kept 100% dpi no matter what was…
EmeraldP
  • 23
  • 6
2
votes
0 answers

Changing high DPI scaling override property under Windows 10

In the Windows 10 file properties of an executable in the compatibility tab, there is an option to override the default DPI scaling behaviour. The default is "Application", which lets the program handle DPI scaling itself. I'd like to change this…
Begus
  • 21
  • 2
2
votes
2 answers

Area for check mark in WinForms ContextMenuStrip is narrow on high dpi

We have a WinForms app for .NET Framework 4.7.2. The main form contains a toolbar based on the ToolStrip component. One of the buttons displays a drop-down menu based on the ContextMenuStrip component. The whole construction looks like this: private…
TecMan
  • 2,743
  • 2
  • 30
  • 64
2
votes
1 answer

How to know current bitmap-scaling factor for a Windows HWND?

I have a small C# program, HelloCs.cs, like this: using System; using System.Drawing; using System.Windows.Forms; class HelloWorld: Form { public static void Main() { Application.Run(new HelloWorld()); } public…
Jimm Chen
  • 3,411
  • 3
  • 35
  • 59