That's not how you change colors of a dialong control.

You have to handle the proper WM_CTLCOLORBTN/WM_CTLCOLORDLG/WM_CTLCOLOREDIT/WM_CTLCOLORLISTBOX/WM_CTLCOLORSTATICWM_CTLCOLORSCROLLBAR message to set the color.