Question

I wish to create a new cursor to be used with my program. I want to make the cursor appear as a circle that I have already made, but I can't seem to get it to temporarily change to it when only using the game window, and I also can't get it to stay overtop of the normal cursor. Please, is there a way to change the cursor in c++ based on if it's over a certain window? The only methods I found used system commands, which are a security issues, and have not changed it back. I have had to go in and manually change the cursor back every time I finish with the program. Thanks in advance, and if you have any questions or I am unclear, please say so!

Was it helpful?

Solution 2

You can change the cursor in window by using LoadCursorFromFile and SetCursor.

You will need to create .ANI file that describes the cursor, you can read more about it here.

OTHER TIPS

You can set the window's cursor when you create the window: see Class Cursor and the hCursor member of the WNDCLASS structure.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top