Solved

Create a Target Circle with DirectX?

Posted on 2010-08-22
2
865 Views
Last Modified: 2013-12-08
Is there a way to create a DirectX Target Circle (the same size as a cursor) on top of any windowed application?  There needs to be application control of the target circle's position in the application's windowed mode.

There needs to be a way to be able to duplicate this for more than one application.  If the person has more than one copy of a application or game, my application would create 1 target circle for Game1/Application1, another target circle for Game2/Application2.  My software needs to be able to move the target circle anywhere on the windowed screen. My software needs to be able to create more than 1 target circle for each application/game.  The target circle will not have any other function other than a image of a circle moving around the other application/game's screen.

Summary:

My Software needs to be written with DirectX 9 in mind: The Target Circle needs to be about the same size as the mouse cursor.  The Target Circle needs to be able to operate in other software windows.   The Target Circle needs to be able to move around the whole entire screen of the other software's window no matter what the resolution is.  My application needs to be able to control the movement of the Target circle.  The target Circle needs to be able to be shown or hidden at my application's command.  The Target Circle needs to be visible at all times when it is shown.

PS

I prefer Delphi source code, but I think I can understand enough C or C++ to try to make a attempt to convert it for delphi so I can do this.  I'll try my best to understand your answer no matter what language you use to answer this question with.

If you know a way in Delphi other than using DirectX to create a moveable target circle, I'll consider the answer.
0
Comment
Question by:Eniledahs
2 Comments
 
LVL 21

Accepted Solution

by:
developmentguru earned 500 total points
ID: 33498203
In order to help you understand the DirectX rendering process I will explain it loosely, in the hope that it will help you better understand what you are asking.  A Direct X rendering cycle is normally done with some level of buffering.  In the normal double buffering mode the rendering of the display is done off screen.  This is done to help avoid flicker creating a fluidly moving display.  The normal rendering pass would be done like this:

Clear the off screen buffer.
Draw all graphics elements to the off screen buffer
Swap the off screen buffer to the screen.

During this activity the DirectX application is in control of the process.  In order for another application to hijack this process it would need to insert a new step before swapping the off screen buffer to the screen (drawing the target circle).  Trying to do this without making the other applications a part of the design would not be at all easy.  One idea that MAY have some possibilities would be to do programming on the video card itself that would try to draw the target circle right after the image is swapped to the screen.  The problem with this approach is that the video card might not be able to easily tell the difference between the applications.

I assumed you were referring to placing the targeting circle on other DirectX apps.  If you want to place it on any windows application it becomes even more complex since doing directX updates requires a window that was instantiated with DirectX calls.

I am not sure this would ever be possible with ANY DirectX application because,  currently, none that I know of are designed to cooperate with this type of attempt.

I hope this gives you a better understanding of the topic.  Let me know if you need more clarification.
0
 

Author Closing Comment

by:Eniledahs
ID: 33506438
I'm guessing hijacking will be beyond my current skill level.  I'll try another question or different approach.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How Complex Is This Java Course ? 11 125
Multiple image collision 13 80
Performance of SQL statement 37 125
enhance the following code 3 37
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question