If I don\'t use WM_SETICON first to set the icon then WM_GETICON is always returning 0. This is weird. Please help.
This is my code, can copy paste into scratchpad and r
Well, there is a surprisingly easy (and cross-platform) way to retrieve the default icon of Firefox.
var foxexe = FileUtils.getFile("XREExeF", []);
var iconurl = "moz-icon:" + Services.io.newFileURI(foxexe).spec;
You can treat iconurl
the same way as any other image-pointing url. The default size is 16x16, append ?size=32
to get a bigger icon. It seems that these two values are the only supported on Windows. This might not be the case for other OSes.