Solved

Create a Target Circle with DirectX?

Posted on 2010-08-22
2
870 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

739 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