Jump to content
  • Advertisement
Sign in to follow this  

Creating and drawing to a overlay

This topic is 4133 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I am writing a screen magnification tool using overlays. To do this I opted to use DirectDraw (because it's the only way I found to do it). I have basically tryed everything, and nothing seams to work. Here is what I tryed so far: So I create my overlay surface, but doing this will always fail on my computer unless I use YUV color mode. Any attempts to create a RGB overlay surface fail with $88760091 Invalid Pixel Format. But then trying to use GetDC on the overlay canvas will fail with 88760249 Can't create DC So, I tryed to go around this, created a memory surface, use GetDC on it, draw to it, and tryed to use Blt to copy it's contents to the overlay, then I get: $887601AE Surface Busy So I thougth, ok, I will try to use UpdateOverlay to copy the contents of the memory surface to my overlay. Now this works, or at least I see something on the screen. But this is a corrupted image! Nothing really distinguable, I can only see that this is partially working because it changes when it should. So I thougth: Maybe this happens because my memory surface was created without pixel mode, let's create a memory surface with YUV pixel mode! That also fails, with $88760091 Invalid Pixel Format Any ideas??? thanks a lot, Here is my full code: http://magnifier.cvs.sourceforge.net/magnifier/magnifierv3/libraries/pas_overlays/pas_overlays.dpr?revision=1.4&view=markup

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!