mIRC Homepage
Posted By: Wims Icon dialog control - 28/01/23 10:47 PM
Two bugs with the icon dialog control.

1) the parser for the icon control dialog definition is different, based on the extention of the icon filename

I had an icon definition where the path to the icon was icon id,x y w h, " $scriptdirfile.ico ", 0, options with quotes, when i copied this line and pasted it to create another icon control, but this time with a .png extention, i got an error about that line. Specifically, the trailing space seems to be the problem. It will work fine with .ico, .exe and .dll at least, but fail at least on .png.

I know the quotes are not necessary here, but if they are fine with some extentions, it should be fine with all of them.

2) If the icon dialog control is disabled in the dialog definition, the icon will incorrectly be hidden when you launch the dialog
Posted By: Khaled Re: Icon dialog control - 29/01/23 03:24 PM
Thanks for your bug report. The custom dialog code does not handle spaces at all in this case. The only reason that format is working for you is that some of the Windows image APIs parse spaces. I have extended the icon code to remove extra spaces before calling the APIs. As far as I can tell, this shouldn't break backward compatibility but will need testing.

As for the disabled/hidden icon on startup, this also applies to hotlinks. These have always worked this way and there are no plans to change this behaviour.
© mIRC Discussion Forums