Jump to content

[Solved]Custom Cursor For ControlID


Fire
 Share

Recommended Posts

Hi to all Great Auto IT commnunity.

Some days ago i searched on forum about custom Cursor For GUI and i found it(sorry i didnt remember URL).

It works like Charm.(Thanks to author)

BTW i have another question.

Is it Possible use some .cur or .ani cursor for controlID`s?

For example for list view or for Editbox and etc.

Here is For GUI it works cool(But for CONTROLIDs it didn`t work)

So My question is it possible use Custom Cursors(not system standart cursors) for CONTROLID`S?

Thanks in advance.

#include <GuiConstants.au3>
#include <WindowsConstants.au3>


$Gui = GuiCreate("Test", 300, 200,750)
GUISetState()

GUIRegisterMsg($WM_SETCURSOR, 'WM_SETCURSOR')

$Cur = DllCall("user32.dll", "int", "LoadCursorFromFile", "str",@ScriptDir&"\11.ani")
if @error Then MsgBox(0,"dd","whoopsie!")


While 1
    $Msg = GUIGetMsg(1)
    Select
    Case $Msg[0] = $GUI_EVENT_CLOSE
    Exit
    EndSelect
WEnd

Func WM_SETCURSOR($hWnd, $iMsg, $iWParam, $iLParam)
    If $hWnd = $Gui Then
    DllCall("user32.dll", "int", "SetCursor", "int", $Cur[0])
    Return 0
    EndIf
EndFunc

11.7z (Cursor)

Edited by Sh3llC043r
[size="5"] [/size]
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...