Jump to content

Cursor confusion


qwert
 Share

Recommended Posts

This is my first attempt at controlling the cursor in an external application, so I expect that I'm missing something very basic. This is a test script I have been trying:

$Cursor = MouseGetCursor(); save cursor
Sleep(1000)
MsgBox(32, "Start", "Mouse style was " & $Cursor, 2)

GUISetCursor(3,1) ; change to Cross
Sleep(1000)

$Check = MouseGetCursor(); check cursor
MsgBox(32, "Middle", "Mouse style is " & $Check, 2)

GUISetCursor($Cursor,1) ; change to original
MsgBox(32, "End", "Mouse style restored to " & $Cursor, 2)
Exit

When I run it using SciTE as the external application, it can detect the cursor type=2 when I position it at the top of the screen ... and type=5 when I move it down into the script edit area. But the GUISetCursor never works. The Middle check always finds the cursor type the same as at the Start. I've read a few cursor threads, but I haven't found one addressing this very basic case.

Any help will be appreciated.

Thanks.

Link to comment
Share on other sites

There is a search function. I think Kip did it :)

Is this the one?:

_WinAPI_RegisterClassEx() ... Create you own class. Drop shadow, change window icon/cursor. link

I don't follow why something so drastic is needed. I only need to change to one of the 16 standard cursors. Can anyone explain? ... or provide a couple of search terms. I believe I've already read everything with "cursor" in the title.

Thanks for the response.

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...