How big should an Internet Explorer toolbar icon b

2019-08-23 02:58发布

问题:

I'm trying adding my own toolbar icon to Internet Explorer but am unsure what size it should be.

  • The Designing Toolbar Icons for Internet Explorer articles on TechNet indicates 20x20 and 16x16 pixels.

  • Messages (1, 2) in the Internet Explorer Toolbar (Deskband) Tutorial at Code Project imply 22x22 and 16x16 pixels.

Using Internet Explorer 7, icons that are 20x20 pixels seem to get stretched. Measuring shows they should be at least 24x24. Anyone have a definitive reference?


Alternatively, where does Internet Explorer get its existing toolbar icons from - I could measure it then! I presume its one of the system DLLs, but which one?

Also see: How big should a Firefox toolbar button be?

回答1:

Well, by a process of trial and error, it appears that icons sized 24x24 pixels are not rescaled. At least, that is the case with Internet Explorer 7.0.6001.18000. Would still like find a definitive reference for IE7 and ideally other versions too.


Another way to confirm it:

int x, y;
HIMAGELIST hImageList = (HIMAGELIST) SendMessage(m_hWndToolbar, TB_GETIMAGELIST, 0, 0);
ImageList_GetIconSize(hImageList, &x, &y);
ATLTRACE("Image size %ux%u", x, y);

Output:

Image list 24x24


回答2:

I assume we're talking about favicons? Wikipedia defines them as 16x16 in the first sentence.

The top four Google hits all indicate 16x16.

  • http://www.animatedfavicon.com/question/what-favicon-size.php
  • http://www.photoshopsupport.com/tutorials/jennifer/favicon.html
  • http://www.clickfire.com/favicon-tutorial/
  • http://www.favicon.cc/