I'm trying to figure out how to change the edit box colour when I click on the button. Btw, i'm using VC++ 6.0 (MFC).
One way I can do is assign a colour variable. When I click the button, the colour variable changes. When the program call the OnDraw function, it check whether the pWnd->GetDlgCtrlID() == EditBoxID. If it matches then set the background colour/text colour etc.
Is there any other better way of doing that..? Lets say I have 200 different controls, if I want to use the method above, then my OnDraw function would have 200 different if statements and that would make my code very yucky and general instead of control specific..