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. Regular button questions...

Regular button questions...

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
4 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.
  • T Offline
    T Offline
    Tommy H D Svensson
    wrote on last edited by
    #1

    Hi, Q1: I have a flat owner draw button that seems to work ok with an icon attached to it. Now the thing is that I want to change the background color of the window which the button is attached to, and I want the color to shine through the button, sort of having a transparent button. How can I do this? Q2: If I make an Icon in the VC++ editor, can't I use some sort of transparency background color? (To solve the question aforementioned)

    T 1 Reply Last reply
    0
    • T Tommy H D Svensson

      Hi, Q1: I have a flat owner draw button that seems to work ok with an icon attached to it. Now the thing is that I want to change the background color of the window which the button is attached to, and I want the color to shine through the button, sort of having a transparent button. How can I do this? Q2: If I make an Icon in the VC++ editor, can't I use some sort of transparency background color? (To solve the question aforementioned)

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      If I make an Icon in the VC++ editor, can't I use some sort of transparency background color? Yes, Windows icons can have 'transparent' pixels. In VC++ Icon Editor, use one of the silly-looking tools in the color palette. It's rather hard to describe, looks more or less like little green monitor located in the upper row of icons, on the left side of black rectangle. Tomasz Sowinski -- http://www.shooltz.com

      T 1 Reply Last reply
      0
      • T Tomasz Sowinski

        If I make an Icon in the VC++ editor, can't I use some sort of transparency background color? Yes, Windows icons can have 'transparent' pixels. In VC++ Icon Editor, use one of the silly-looking tools in the color palette. It's rather hard to describe, looks more or less like little green monitor located in the upper row of icons, on the left side of black rectangle. Tomasz Sowinski -- http://www.shooltz.com

        T Offline
        T Offline
        Tommy H D Svensson
        wrote on last edited by
        #3

        Yes, I've tried using that "color". But my window background, to which my button is attached to, does not "shine" through the button. I get a greyish look of the button even if I have a blue background window. Maybe the CButton class defaults to a color...? /T

        T 1 Reply Last reply
        0
        • T Tommy H D Svensson

          Yes, I've tried using that "color". But my window background, to which my button is attached to, does not "shine" through the button. I get a greyish look of the button even if I have a blue background window. Maybe the CButton class defaults to a color...? /T

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #4

          On Win2000 you can use UpdateLayeredWindow to create translucent windows. With earlier versions your only solution is to copy background bits to DIB section and compose the foreground bits using some blending function, then copy DIB section to screen as button image. If all you need is completely blue button with icon, handle WM_CTLCOLORBTN. Tomasz Sowinski -- http://www.shooltz.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