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. Highlighting Images

Highlighting Images

Scheduled Pinned Locked Moved C / C++ / MFC
comlinuxtutorialquestion
3 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.
  • J Offline
    J Offline
    Joseph Dempsey
    wrote on last edited by
    #1

    Does anyone here know how to highlight an icon ( or other image type ). I am working on a project that i want to be able to display an icon with some text and have it be able to obtain a selected state it which the image will becomes "hazed" with the system highlight color much like the icons in the windows shell when you click on them. The closest i have come on my own is using the AlphaBlend function but then i am left with a background that isn't transparent and so i can't Blt it to the Primary DC. Any ideas? Please note that i can not use Image Lists to do this. Joseph Dempsey joseph_r_dempsey@yahoo.com

    J 1 Reply Last reply
    0
    • J Joseph Dempsey

      Does anyone here know how to highlight an icon ( or other image type ). I am working on a project that i want to be able to display an icon with some text and have it be able to obtain a selected state it which the image will becomes "hazed" with the system highlight color much like the icons in the windows shell when you click on them. The closest i have come on my own is using the AlphaBlend function but then i am left with a background that isn't transparent and so i can't Blt it to the Primary DC. Any ideas? Please note that i can not use Image Lists to do this. Joseph Dempsey joseph_r_dempsey@yahoo.com

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      I think it can be done with DrawState, using GetSysColorBrush(COLOR_HIGHLIGHT) as the brush. If this does not work, some playing around with the parameters may get the result you desire. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      J 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        I think it can be done with DrawState, using GetSysColorBrush(COLOR_HIGHLIGHT) as the brush. If this does not work, some playing around with the parameters may get the result you desire. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        J Offline
        J Offline
        Joseph Dempsey
        wrote on last edited by
        #3

        You know, that was the first function that came to mind for me as well but unfortunatly there is no state flag for selected. I'll look into drawing it with a brush like you said though but i don't think i'm going to hold my breath because MSDN docs on the function say that the brush is only used for drawing the image in a monochrome state which wouldn't do me to much good :( Joseph Dempsey joseph_r_dempsey@yahoo.com

        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