forcing repaint after CDC::TextOut function
-
If that were true, couldn't I just put an Invalidate() in the program when I wanted it to repaint itself? That is, I call my TextOut functions...then tell it to Invalidate() (which eventually calls OnPaint())????
Invalidate is a function that cause the window to redraw itself. But all it does is call the OnPaint method, which didn't know anything about your drawings on the dc. Everytime OnPaint gets called, it gets a clean dc to draw on, OnEraseBkgnd makes sure of that, and your TextOut stuff would be gone with it. That's why everyone told you that your text drawing need to be called from within the OnPaint method. AliR. Visual C++ MVP
-
what do you mean by this? I have tried... PostMessage(WMPAINT,0,0), but that didn't work either.
No You can declare WM_PAINT in your program and insert your functions to it(use form dc)_**
**_
whitesky