madExcept Window to small on High-DPI

delphi package - automated exception handling
Post Reply
UliBru
Posts: 5
Joined: Wed Aug 31, 2016 4:49 pm

madExcept Window to small on High-DPI

Post by UliBru »

I use madExcept 5.1.4. My application uses Delphi 12 with DPI Awareness Per Monitor V2.
The display of the program is correct.
But in case of an exception the upcoming madExcept window is close to unreadable.
How to get a bigger window size for madExcept?

Thanks for any tip.
pfennig59
Posts: 4
Joined: Sat Jun 03, 2017 10:40 am

Re: madExcept Window to small on High-DPI

Post by pfennig59 »

Same here. the scale factor isn't taken into consideration.
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept Window to small on High-DPI

Post by madshi »

Can you try this:

1) Copy madExcept.pas and mad.inc into your project folder.
2) In madExcept.pas search for "stdac(THandle(-4))" and comment that line out, while leaving the "stdac(THandle(-1))" line in place like this:

Code: Select all

  if @stdac <> nil then begin
    stdac(THandle(-1));
    //stdac(THandle(-4));
  end;
Does that workaround the issue?
pfennig59
Posts: 4
Joined: Sat Jun 03, 2017 10:40 am

Re: madExcept Window to small on High-DPI

Post by pfennig59 »

Indeed, it does.

Thank you very much for your quick solution.
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept Window to small on High-DPI

Post by madshi »

Glad to hear that, will change it in the next build.
UliBru
Posts: 5
Joined: Wed Aug 31, 2016 4:49 pm

Re: madExcept Window to small on High-DPI

Post by UliBru »

Yes, it also helps here.
Thanks a lot
iconic
Site Admin
Posts: 1068
Joined: Wed Jun 08, 2005 5:08 am

Re: madExcept Window to small on High-DPI

Post by iconic »

Here's a Microsoft sample project with full code in case anyone wants to test all DPI Awareness parameters, this way you can see how the system treats each one of them visually. You can then change stdac(THandle(N)) to whatever value you prefer, if needed.

https://github.com/microsoft/Windows-cl ... ontext.cpp

--Iconic
pfennig59
Posts: 4
Joined: Sat Jun 03, 2017 10:40 am

Re: madExcept Window to small on High-DPI

Post by pfennig59 »

Thanks for this additional information.
Post Reply