Jump to content

Change the mouse-cursor appearance


BitRot
 Share

Recommended Posts

Hello All,

I'm currently trying to change the mouse-cursor to something else than the standard arrow, depending on certain conditions.

Currently I load the mouse-cursor I want, using User32.dll's "LoadCursorA" function, and than apply it by using "SetCursor" function.

The problem is that whenever I move the mouse its appearance gets set back to the standard arrow. An attempt to set the arrows appearance in every step results in annoying flickering between both the origional and the desired one.

Has anyone got an idea how to change the mouse-cursor (that does not result in such a flicker) ?

Link to comment
Share on other sites

I'm not sure I follow you but is this what your after?

From the help file

GUISetCursor ( [cursorID [, override [, winhandle]]] )
Link to comment
Share on other sites

I'm not sure I follow you but is this what your after?

From the help file

GUISetCursor ( [cursorID [, override [, winhandle]]] )
Grrr.... :P Yes, that pretty-much looks like it. I must have seen, but not recognised it. I did find the "MouseGetCursor", but not "MouseSetCursor", nor was the above command mentioned in the "related" section. :)

Any chance that I can use other cursor ID's than the 16 named there ? Currently I'm using cursor-ID's 32654 thru 32662, the scroll-images that appear when you press the middle mouse-button in a document. I like to have those single-direction pointers, instead of the default double-directions Windows (and therefore AutoIt) offers.

Edited by BitRot
Link to comment
Share on other sites

Supose you can load your own cursors and set those (I could in VB6 so why not in AutoIt?). I don't recal how it was done thought (but it was through th ewindows API) :)

Link to comment
Share on other sites

Supose you can load your own cursors and set those (I could in VB6 so why not in AutoIt?). I don't recal how it was done thought

I've got no problem loading those cursors (allready did that). The current problem is that AI's cursor-settings only go from 0 to 16, and do not seem to accept any other values (I allready tried).

Setting those loaded cursors by way of a DLL-function causes them to battle with AI's own cursor, with the beforementioned flickering as a result.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...