Greetings to all ...
Can someone post a solution to dynamically change a button's color?
Thanks in advance.
You must intercept the WM_CTLCOLOR message and change the color using aQuote:> Greetings to all ...
> Can someone post a solution to dynamically change a button's color?
> Thanks in advance.
> Phil Tusa
HBRUSH CMyDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (nCtlColor == CTLCOLOR_BTN)
return m_hbrBack; // a brush previously created 'ad hoc'
// TODO: Return a different brush if the default is not desired
Hope this helpsQuote:}.
MultiMedia Soft ( http://www.multimediasoft.com )
this should be easy...I have a winCE application not using MFC. I've a
button and I simply want to change its color.
What should I do ?
I tryed catching the WM_CTLCOLORBTN message and by using lparam and wparam
and SetBkcolor().. but it doesn't work...
Any suggestion ??
what's the meaing of SetSysColor() ??
Thank in advance