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. Wrong Colors

Wrong Colors

Scheduled Pinned Locked Moved C / C++ / MFC
databasegraphicshelpquestion
5 Posts 2 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.
  • G Offline
    G Offline
    Great ATuin
    wrote on last edited by
    #1

    hi, strange problem with my colors: i want to display a tray icon but it always appears in black & white although the image HAS color. I've tried it with a 256 color bitmap, a 256 color icon, a 24 Bit color bitmap and a 24 Bit color icon (every variant with 16x16 Pixel) each time the same effect - JUST BLACK AND WHITE. Even with different functions for loading the images hasn't changed it. (tried LoadIcon, LoadImage and CreateIconIndirect ) any ideas what this may trigger ? greets

    B 1 Reply Last reply
    0
    • G Great ATuin

      hi, strange problem with my colors: i want to display a tray icon but it always appears in black & white although the image HAS color. I've tried it with a 256 color bitmap, a 256 color icon, a 24 Bit color bitmap and a 24 Bit color icon (every variant with 16x16 Pixel) each time the same effect - JUST BLACK AND WHITE. Even with different functions for loading the images hasn't changed it. (tried LoadIcon, LoadImage and CreateIconIndirect ) any ideas what this may trigger ? greets

      B Offline
      B Offline
      benjymous
      wrote on last edited by
      #2

      Unless you're using Windows XP, tray icons always render using the standard 16 system colours, so you'll need to provide a 16 colour icon to stop it trying to convert it for you (which usually looks awful) On XP, it renders the icons properly, using all available colours -- Help me! I'm turning into a grapefruit! Buzzwords!

      G 1 Reply Last reply
      0
      • B benjymous

        Unless you're using Windows XP, tray icons always render using the standard 16 system colours, so you'll need to provide a 16 colour icon to stop it trying to convert it for you (which usually looks awful) On XP, it renders the icons properly, using all available colours -- Help me! I'm turning into a grapefruit! Buzzwords!

        G Offline
        G Offline
        Great ATuin
        wrote on last edited by
        #3

        you're right - windows converts my icon into 16 colors. but how do i can make sure to use only the standard 16 system colors ?

        B 1 Reply Last reply
        0
        • G Great ATuin

          you're right - windows converts my icon into 16 colors. but how do i can make sure to use only the standard 16 system colors ?

          B Offline
          B Offline
          benjymous
          wrote on last edited by
          #4

          The simplest way is to copy your existing icon, add a new 16 colour icon to the resource in visual studio, and paste in your icon. This will create a 16 colour icon which you can then manually edit until it looks good enough (you can often redraw the icon yourself far better than windows will do itself when it remaps the icon at runtime) -- Help me! I'm turning into a grapefruit! Buzzwords!

          G 1 Reply Last reply
          0
          • B benjymous

            The simplest way is to copy your existing icon, add a new 16 colour icon to the resource in visual studio, and paste in your icon. This will create a 16 colour icon which you can then manually edit until it looks good enough (you can often redraw the icon yourself far better than windows will do itself when it remaps the icon at runtime) -- Help me! I'm turning into a grapefruit! Buzzwords!

            G Offline
            G Offline
            Great ATuin
            wrote on last edited by
            #5

            hm, although i hoped that i didn't have to redraw the icon by my self it's seems there leads no way around. 16 colors are ridiculous :mad: however, thanks anyway.

            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