There is this thing that has really been bugging me and I've recently become interesting in finding out how to do this. After several pointless hours spent on google I couldn't find my answer. I've recently done a bit of work with DirectX but only have become a little wiser.
I've been trying to make a program that can be opened while gaming (just like mumble is able to open it's chat functions in game, and FRAPS is able to show an FPS counter).
How do those programs do this? How do they detect that this certain game has initiated and get their own windows/objects drawn within their screens? (I know they aren't seperate windows, I've tried to do it using a window method but it's impossible to get mine on top of the game - dismiss that idea).
I would extremely appreciate if anyone could push me in the right direction with the following:
- How does the program detect the game, and get it's own objects/window drawn into it?
- If this is using DirectX/OpenGL functions, how can I do this too?
I followed a tutorial to create a simple line and draw that on my own form, but how can I draw it let's say on the game (i.e. if I can draw a line, I can do anything else I want because I know how its' done.
At this point:
device = New Device(0, DeviceType.Hardware, Me.Handle, CreateFlags.SoftwareVertexProcessing, present)
I have also used another window's handle instead of Me.Handle but that didn't seem to work.
Anyone got any ideas? I would highly appreciate your help.