/window [-abBcCdDe[N]fg[N]hHij[N]k[N]l[N]mMn[N]oprRsSuvw[N]xz] [-tN,..,N] [+bdeflLnstx] <@name> [x y [w h]] [/command] [popup.txt] [font [size]] [iconfile [N]]
Using the above line from the mIRC help file, you can specify an icon for an @window. The only way I can get this to work is also with the -d switch to make it a desktop window, if it's still a mdi window it doesn't take the icon, also even if it is a desktop window, the windows taskbar, and the window titlebar itself show the assigned icon but mIRC's Treeview/switchbar shows the default @ icon.
When I have a desktop window that is showing the icon correctly, $window(@win).icon always returns "off", not sure if I understand what this is actually for because I can't ever seem to get a result other than "off" in any condition. The help file only says "returns on/off depending on whether icon is visible"
I've tested both /window and $window().icon with 16, 32, 48 and 128 sized icons. Icons always load on -d windows (desktop) reguardless of size, but never load in mdi windows or the treebar/switchbar.
Tested on mIRC Versions 7.57 - 7.66 on Windows 10, I don't have any versions older still backed up to test further versions.