Changing the background color of Text control or combo box when text got changed
-
How to change the background color of Edit control or combo box only when some one has edited the text of text box or change the slection of combo box? Thanks in advance
asdasdadadasd
-
How to change the background color of Edit control or combo box only when some one has edited the text of text box or change the slection of combo box? Thanks in advance
asdasdadadasd
Background colors of controls are changed by handling the
WM_CTLCOLOR
message and returning a brush with the required color. In your case, you also need to check the text in the control and only then return the brush. You would also need to invalidate the control as soon as the edit text or combo selection is changed so that theWM_CTLCOLOR
handler gets called.«_Superman_» _I love work. It gives me something to do between weekends.