Best Icon size for displaying in the tray

前端 未结 3 2046
天命终不由人
天命终不由人 2020-12-16 02:04

I am working on a Delphi program which will display an icon on the \"tray\". I am doing it \"the hard way\" (using the Shell_NotifyIcon api, etc and not a component, for rea

3条回答
  •  忘掉有多难
    2020-12-16 02:33

    You should be using 32bpp icons with partial transparency for best effect.

    The icon uses the small system size. Get this by calling GetSystemMetrics passing SM_CXSMICON. If you use font scaling this can be, for example, 20px rather than the more common 16px. I've never found MS documentation for this fact but you can readily verify it for yourself by trial and error. Not really a happy state of affairs, but it is what it is.

    Update: TOndrej points out that the docs for LoadIconMetric gives tacit approval of the notification area icon being small icon size. I don't understand why this information is not included with that for notification icons.

提交回复
热议问题