|
-
Aug 11th, 2002, 12:13 PM
#1
Thread Starter
Frenzied Member
Drawing directly to the screen?
Hi, I'm working on a VB project where I need to draw and animate a small image (with a transparent background) to the screen. I can do it using bitblt and GetWindowDC(0), but I would then need to clear part of the screen when moving it or animating it. I tried using RedrawWindow but it doesn't seem to work. Even if it did, at 25 frames per second it would produce a visible flicker - is there any other way? Or can you at least help me the way I'm doing it? (I've seen lots of programs doing this and they all work perfectly...)
Thanks
-
Aug 12th, 2002, 11:37 PM
#2
Frenzied Member
Simply find a bounding box around the image you want to draw, and save the image. Also, you can Set a transparency flag on your window, which causes everything BEHIND the window to be drawn on top of it(I Believe). You could create a window like this, and then draw to that window, like normal. I think that the flag is WS_EX_TRANSPARENT, look it up in MSDN. If that is NOT the flag name, look up the CreateWindowEx() API call. It will be listed in that section.
Z.
-
Aug 13th, 2002, 04:36 PM
#3
Thread Starter
Frenzied Member
Thanks... I'll try that and post back tomorrow (sorry I know I posted twice but I can't delete any of the posts hehe )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|