Colorizing Buttons - Programmer
This is a discussion on Colorizing Buttons - Programmer ; Have done a lot of reading and a lot of web searching, but cannot find GOOD
instructions for how to change the color of a button, background and text.
Nothing I have tried has worked. Anyone done this? Mind sharing ...
-
Colorizing Buttons
Have done a lot of reading and a lot of web searching, but cannot find GOOD
instructions for how to change the color of a button, background and text.
Nothing I have tried has worked. Anyone done this? Mind sharing your code?
Frank
FJRusso@-SPAM-Yahoo.com ( Take the -SPAM- out)
NC
-
Re: Colorizing Buttons
"Frank J. Russo" wrote in message
news:JBGof.5722$Dd2.5496@newsread3.news.atl.earthl ink.net...
> Have done a lot of reading and a lot of web searching, but cannot find
> GOOD instructions for how to change the color of a button, background and
> text. Nothing I have tried has worked. Anyone done this? Mind sharing
> your code?
Try searching on 'ownerdraw' buttons. That should work.
The trick is to let Win know you, yes, YOU, want to draw the button, instead
having it done by the system. For every event that can take place to a
button (e.g., being drawn on screen, selected, or pushed) win sends a
message to the parent window of the button (was that WM_OWNERDRAW?). The
message comes with its own DC, and you are quite free to do whatever you
want to draw the button in this DC.
[jongware]