I wanted to change the background color of progress control.
In dialog, I overrided WM_CTLCOLOR.
The class wizard created a function called as OnCtlColor().
Below is my code.
HBRUSH CMyDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlcolor)
if (m_progress.GetSafeHwnd() == pWnd->GetSafeHwnd())
return m_brush; // for example, red brush
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
My progress control still has gray background.
I have another question.
How can I remove or erase the "border" of progress control?
The style of "border" is WM_EX_STATICEDGE.
I create new class. Base class is CProgressCtrl.
I overrided WM_PAINT message.
But, I can't erase the "border".
Thanks again. Good lucks!