PDA

View Full Version : Problem with moving the window



MariZ
08-06-2006, 02:30 PM
I'm currently using DelphiX and i've got a small problem :
I draw some pictures on the DXDraw - everything is OK. But when i move the application window, the images isn't showing :(


DXDraw.Surface.Fill(0);
for t:=0 to DXImageList.Items.Count-1 do
DXImageList.Items[t].Draw(DXDraw.Surface,t*64,0,0) ;
DXDraw.Flip;

I draw the pictures with this function ;)

Traveler
08-06-2006, 03:52 PM
The code you have there should work properly.
Is it located in the main gameloop, like for example in the ontimer event?

If you haven't and you perform a resize, it'll clear the main surface, like you're describing in your post.

MariZ
08-06-2006, 04:55 PM
The drawing function was in the OnTimer event ;) But i managed to solve this problem myself - I just changed the main forms DragKind to dkDock ;) Thanks anyway :)