Timer not invalidating

18-Apr-2020 00:57

As a general rule, simple 2D games work well simply by using the normal Windows redraw mechanisms.

Based on user input and game mechanics, invalidate only the portion of the window that has actually changed, when it changes, and let the paint event redraw it next chance it gets.

If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.

Hi, I have a simple form that handles all its paint functionality like so: this. It makes no sense to call Invalidate when what you've just done is to have redrawn the control.

However, typically a game that requires a high frame rate will not use the normal window messaging paradigm at all.[...] Interestingly enough the game works pretty well, in the sense that Mouse Events and Key Events get trapped fine and all the animations are drawn rather nicely.Why those events work and not the timer is beyond my understanding :) Probably because the message queue isn't strictly FIFO.You'll be able to ask any tech support questions, or chat with the community and help others.

Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.

You wouldn't waste time invalidating and waiting for a WM_PAINT message (which is what underlies the . In this case, often only small areas of the screen are actually going to change at any given time.