Dynamic Cursors

Started by
5 comments, last by _Sigma 18 years, 2 months ago
Is it possible to do something like this: In a program such as a map editor, when one selects a new image (ie, load an .bmp from a file to add to the map) to create a new cursor based off this .bmp, and use it? Then change the cursor to some other .bmp when said new .bmp is loaded? Thanks.
Advertisement
Do you mean changing the cursor at runtime? I would rhink this is possible, but I've never done it. Another way would be to hide the cursor and render a quad awith the bitmap. That may be a little easier to do.
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute
I'm not using DirectX or anything...and yes i mean changing the cursor at runtime based on a click event.
I'm not sure you want to dynamically create the cursor then set it as current cursor or load the cursor from an existing resource, either way, you may take a look at these functions:
  1. CreateCursor ()
  2. LoadCursor ()
  3. LoadCursorFromFile ()
  4. SetCursor ()
--> The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones <--
There are API calls that let you save a bitmap as an icon/cursor, you can then use that icon in LoadCursor() to load it as the cursor.
Its possble. It might be a little hard to do though.
.::WARNING!::. Axesor is a total newb or n00b! Beware his lack ofintellegence of OpenGL. Feel sorry for him and keep him in your thoughts.~Leader of the phsychoward
So there is no slick, easy way to do it then?

This topic is closed to new replies.

Advertisement