How to change push button color in Visual C++ 6.0 - YES
that is what I use!!
1. Create a button with the "OwnerDraw" property set.
2. Create an HBRUSH member variable in the Dialog class:
HBRUSH m_hButtonBrush;
3. In the initialization of the dialog _ OnInitDialog(),
initialize the variable to a color:
m_hButtonBrush = ::CreateSolidBrush(RGB(0,0,0)); // black
4. In OnCtlColor(..), add this:
// Colors the button controls black
if(nCtlColor == CTLCOLOR_BTN)
{
return m_hButtonBrush;
}
That is it my friend!
Respond via this posting. No e-mail please!

