Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing in a game using DirectDraw

Status
Not open for further replies.

Ante0

Programmer
Apr 19, 2007
98
SE
Hi, I'm trying to figure out how to use DirectDraw (Maybe using Delphi X) to Draw text inside a game.
Like the program Fraps does when it displays your FPS ingame.
I would like to make a Clock, as the game I play doesn't have any ingame Clock and it's a pain to Alt+Tab each time :)
Also, I would learn from it :p

So, how would I make this work?
I use Delphi 7.
Not sure if Delphi X (The DirectX components for Delphi, I think it's called DelphiX) will work, or are up to date...
 
DelphiX would be a good start.
while the original DelphiX distribution made by Hori only supports up to Delphi5, there are a lot of updated distros around the web, here is one example


you can find others by searching "undelphix"

Cheers,
Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Thanks, I remember using the original version which is now ancient.
I'll look into this tonight, a few beers and delphi will make my evening.

Got any other pointers?`
I've been googling, but not much about this subject really.
I found a few VB docs about DirectDraw, but they didn't really help.

Thanks again!
 
This is no easy stuff.

1) you can hook into some DirectX functions.
Here is a link:
although the code is C++, this is the way to do it.

You can use the hooking functions from the Madshi :

2)
since you want to do this with many games (and not one)
another method is Direct3D overlay. Browse the net to find some code samples, beware most samples are in C++.

If I find some time I will see if I can come up with something.

Good luck!
/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top