mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Dec 2002
Posts: 5,493
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,493
Thanks for testing this out. Unfortunately, I have not been able to reproduce the issue. I set my display size to 1680 x 1050, the largest for my monitor. I changed the Windows 10 display scaling to 100%, 125%, 150%, and 175%, signed out and in again, ran the latest mIRC beta, and ran the custom dialog script. It appeared correctly every time.

Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
@Khaled Darn! I thought we had a reproducible issue.

I am running mIRC 7.52 not the beta. I will try the beta later, but I don't see any changes in the change log that would make a difference.

I suppose it could be variations either in Windows 10 version or graphics chip / drivers.

What version of Windows 10 are you running? Mine is 1709.

What graphics are you using? Mine is Intel HR Graphics 4600 on latest drivers from Feb 2018 v20.19.15.4963.

Joined: Dec 2002
Posts: 5,493
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,493
It could be due to the test dialog script that I am using. If you can provide a simple dialog script that reproduces the issue for you, I will test it here.

Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
Ok - a bit of research into Windows 10 and scaling suggests this is a work in progress by Microsoft, and the user's experience and what they can do about it will vary depending on what version of Windows 10 they are running.

Here are a few articles I have found on this:

If you want to support high DPI properly, then you probably need to implement High DPI functionality as described here:
Overview of the High DPI technology

If you are on 1703 or later (or possibly 1709 or later) then there is a compatibility setting:
[img]https://ibb.co/f3giZe[/img]
I am not at my laptop right now, but I will test this later to see if it can help.

Last edited by Protopia; 03/09/18 09:44 AM.
Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
https://raw.githubusercontent.com/DukeLupus/dlFilter/master/dlFilter.mrc

Not a simple script, but it is the one which we are reporting problems with.

Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
Originally Posted By: Protopia
If you are on Windows 10 1703 or later (or possibly 1709 or later) then there is a compatibility setting:
[img]https://ibb.co/f3giZe[/img]


This is definitely a work-around for a genuine issue of display scaling support in mIRC, and of course it only works if you are on Windows 10 1703 or later (so tough if you are still on Windows Vista or 8 or 8.1 or 10 RTM or 10 1607).

Using the compatibility settings in the image above (or the All Users version), select the "Override high DPI scaling behaviour." checkbox and select "System (Enhanced)". (System also works but does it by emulating a lower resolution and fonts are blurred.)

@Khaled - when you are trying to recreate the issue, you might want to check that you haven't got this compatibility option set - or if you are on 1803 that you haven't got Windows 10 1803 automated version of this turned on.

Joined: Dec 2002
Posts: 5,493
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,493
Thanks, unfortunately when trying to track down bugs, I really need a simple script that reproduces the specific issue being reported.

Regarding the custom dialog, I have just noticed that some time ago I added another custom dialog "option" type, in addition to (dbu, pixels, notheme, disable), called "map". This performs the same function as "dbu" but is specific to the dialog being displayed. "dbu" is generic but has to be kept as it is for backwards compatibility.

If you try using "map" as an option type in the dialog definition, does that resolve the issue?

Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
Can't test this until later today but will give it a try.

Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
P.S. Can you explain further what "map" does so I can add it to wikichip?

Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
Originally Posted By: Khaled
Regarding the custom dialog, I have just noticed that some time ago I added another custom dialog "option" type, in addition to (dbu, pixels, notheme, disable), called "map". This performs the same function as "dbu" but is specific to the dialog being displayed. "dbu" is generic but has to be kept as it is for backwards compatibility.

If you try using "map" as an option type in the dialog definition, does that resolve the issue?

@khaled - I have just tried it at scaling=100% (i.e. no scaling) and I get a different output with "map" than I do with "dbu":

[img]https://ibb.co/gOic4e[/img]
[img]https://ibb.co/jaeH4e[/img]

The dialog is defined with "size -1 -1 168 227" and ($dbuw==$dbuh==2):
  • with "dbu" the dialog is 342x483 and looks perfect
  • with "map" the dialog is 258x397 and is squashed.


Given that map is undocumented, I would imagine that very few people will be using it. And so it might be buggy.

OTOH, perhaps the coordinates / sizes work differently with "map", in which case switching to "map" and making a one-time change to all the coordinates and sizes might fix it.

But it really would help to understand what "map" is supposed to do and how it is different from "dbu". Also, I will need to know what version of mIRC "map" was introduced in so that I can know whether I need to increase the minimum version for the script.

P.S. I can see how the actual dialog sizes are calculated for "dbu" - we need to account for the borders and the title bar of the dialog (so 342 = 168*2 + 6 and 483 = 227*2 + 29 - with notheme we get a 1px border and 2px margin all around which makes 6px for width and the title bar is 22px high + 1px gap below).

With "map" the borders and title bar sizes look the same, which means that the dbu-type scaling is different for width and height with = 1.5, height = 1.621145 which makes no sense. OTOH the absolute differences in size are almost the same 84 for width and 86 for height. Not sure if that helps you diagnose this issue...

Last edited by Protopia; 07/09/18 12:31 PM.
Joined: Dec 2002
Posts: 5,493
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,493
The "map" option is working correctly. Remember, when you specify one of these options, whether it is "pixels", "dbu", or "map", the dialog needs to be designed around that option.

When the "dbu" option was added long ago, it worked correctly for the majority of people, however the method it used was a generic dialog sizing method. The "map" option is an updated method that uses the now recommended method for mapping dialog sizes across different versions of Windows with different system fonts and DPIs.

Once you design a dialog around one of these options, its size and contents should remap correctly across different Windows versions that use different system fonts and DPIs.

Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
@Khaled - Thanks for such a prompt reply. I don't have any issues with resizing the dialog element positions and sizes to use "map" as a one-off exercise, but I need to know which version it was added in.

(In essence, my script currently requires mIRC 7.44, and I would be loath to change to "map" if it needs a later version than this.)

Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
@Khaled - I have updated my dialog to use the new x y w h values for "map" and tried it at 100% and 150% scaling, and I am pleased to report that it scales pretty well wwhen using "map".

So we now have two alternative solutions:

1. If the dialog uses dbu then you can use mIRC compatibility settings on Windows 10 1703 or later to make the dialog scale properly.

2. Or you can switch from "dbu" to "map" and adjust x y w h.

Page 2 of 2 1 2

Link Copied to Clipboard