Samanta
March 29th, 1999, 09:55 AM
Hello
HBRUSH COptionsDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
CWnd* StaticWnd;
StaticWnd = GetDlgItem(IDC_COLORPICK);
if(nCtlColor == CTLCOLOR_STATIC && StaticWnd == pWnd)
MessageBox("Static color event");
// TODO: Return a different brush if the default is not desired
return hbr;
}
The if statement is always FALSE, and i can't grab my Static box to change it color...
please help me
Thank You
P.S.
also i don't know what is the way of changing color of this static control...maybe fillsolidrect????
HBRUSH COptionsDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
CWnd* StaticWnd;
StaticWnd = GetDlgItem(IDC_COLORPICK);
if(nCtlColor == CTLCOLOR_STATIC && StaticWnd == pWnd)
MessageBox("Static color event");
// TODO: Return a different brush if the default is not desired
return hbr;
}
The if statement is always FALSE, and i can't grab my Static box to change it color...
please help me
Thank You
P.S.
also i don't know what is the way of changing color of this static control...maybe fillsolidrect????