Hi,
I am asking a stupid question but I am not sure which API is the best. I want to prevent the screen flickering when I am doing drawing on the application window. Which API should I use to save the desktop or application window and then release it for update. Your knowledge would be helpful.
Thanks..newAsm
Try WM_SETREDRAW, but it depends what you're drawing on.
invoke SendMessage, hCtrl,WM_SETREDRAW,FALSE,0
;...do your drawing/modifying...
invoke SendMessage, hCtrl,WM_SETREDRAW,TRUE,0
If you're drawing to the DC yourself, you should create a memory DC, draw to that, and then bitblt to the window DC in one go when you're finished.
Yep, double buffering is the way to go if you want to minimize or prevent screen flicker. Tedd is absolutely correct, do your manipulations on the memory DC and then a single BitBlt will paint it in one operation.
HR,
Ghandi
Here is a handy reference that might help:
http://catch22.net/tuts/flicker