Home > Back-end >  Delphi Gdi drawing, how is not affected by system Dpi value?
Delphi Gdi drawing, how is not affected by system Dpi value?

Time:09-24

If inscribe

Delphi Gdi + drawing, how is not affected by system Dpi value?

Let me draw effect value fixed in the state of DPI=96,

Now system once set to 125% 150%, the effect of drawing has also changed,

Finally I wish you all a happy New Year

CodePudding user response:

SetMapMode (HDC, MM_ISOTROPIC);//set the image mode

CodePudding user response:

reference 1st floor lyhoo163 response:
SetMapMode (HDC, MM_ISOTROPIC);//set the image pattern


Thanks to this seems to be a GDI?

In fact, I need more similar like this answer

Hello, nice to see you this article, I recently wrote a VC dialog box procedure, the default on Windows 7 96 dpi display well,, but change dpi to 120 when many Windows and controls are very ugly, and I used the introduce method, is called when the application starts SetProcessDPIAware () to prevent the UI automatically zoom in, but no effect, and still the same as the original, and show very ugly.. I think is the purpose of my application in the case of a 120 dpi is the window that displays and controls like dpi is 96, and also is the dpi is 120, although the system Settings, but I think my application is still using the 96 dpi to show that, don't know if you have what good method?? If there is a good way to help the younger brother a please, thank you.

CodePudding user response:

All calls when the custom painting GetDeviceCaps (DC, LOGPIXELY); GetDeviceCaps (DC, LOGPIXELX); Where forced to 96 is not affected by system,

CodePudding user response:

A bitter mountain again?

CodePudding user response:

Join in FormCreate events:
ScaleBy (96, CurrentDPI);
  • Related