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