I don't want lots of WM_PAINT messages

Started by
1 comment, last by d000hg 21 years, 8 months ago
My level editor calls InvalidateRect whenever you scroll or load a new map etc. However if you drag the toolbar across, it keeps trying to repaint very quickly. However it calls my render() method each time which is too slow to keep up so you get a trailing white rectangle following. Can I somehow just find the latest occurance of a certain message in the queue and act on that, throwing away the others? ps do you know why I ca''nt just re-Present the scene? It doesn''t remember it if I render, then call Present an extra time. Read about my game, project #1 NEW (13th August): A new screenshot is up, plus diaries for week #3 John 3:16
Advertisement
Try to have timing on that... er... i mean give some ''clearance'' time before really re-render the whole thing. eg. all WM_PAINT received within one second after the 1st msg will be ignore.
Just my suggestion.
"after many years of singularity, i'm still searching on the event horizon"
Get rid of the CS_VREDRAW and CS_HREDRAW style bits
daerid@gmail.com

This topic is closed to new replies.

Advertisement