Page 1 of 1

Refreshing a sprite window

Posted: Fri Aug 08, 2003 12:38 pm
by Toris
Hi,

I've got a window, that is a sprite screen, which I need to redraw every time part of it is overdrawn.
Currently, when a window goes over the top of this sprite window, it is not re-drawn. I need to redraw the window whenever a part of it is overwritten.
I have tried #PB_Event_Repaint, but this only seems to repaint when the window loses complete focus, then gains it again.
I have seen a few suggestions on this forum, about using the window callback function, but as my aim is for my project to work on both windows and linux once finished, I need another solution...

Any ideas?

Many thanks,
Toris

Posted: Sat Aug 09, 2003 11:00 am
by Toris
Well, it's probably not the best way of doing it, but I've created a seperate thread that refreshes the window 10 times a second. If anyone knows of a better way of doing this, I'd love to hear it :)

Posted: Sat Aug 09, 2003 1:04 pm
by Fred
May be you can use a WM_Timer to do that (no need for thread)