Solved

Create a Target Circle with DirectX?

Posted on 2010-08-22
2
853 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now