Hi, I just want to show to the user that he or she has changed the contents of a form and it need to be saved. So I want to paint edit boxes with yellow color when it contents has changed and after pushing save button I want to paint them with the default windows xp color for the background.
By using the SetStyle method I saw two problems:
1. When user is typing text the backgound remains with the default color and not yellow. Only When loose focus occurs it is painted with yellow color. What I want if "real-time " painting while user is typing and not only when lost focus happens.
2. Suppose a form with 2 edit boxes. I type text on the first and it doesnt changed the color (see 1.). When I pass focus to the second edit it becomes yellow. But If I put focus on the first edit box again it is painted with default color again while editing. It seems that while the focus is in the widget no backcolor is applied.
I liked this (your) code to avoid cast
edit1 <<= THISBACK1(OnEdit, &edit1);
edit2 <<= THISBACK1(OnEdit, &edit2);
Sorry, If your source code and ideas solve this, but only at night I can try it on the other computer. This one still has the 2007 version of Upp.