Fullscreen DirectX Overlay? Yes.. again C#
Asked Answered
A

1

17

It looks like this question has been asked multiple times each in a different context and I have made some strides in making an overlay for a game (This is for informational data, etc..). I Would also like to make it inter-actable like Steam and XFire.

I have managed to get an overlay for a directx game while its in window mode... kinda.

I have looked all over stack overflow and google without a lot of luck.

If required, I can try this in C++ instead of C#. I know C# but I don't consider myself to be a professional by any means. Just need a better explanation. Heck I will be willing to put together a nice screencast/tutorial if I can get this working right.

NOTE : I would really like to do this with native code rather than a library but if there is a good free library out there, I would like to check it out.

Examples : How to overlay graphics on Windows games?

http://www.gamedev.net/community/forums/topic.asp?topic%5Fid=359794

C# "Lock" an overlay form to the position of another window

More Info : I did manage to get a windows form to overlay a game window with and set its parent to that with SetParent. This however, does not work very well because it will not work in fullscreen at all and the transparency didn't work. (basically had a transparency key and the TopMost was set to TRUE.) I would really like to find a different method.

Ascarid answered 23/8, 2010 at 15:23 Comment(7)
What's your actual question? And have you written any code yet? You're not likely to get a tutorial out of StackOverflow, but you'll get answers to specific questions if you have them. Also, I'm not sure "intractable" is the word you're looking for. Do you mean "interactable?"Therrien
I was trying to research the issue remotely. I will get some code later for example. I will try to make another edit with more information as well. Thanks. And yes I meant Inter-actable. Spellcheck failed me. :)Ascarid
gamedev.net/community/forums/topic.asp?topic_id=445141Forewoman
I actually tried that, it freezes and crashes in Vista and Win7. Thanks, though.Ascarid
Also see #926481Tenebrae
aib . I think thats what I'm looking for, did you manage to get it to work? an example would be awesome.Ascarid
@Tyler, I was also lingering around the similar stuff (injecting a dll into a 3d game process and calling setparent to my overlay). It doesn't work on fullscreen you say. Is that final? Also, is direct drawing is the only way to show your overlay onto the 3d fullscreen window?Dieterich
C
2

I did this in Delphi years ago. The only options at the time was to Inject a Native Win32 DLL into the process, the process would call my DLL DirectDraw functions and I would proxy the rest to the real DirectDraw. This was the only way I could guarantee it would work if the program switch full screen to/from windowed. My DLL would create a in-memory shared file space to communicate between it and my program.

The reason I did this was to write in game the persons(s) speaking in TeamSpeak or Ventrilo.

However, This method is not possible with CLR runtime objects. Your only optiont is to look into C++ Native DLL Injectrion/Wrapping.

Crystallization answered 28/11, 2010 at 7:27 Comment(2)
I've gone through the injection process. My problem is, I want to overlay chromium embedded views (like electron windows) on top of a full screen directx app. Any pointers on that?Dieterich
Nope. Probably won't work. In full screen mode the application has full screen priority, you can't put any overlay on top. The only option is to make DirectX draw functions in the app itself.Crystallization

© 2022 - 2024 — McMap. All rights reserved.