For versions of Windows prior to Vista, I have been able to set the background color for my edit controls ("EDIT" controls created using CreateWindowEx) by responding appropriately to their WM_CTLCOLOREDIT and WM_CTLCOLORSTATIC messages (setting the background color and returning a brush of the color). When running my application on Vista (at least with the Aero scheme), I have found that this works as before when an edit control is enabled, but that it has no effect if the control is disabled. The EDIT control now always seems to draw with the dialog background color when it is disabled without regard to what it is told.

Curiously, even intercepting the WM_ERASEBKGND of the edit control and painting it myself does not solve the problem. It seems like maybe when the text is drawn it is repainting the client area of the edit control again.

Does anyone know why this changed Is it possible to work around this