Jump to content

Window Ontop of an DirectX/OpenGL Api


Recommended Posts

Hi folks!

I started to program a chat and i want to add an "ingame" function with which the user is able to chat while he is playing a game (similar to Xfire).

I first thought of the topmost, but that won't work for games which are made with DirectX or OpenGL (so it won't work for nearly every 3D game :)).

I used google for hours but the only thing i found out is that this could be done by dll hooking (on which i didn't find any tutorials/a library for c++/DLLs/examples/UDFs)

Does anybody of you know an UDF/tutorials/a library for c++/DLLs/examples for making an windo ontop of a DirectX/OpenGL api?

(I'm not English, so there might be some grammar and spelling mistakes :party:)

Edited by DeathlyAssassin

[url='http://www.autoitbot.de'][/url]

Link to comment
Share on other sites

You will be banned if I hear of you having PMed another user about this. Do not PM users asking for help. Consider yourself lucky, the last person who pulled this stupid stunt was banned.

Edit: And especially don't PM developers. Is it not enough that we make the language? Must we write your scripts for you, too?

Edited by Valik
Link to comment
Share on other sites

I gave both of them a try and this is very close to what I expect, but the first UDF is for making OpenGL programms and not putting a window on top of it and with the second one it's the same but with DirectX... anyway, these are very nice UDFs :D

Does anyone have some other suggestions?

Edited by DeathlyAssassin

[url='http://www.autoitbot.de'][/url]

Link to comment
Share on other sites

Wrte a plugIn for gamepe :D

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

@Valik: I'm very sorry, I didn't know that I'm not allowed to do this..

It's called common sense. I suggest you start using it. You will not last long here if you do not use common sense.
Link to comment
Share on other sites

Let me have some time to give this a try :D

I thing this might work(even if i have no source code and there are no command lines) , but nevertheless has anyone else a good idea for solving my problem?

Edited by DeathlyAssassin

[url='http://www.autoitbot.de'][/url]

Link to comment
Share on other sites

  • 2 months later...

Hi folks!

I started to program a chat and i want to add an "ingame" function with which the user is able to chat while he is playing a game (similar to Xfire).

I first thought of the topmost, but that won't work for games which are made with DirectX or OpenGL (so it won't work for nearly every 3D game :().

I used google for hours but the only thing i found out is that this could be done by dll hooking (on which i didn't find any tutorials/a library for c++/DLLs/examples/UDFs)

Does anybody of you know an UDF/tutorials/a library for c++/DLLs/examples for making an windo ontop of a DirectX/OpenGL api?

(I'm not English, so there might be some grammar and spelling mistakes :()

Hey this is what I am tying to do! This currently seems not to be possible in autoit (And AutoitX, if I can get it working). There are lots of sites (If I get the go a head from a mod I will add links) that do a lot of gaming hacking that draw menus and text in C++. However, autoit (Not X for some stupid reason!) does support Win API draw text, images, and more (msgboxes). However I would like this in a format that I can use in a dll...

Hope It helps! >_<

Edited by sniper120
Link to comment
Share on other sites

Clearly you aren't that smart. If you're using AutoItX you already know how to call dll functions. That's all the WinApi is.

The thing is that I have tried many many times to get advanced code to run with DEV-C++ and Vis C++. I have the DirectX SDK, and I have searched up on the internet about calling a dll. Calling a dll in C++ is like trying to read assembler. It doesn't make sence! If you could post some code that calls the dll needed for winapi to work and show some text, I would appreciate that! For now I'm trying to get autoit x to work...

Thanks!

Link to comment
Share on other sites

Calling dlls in C++ is EASIER than in AutoIt.

Which function are you trying to call? There are plenty of things that will show text.

The one in autoit "_WinAPI_DrawText" I noticed in the UDF that I need to call "User32.dll".

EDIT: Is there a one to draw over a full screened game? That is what I am mainly interested in.

Here is the autoit code:

Func _WinAPI_DrawText($hDC, $sText, ByRef $tRect, $iFlags)
    Local $aResult

    $aResult = DllCall("User32.dll", "int", "DrawText", "hwnd", $hDC, "str", $sText, "int", -1, "ptr", DllStructGetPtr($tRect), "int", $iFlags)
    If @error Then Return SetError(@error, 0, 0)
    Return $aResult[0]
EndFunc   ;==>_WinAPI_DrawText

Thanks! >_<

Edited by sniper120
Link to comment
Share on other sites

Quick C++.

#include "windows.h"

void main()
{
    HDC hDC = NULL; // set this
    LPCTSTR lpchText = "Something"; // set this
    int nCount = -1;
    RECT rect;
    // set up rectangle
    UINT uFormat = 0; // set this
    DrawText(hDC, lpchText, nCount, &rect, uFormat);
}
Edited by Richard Robertson
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...