Moving a image by using API without erasing a real image control
Author |
Message |
Zheng-Wei Huan #1 / 7
|
Moving a image by using API without erasing a real image control
Hi, I am sorry to ask the same question again. Although Mike had answered me, I can't browse the answer in his reply(Message unavailable). So, execute me to your time, or Mike, to answer me again, PLEASE....! ~^_^~ ------------ QUESTION ------------ I uses API "Bitblt" function to move a image. But some problem happened to me: I move a image, named A, from P point to Q point. And on the path(P to Q), I put another image(I mean, a real image control), named B. While A goes through B, A will erase B. After A arrives at Q point, B will be re-appeared again! How do I solve it?
Thanks A LOT!! And Mike, THANKS.
|
Sun, 05 Oct 2003 11:37:11 GMT |
|
|
Jim Deutc #2 / 7
|
Moving a image by using API without erasing a real image control
What do you _want_ to happen? Do you want to somehow combine the images where they overlap? That's not easy to do (it will greatly slow down your animation). Jim Deutch MS Dev MVP
Hi, I am sorry to ask the same question again. Although Mike had answered me, I can't browse the answer in his reply(Message unavailable). So, execute me to your time, or Mike, to answer me again, PLEASE....! ~^_^~ ------------ QUESTION ------------ I uses API "Bitblt" function to move a image. But some problem happened to me: I move a image, named A, from P point to Q point. And on the path(P to Q), I put another image(I mean, a real image control), named B. While A goes through B, A will erase B. After A arrives at Q point, B will be re-appeared again! How do I solve it?
Thanks A LOT!! And Mike, THANKS.
|
Mon, 06 Oct 2003 01:21:27 GMT |
|
|
Mike D Sutto #3 / 7
|
Moving a image by using API without erasing a real image control
Quote: > I am sorry to ask the same question again. Although Mike had answered > me, I can't browse the answer in his reply(Message unavailable). > So, execute me to your time, or Mike, to answer me again, PLEASE....!
~^_^~ I think there may be something wrong with the server, or it got cleared out as I can't see the old posts either :) However, using the magic of the "Sent items" folder: "Try using a DoEvents call in your animation loop or refresh the picture/image box each frame. If that still doesn't work replace your image control with a picture box control and set it to AutoRedraw." Hope this helps, Mike -- EDais -- WWW: Http://Members.xoom.com/EDais/
|
Mon, 06 Oct 2003 06:36:14 GMT |
|
|
Zheng-Wei Huan #4 / 7
|
Moving a image by using API without erasing a real image control
Dear Jim, YES, it is what I want to happen. While the moving image moved by using Bitblt funtion passes through a real image control, the image control will be erased until the Bitblt stops to copy imgame in the memoey. The effect I wants is to see that they can overlap without someone erases the other. But, if it did greatly slow down the animation, should I avoid them overlapping? I mean, should I put the image control somewhere else to avoid the "Animation" passing through it? Best, David Quote: -----Original Message----- What do you _want_ to happen? Do you want to somehow combine the images where they overlap? That's not easy to do (it will greatly slow down your animation). Jim Deutch MS Dev MVP
Hi, I am sorry to ask the same question again. Although Mike had answered me, I can't browse the answer in his reply(Message unavailable). So, execute me to your time, or Mike, to answer me again, PLEASE....! ~^_^~ ------------ QUESTION ------------ I uses API "Bitblt" function to move a image. But some problem happened to me: I move a image, named A, from P point to Q point. And on the path(P to Q), I put another image(I mean, a real image control), named B. While A goes through B, A will erase B. After A arrives at Q point, B will be re-appeared again! How do I solve it?
Thanks A LOT!! And Mike, THANKS. .
|
Mon, 06 Oct 2003 22:12:32 GMT |
|
|
Jim Deutc #5 / 7
|
Moving a image by using API without erasing a real image control
Quote:
>Dear Jim, >YES, it is what I want to happen. While the moving image moved by using >Bitblt funtion passes through a real image control, the image control will >be erased until the Bitblt stops to copy imgame in the memoey. The effect >I wants is to see that they can overlap without someone erases the other. >But, if it did greatly slow down the animation, should I avoid them overlapping? >I mean, should I put the image control somewhere else to avoid the "Animation" >passing through it?
That is certainly the easiest solution. If you want to blend the animated picture with the background, Mike has some code available you can try, but each "frame" of your animation will take, I'd guess, 100x as long to produce! Jim Deutch MS Dev MVP
|
Mon, 06 Oct 2003 22:41:39 GMT |
|
|
Mike D Sutto #6 / 7
|
Moving a image by using API without erasing a real image control
Quote: > That is certainly the easiest solution. If you want to blend the animated > picture with the background, Mike has some code available you can try, but > each "frame" of your animation will take, I'd guess, 100x as long to > produce!
Boolean transparency isn't _that_ slow, I'd say it would take no more than 5* as long to draw max, all it is is one extra call to BitBlt(). Have a look at the TransEdit app on my site for creating the mask image and there's various samples on there to show you how to blit transparently, the animated transparent blit demo for example. Hope this helps, Mike -- EDais -- WWW: Http://Members.xoom.com/EDais/
|
Mon, 06 Oct 2003 22:38:39 GMT |
|
|
Jim Deutc #7 / 7
|
Moving a image by using API without erasing a real image control
I think he's talking about pixel-by-pixel partial transparency (alpha-channel type of stuff). That's why I guessed 100x slower... Jim Deutch MS Dev MVP
Quote: > > That is certainly the easiest solution. If you want to blend the animated > > picture with the background, Mike has some code available you can try, but > > each "frame" of your animation will take, I'd guess, 100x as long to > > produce! > Boolean transparency isn't _that_ slow, I'd say it would take no more than > 5* as long to draw max, all it is is one extra call to BitBlt(). Have a look > at the TransEdit app on my site for creating the mask image and there's > various samples on there to show you how to blit transparently, the animated > transparent blit demo for example. > Hope this helps, > Mike > -- EDais -- > WWW: Http://Members.xoom.com/EDais/
|
Wed, 08 Oct 2003 00:18:20 GMT |
|
|
|