Define a CBrush pointer in your dialog Class
Initialize the brush pointer in the constructor of your Dialog
Add the WM_CTLCOLR Message handler for the dialog and add the following code
Code:
CBrush *brush;
Code:
brush = new CBrush(RGB(49,49,49));
Code:
switch (nCtlColor) {
case CTLCOLOR_EDIT:
pDC->SetTextColor(RGB(0, 255, 0));
pDC->SetBkColor(RGB(0, 0, 0));
return (HBRUSH)(brush->GetSafeHandle());
default:
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
}

