473,504 Members | 13,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I overlay graphics on DirectX games?

I am looking to make a program similar to Xfire which will overlay
information while playing a directx game. For an example of what xfire
is capable of, see the image below:
http://media.xfire.com/xfire/xf/them...ur_image_4.jpg

I believe it is possible to overlay to DX games without needing to use
directx since I don't see any calls to d3d or dd libraries in Xfire. I
am able to get a basic overlay using GetDesktopWindow but I have it on
a timer/thread with sleeps and it always flickers in-game. Putting it
on a constant loop thread by itself only slowed down the game
dramatically which is not useful. I was wondering if anyone could
provide me with a better sample of accomplishing this. My code is
below:
Font font = new Font("Verdana", 15);
PointF pointf = new PointF(5, 5);
IntPtr hwnd = GetDesktopWindow();
IntPtr hdc = GetWindowDC(hwnd);
RECT rect = new RECT();
GetClientRect(hwnd, ref rect);
DrawTextA(hdc, "test", -1, ref rect, 0);
ReleaseDC(hwnd, hdc);

May 12 '06 #1
0 5122

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2092
by: Yuriy Zubarev | last post by:
Hello everyone, I'm starting with new endeavour of writing Windows-based application in C# that will manipulate graphic elements in a certain manner (I will describe it briefly bellow). Being a...
0
5654
by: Never Best | last post by:
I'm having troubles attaching the Device to a window using its hWnd, and I have some troubles with getting transparancy to work with a DDOverlay... if anyone could help it would be greatlay...
2
1939
by: Les | last post by:
In ancient times I had a desire to make a game and I started to do so, I quickly found the project was beyond the hardware's capability for that era (even in assembler) and had to shelf the...
8
12011
by: Takuon Soho | last post by:
Are there 3d Games being built with C#? I see several 3d Engines and a rework of OpenGL out there but wonder if anyone is actually commercially developing games with C# and OpenGL Am new to...
5
2964
by: James dean | last post by:
I want to see what the perfomance is like with an application that uses C#/Gdi+ is like as i am worried about performance of certain fatures like drawing text and GraphicsPaths *** Sent via...
5
4859
by: Brian Lowe | last post by:
My web site accepts uploaded photos and stores them in a SQL table as BLObs so they never touch the filesystem. I have a way to create a thumbnail version of the uploaded image and store that in...
3
1764
by: Daniel | last post by:
Hey guys I have an app front end in directx, but have decided since my graphics are so basic and my app always runs windowed that removing direct x and using standard graphics functionality is...
1
2012
by: Daniel | last post by:
Hi I had an app i write on DirectX that will nearly always run in a windowed situation. It could also have many instances running at a time and as such to keep the cpu usage down i had a frame...
3
1410
by: Fred Mellender | last post by:
My question is in the subject line.
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
406
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.