Click to See Complete Forum and Search --> : Direct Draw transparent window?


jamesm80
February 25th, 2005, 10:07 AM
Hello,

I'm really new to DirectX / DirectDraw and i haven't been using C++ long either. However, i'm managing to get to grips with most things, and i created a direct draw object and written some text to it in full screen mode with a back buffer etc.

I am trying to make a GUI for an existing game for a mod. So i made direct draw write on the HDC of the game window. My problem is, that the direct draw window created has a black background and so i can't see the game. Is there any way of making the direct draw window transparent so i can see what is behind what was drawn by direct draw. Then perhaps i can write to specific areas of the direct draw window, and still see the game?

Hope that made sense...

If this is not possible, is there another way?

P.S. i'm using DirectDraw because normal TextOut flickered badly on top of the game, and i was told that double buffereing in DirectDraw would make it smooth... and wow, it is... but now i can't see the game :)

Thanks,
James.

Elementer
February 25th, 2005, 11:40 AM
Here is and example of transparent window application: (Eyekeeper app)

http://nehe.gamedev.net/data/downloads/download.asp?letter=E

If you open a new window upon a existing one, all you can do is that exmple. I don't undestand what you want to do, a mod where you create a new window above the existing one ? A game is all in one window, what do you mean ? All that DirectDraw can is blit with sphisticated color keying system that allow you to draw transparent images...

Regards

jamesm80
February 25th, 2005, 11:56 AM
I mean that i want to make the front buffer direct draw surface transparent to the game running behind it. (a seperate application window). So that i can write on PARTS OF the front surface and the rest be transparent to the game. I.e. making a GUI on top of the game.

Make sense?

jamesm80
February 25th, 2005, 12:00 PM
Thanks, that example seems to be what i am looking for. Do you think it will work on top of a game, instead of the desktop?

Elementer
February 26th, 2005, 05:56 AM
I think it will works, but if a game is in windowed mode not fullscreen, because fullscreen mode force the window to topmost extended mode, so try...
What I can't undestand (just curiousily) is why are you creating 2 differents apps and 2 differents window for one game ? How they interacts ?

Bye