Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Small icon vs Large icon

Small icon vs Large icon

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studioannouncement
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Oss
    wrote on last edited by
    #1

    I'm using Chris Maunder's excellent CSystemTray class and I'm having some odd behavior that has to do with icon size. I don't believe that this has anything to do with Chris' class, but I thought I'd throw that in. What I'm finding is that the tray icon that's being inserted is the icon for my application, but an interpolated version of the large icon, not the real 16 x 16 icon. I've messed with SetIcon(icon,TRUE/FALSE) before inserting the icon in the tray to no avail. What's the proper procedure for guaranteeing the proper icon displays. Paul Oss

    P M 2 Replies Last reply
    0
    • P Paul Oss

      I'm using Chris Maunder's excellent CSystemTray class and I'm having some odd behavior that has to do with icon size. I don't believe that this has anything to do with Chris' class, but I thought I'd throw that in. What I'm finding is that the tray icon that's being inserted is the icon for my application, but an interpolated version of the large icon, not the real 16 x 16 icon. I've messed with SetIcon(icon,TRUE/FALSE) before inserting the icon in the tray to no avail. What's the proper procedure for guaranteeing the proper icon displays. Paul Oss

      P Offline
      P Offline
      Paul M Watt
      wrote on last edited by
      #2

      Have you tried explicitly loading the 16x16 version of your icon, then setting this into the tray class? I have run into this problem before, when just dealing with the shell tray directly.


      Build a man a fire, and he will be warm for a day
      Light a man on fire, and he will be warm for the rest of his life!

      P 1 Reply Last reply
      0
      • P Paul Oss

        I'm using Chris Maunder's excellent CSystemTray class and I'm having some odd behavior that has to do with icon size. I don't believe that this has anything to do with Chris' class, but I thought I'd throw that in. What I'm finding is that the tray icon that's being inserted is the icon for my application, but an interpolated version of the large icon, not the real 16 x 16 icon. I've messed with SetIcon(icon,TRUE/FALSE) before inserting the icon in the tray to no avail. What's the proper procedure for guaranteeing the proper icon displays. Paul Oss

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        Be sure you use LoadImage() to load a 16x16 icon. LoadIcon() only loads 32x32 (the AppWizard generated code does this, but it's buggy). --Mike-- "I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

        1 Reply Last reply
        0
        • P Paul M Watt

          Have you tried explicitly loading the 16x16 version of your icon, then setting this into the tray class? I have run into this problem before, when just dealing with the shell tray directly.


          Build a man a fire, and he will be warm for a day
          Light a man on fire, and he will be warm for the rest of his life!

          P Offline
          P Offline
          Paul Oss
          wrote on last edited by
          #4

          I have not. I guess I'm ignorant as to how to do that. I know how to load the icon (as resource) and then set the 16 x 16 through the SetIcon(xxx,BOOL) api (but that's not working for me). How do I explicitly load the 16 x 16 icon? Paul Oss

          P 1 Reply Last reply
          0
          • P Paul Oss

            I have not. I guess I'm ignorant as to how to do that. I know how to load the icon (as resource) and then set the 16 x 16 through the SetIcon(xxx,BOOL) api (but that's not working for me). How do I explicitly load the 16 x 16 icon? Paul Oss

            P Offline
            P Offline
            Paul M Watt
            wrote on last edited by
            #5

            You need to use the ::LoadImage API function, and specify the size for the icon, 16 x 16. Also, for the tray with anything below Win2000 and win9x you can only use the VGA palette for systray icons. Good Luck


            Build a man a fire, and he will be warm for a day
            Light a man on fire, and he will be warm for the rest of his life!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups