Refreshing a sprite window

Just starting out? Need help? Post your questions and find answers here.
Toris
User
User
Posts: 16
Joined: Mon May 05, 2003 6:59 pm

Refreshing a sprite window

Post 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
Toris
User
User
Posts: 16
Joined: Mon May 05, 2003 6:59 pm

Post 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 :)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

May be you can use a WM_Timer to do that (no need for thread)
Post Reply