
Change background color of CButton
Quote:
>Use the WM_CTLCOLOR-message.
Override OnCtlColor() in the button's parent window, check that it is a
button being drawn (it is called once for each child control) and then use
SetBkColor() to change the button's text background colour (or use
SetBkMode(TRANSPARENT) if you just want to leave the background intact, for
a bitmap brush, say) and return the handle of a brush of the required
background colour for parts NOT covered by text (make sure the brush doesn't
go out of scope after OnCtlColor() returns - maintain it as a member
variable of your parent window's class).
Does this help?
_ _
o o Jason Teagle
<
Please ONLY respond via e-mail if you want to catch my attention - I don't
necessarily look at the newsgroups all the time.