-
Hi, Guys.
I have a little question:
I'm building a game. In the game I have a big Picturebox
and in the picturebox I have a lot of imageboxes.
the image boxes are for a big map.
the picture box is for bitblting.
when I bitblt after it I want to CLS the picture box, right?
but when I do it it takes a long time with the image boxes than without them.
It flashes every imagebox.
I want to clear only a specific 32x32 area on the picturebox. How can I do it? Please help!
Thank you,
Arie.
-
The only way I see is to overdraw this section using a blank picture... Sorry Arie but Images and Pictures are evil ;)
-
Fine with me,
Tell me how to overdraw with blank picture.
This is exactly what I need.
I need to use BitBlt? If yes what should I bitblt?
(I know that Images and Pictures are evil,
But I am a begginer and I don't know any other way)
Thank you,
Arie.
-
Allright, ARIE! Pop a long (no pun intended) to:
http://vbden.tripod.com/articles/invmask.htm
That should refresh your BitBlt knowledge. Then go to fox's website, skip the computer-crashing (;)) flash movie and go to the offscreen dc section, you could use one for each bitmap.
!!!
-
To overdraw a blank picture,
(sorry for the link i just felt like showing off my site :))
use:
(picBlank.backcolor = the colour that your BG is.)
(picture1 is i am assuming holding your pictures)
(X and Y are the starts of the "specific position")
bitblt picture1.hdc, X, Y, 32,32,picblank.hdc,0,0,srccopy
-
I don't know If you understood me right...
I am using a big picturebox,
in the picturebox I have a lot of Imageboxes,
In every imagebox I have a picture,
when I bitblt the bitblt is blting over the images,
(that's good), now I need to "unbitblt" the bitblt I done.
but still stay with the imageboxes perfectly.
Like BitBlting with a transparent color or something and CLSing the bitblt.
Understand?
Thank you for trying,
Arie.