Changing Edit box colour on button click
-
Hi all, I want to change colour of my edit box on button click ...... how can i do this... Thanks in advance
-
Hi all, I want to change colour of my edit box on button click ...... how can i do this... Thanks in advance
Try this... SendMessage(m_hWnd, EM_SETBKGNDCOLOR, 0, RGB(0, 255, 255) :thumbsup:
-
Hi all, I want to change colour of my edit box on button click ...... how can i do this... Thanks in advance
Handle the
WM_CTLCOLOREDIT
message in the parent dialog and return the necessary colored brush. Since you want to do this on a button click, in the button click event handler, set a flag and then callUpdateWindow
for the edit control. In theWM_CTLCOLOREDIT
message handler you can check this flag before returning the colored brush.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)