crypto2011 / IDR

Interactive Delphi Reconstructor
MIT License
951 stars 225 forks source link

IDR is not DPI aware #43

Closed greenozon closed 4 years ago

greenozon commented 5 years ago

IDR GUI is really very very huge in case W10 is doing scaling by means of OS, it is not possible to work in that use-case example:

http://prntscr.com/m4cgi2

csitGenny commented 5 years ago

Modify the Misc.cpp

void __fastcall ScaleForm(TForm* AForm) { HDC _hdc = GetDC(0); if (_hdc) { //Modified by ZGL int LogicalScreenHeight = GetDeviceCaps(_hdc, VERTRES); int PhysicalScreenHeight = GetDeviceCaps(_hdc, DESKTOPVERTRES); AForm->ScaleBy(PhysicalScreenHeight, LogicalScreenHeight); //Modified end ReleaseDC(0, _hdc); } }

crypto2011 commented 5 years ago

Modified. Thank you.