Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Displaying your own mouse cursor

This topic is 5601 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m using Visual C++ and DirectX7 and I was wondering what the best way to create my own cursor. I was thinking of making a CCursor class which would hold the coordinates and surface to get image from. Then once a frame check for any change in coordinates, update coordinates and then blit the surface at that position. Is this the best way to do this or is their another, better way?

Share this post

Link to post
Share on other sites
a little easier way is to keep 2 variables, say MouseX and MouseY, and just update them with in your DirectInput loop.

like MouseX+=Mouse.lX; (You will need to add some sort of clipping, like if(MouseX>800)Mousex=800; (or whatever your screen coordcs are)

Then all you have to do is blit your mouse graphic using the MouseX and MouseY veriables.

Good luck!

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!