I have an MFC application that updates a standard edit control once per second. When new data comes in (once per second), the Invalidate routine is called to repaint the text in the edit control. This works well except when I move the mouse over the edit
control. When I do this, the edit control goes blank and doesn't display data until I get new data (anywhere from 0 to 1 second, depending on when the last data update occurred). If I move another window over the edit control, this phenomena does not occur
- it's only when I move the mouse over the edit control.
Here are things that I've already tried:
- Windows XP: This problem does not happen in Win XP.
- Changed Win 7 theme to "Windows Classic": This problem did not happen.
- Changed Win 7 theme to "Windows 7 Basic": This problem still occurs.
- Disabled the Desktop Windows Manager service: This problem still occurs.
I also ran the Spy++ application to try to figure out if there's some Windows message that I'm not handling, but nothing was obvious to me. Normally, the window gets WM_ERASEBKGND and WM_NCPAINT messages. When I move the mouse over the edit control,
I also get WM_NCHITTEST, WM_SETCURSOR, WM_NCMOUSEMOVE, and WM_PAINT messages.
Can somebody please let me know why Win 7 does this? If you could point me to other things to try or already know what's going on, I would appreciate it. Thanks!