bitblt problems

blursea
08-24-2001, 10:50 AM
i have done like this :
Private Sub PLANE()
Dim SUCCESS As Integer
SUCCESS = BitBlt(Form1.Picture9.hDC, xplane, yplane, Picture1.ScaleWidth, Picture1.ScaleHeight, Picture1.hDC, 0, 0, SRCAND)
SUCCESS = BitBlt(Form1.Picture9.hDC, xplane, yplane, Picture2.ScaleWidth, Picture2.ScaleHeight, Picture2.hDC, 0, 0, SRCPAINT)
End Sub


But i have problems when the game runs,see the picture in the attachement please!

BillSoo
08-24-2001, 10:54 AM
You are getting there....

you need to erase the old plane before plotting the new. You can do this by erasing and redrawing the whole screen. You will have flicker problems unless you use some form of double buffering. One way to buffer is to set the AUTOREDRAW property of the viewing picture to TRUE, then do all your drawing. The changes will occur in the back buffer and will not flicker the screen. When you are done, do a REFRESH method and it will copy the back buffer to the screen in one go.



"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

blursea
08-24-2001, 11:54 AM
i don't understand, can you please explain on more detail and give me an exemple for that

BillSoo
08-24-2001, 12:56 PM
You can refer to my "Moving Tile" example. That uses the technique I mentioned....



"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum