Sign in to follow this  
Rocky

Changing cursor shape

Recommended Posts

On a whim, I tried to add to the list of the available cursor shapes in the Gauges.H file.typedef enum{ CURSOR_NONE = -1, CURSOR_NORMAL = 0, CURSOR_UPARROW, CURSOR_DOWNARROW, CURSOR_LEFTARROW, CURSOR_RIGHTARROW, CURSOR_HAND, CURSOR_CROSSHAIR, CURSOR_PANWEST, // My AdditionMOUSE_CHILD_FUNCT(2,1,51,45,CURSOR_PANWEST,MOUSE_RIGHTSINGLE | MOUSE_LEFTSINGLE,mouse_cb0) // My mouse codeWith that, instead getting a regular hand shape for mouse cursor, I got a closed fist shape for the mouse cursor (not the Panwest shape).Anyone know how to add to the list of available mouse cursor shapes (that work?)-Bryan

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I'm no expert on cursors, but your code assigns the same value to CURSOR_PANWEST as to the original CURSOR_GRAB which it replaces. I Assume that CURSOR_GRAB is a closed fist(?) so it's not surprising that you still get that.Have you tried adding an extra cursor?..CURSOR_GRAB,CURSOR_PANWEST,It may not work because it's possible that the underlying code only recognises a range of -1 to 7 for CURSOR_TYPE.

Share this post


Link to post
Share on other sites

You cannot "add" a cursor in this manner.What you are doing is merely adding a enumerated value to an enum. As was pointed out, actually in your code you aren't even doing that, you are replacing the symbolic name for an existing value.That enum is just a list of int's that have symbolic names and are used to refer to cursor resources. You can't just add a new symbolic name (which would then get the next integer value up), as there is no cursor for that value defined.In short, you cannot add your own cursor (without going outside the FSAPI, something far more complex than what you are prepared to do).

Share this post


Link to post
Share on other sites

In that case, you hight want to use the Windows function SetSystemCursor(HCURSOR cursor, DWORD id)I never used it, but it might help in changing the mouse cursor as you wish.Eric

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this