dangerousdave
Jun 28th, 2000, 12:01 AM
...Anyway!
Right, the problem is that CreateDC Creates a DC but errr, hmm, well, I am thick, but its just common knowledge that you should be using CreateCompatableDC, not CreateDC...
SO say you had a Picturebox which will eventually house all your proggy's graphics and lets say its called picBackground. Now lets say you want to create a memory DC called hSpriteDC, with its width = 10 and height = 20...
hSpriteDC = CreateCompatibleBitmap(picBackground.hDC, 10, 20)
the 'h' in front of the Sprite is just a common letter that is used to show that that variable contains a *h*ANDLE to something, like a real handle, a handle in pooter speek is just a variable that you use to 'pick up' the data.
You BitBlt to that just like you would bitblt to a picturebox or form or whatever, except instead of writing .hDC after it you just write hSpriteDC, because, ah now I'm being patronising...
Any questions feel free to ask, I am bad at explaining things.
Right, the problem is that CreateDC Creates a DC but errr, hmm, well, I am thick, but its just common knowledge that you should be using CreateCompatableDC, not CreateDC...
SO say you had a Picturebox which will eventually house all your proggy's graphics and lets say its called picBackground. Now lets say you want to create a memory DC called hSpriteDC, with its width = 10 and height = 20...
hSpriteDC = CreateCompatibleBitmap(picBackground.hDC, 10, 20)
the 'h' in front of the Sprite is just a common letter that is used to show that that variable contains a *h*ANDLE to something, like a real handle, a handle in pooter speek is just a variable that you use to 'pick up' the data.
You BitBlt to that just like you would bitblt to a picturebox or form or whatever, except instead of writing .hDC after it you just write hSpriteDC, because, ah now I'm being patronising...
Any questions feel free to ask, I am bad at explaining things.