Edit控件改变背景色

WM_CTLCOLOREDIT比WM_ERASEBKGND更方便,光响应WM_ERASEBKGND貌似不起作用!

 

To change the background color of a single-line edit control, set the brush handle in both the CTLCOLOR_EDIT and CTLCOLOR_MSGBOX message codes, and call the CDC::SetBkColor function in response to the CTLCOLOR_EDIT code.