• Advertisement
Sign in to follow this  

Question On Windows Flashing During Animation

This topic is 4588 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a question regarding animation on Windows APP. I'm using MFC, CDC, and Visual C++ to do 2-D animation inside a Window. I have an image that I draw and I want it to move about inside my Window. I have a thread which calls a func to perform the needed transformation calculations. This function draws the new image to a bitmap. Then the function calls the OnPaint routine to StretchBlt the bitmap. The entire image flashes for a second when I invalidate the window to update the image. I tried to over-load the OnEarseBackground, but it did nothing. I thought drawing to a bitmap instead of drawing to the screen prevented this sort of screen flashing. Is the window re-drawing my entire image each time I invalidate the window??? I'm using the CDC instead of OpenGL. Should I just go ahead and switch over. I've been coming across lots of different little problems. The only real reason I'm using CDC is because of the bitmap functionality. I intend to draw to one single bitmap, but have multiple windows display the same image in different fashion (ie using stretch blt to zoom and another window pan to another area of the image). Can I something similar in OpenGL? Thanks in advance for any help. Sorry, I have so many questions.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement