Edit控件改变背景色

来源:互联网 发布:网络舆情参考 编辑:程序博客网 时间:2024/04/30 20:12

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.