I've got an EDIT object that I'm trying to change the background color to black and the text to white. Well I've gotten it so that when you type in something...the text is white and the text background is black...but the actual EDIT background is still white and it's causing sort of a border of white around my text. If there is no text in the box...the background looks white. I've tried everything I can think of...this is what I have for my code so far:
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (pWnd->GetDlgCtrlID() == IDC_EDIT_DIAL)
switch (nCtlColor)
{
case CTLCOLOR_MSGBOX:
case CTLCOLOR_EDIT:
pDC->SetTextColor(RGB(255, 255, 255));
pDC->SetBkColor(RGB(0, 0, 0));
return (HBRUSH) (m_brush->GetSafeHandle());
default:
;
}
m_brush is a pointer of CBrush type...
This is of course inside my OnCtrlColor function to override the default. One thought....should my m_brush be a direct member variable of my Dlg class? Any and all help/comments would be appreciated. Thanks in advance.
Niky Williams
NTS Marketing
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (pWnd->GetDlgCtrlID() == IDC_EDIT_DIAL)
switch (nCtlColor)
{
case CTLCOLOR_MSGBOX:
case CTLCOLOR_EDIT:
pDC->SetTextColor(RGB(255, 255, 255));
pDC->SetBkColor(RGB(0, 0, 0));
return (HBRUSH) (m_brush->GetSafeHandle());
default:
;
}
m_brush is a pointer of CBrush type...
This is of course inside my OnCtrlColor function to override the default. One thought....should my m_brush be a direct member variable of my Dlg class? Any and all help/comments would be appreciated. Thanks in advance.
Niky Williams
NTS Marketing