Dynamic Cursors
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.
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.
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:
- CreateCursor ()
- LoadCursor ()
- LoadCursorFromFile ()
- SetCursor ()
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement