全屏的DirectX覆盖?是的..再次C#

编程入门 行业动态 更新时间:2024-10-13 14:27:15
本文介绍了全屏的DirectX覆盖?是的..再次C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

它看起来像这个问题已经被问每个多次在不同的背景和我已经在做覆盖了游戏中的一些进步(这是信息数据等)。我还想让它-,它可作用似间蒸汽和XFire的。

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.

我已经成功地得到支持DirectX游戏的覆盖,而其在窗口模式下...有点儿。

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.

如果需要,我可以在C ++而不是C#试试这个。我知道C#,但我不认为自己是一个专业的任何方式。只需要一个更好的解释。哎呀我愿意放在一起一个不错的截屏/教程,如果我能得到这个工作的权利。

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.

例子:的 stackoverflow/questions/3266346/how-to-overlay-graphcis-on-windows-games

的 www.gamedev/community/forums/topic.asp?topic%5Fid=359794

stackoverflow/questions/1442303/c-lock-an-overlay-form-to-the-position-of-another-window

更多信息:我还是设法得到一个窗口形式叠加一个游戏窗口及其父设置为与的setparent。然而,这是因为它不会在全屏在所有的工作和透明度没有工作,没有很好地工作。 (基本上有一个透明键和顶端设置为TRUE。)我真的想找到一个不同的方法。

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.

推荐答案

我在Delphi年前这样做。当时唯一的选择是注入一个本地Win32 DLL到进程,这个过程会叫我的DLL的DirectDraw功能,我会代理剩下的真正的DirectDraw。这是我可以保证,如果该程序从窗口切换全屏/它会工作的唯一途径。我的DLL将创建一个内存中的共享文件空间,它和我的程序之间的通信。

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.

我之所以这样做是在游戏中写说的人(S)在TeamSpeak或用Ventrilo

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

然而,这个方法是不可能与CLR运行时对象。你唯一optiont是寻找到C ++本地DLL Injectrion /包装。

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

更多推荐

全屏的DirectX覆盖?是的..再次C#

本文发布于:2023-11-07 23:35:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567736.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:全屏   DirectX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!