Thanks!!... Let me know how it goes and I'll get the changes to Jos.
Now I tested this new AutoIt3Wrapper and it works fine with standard cursors (.cur) and also with animated cursors (.ani)
It works fine also with cursors (also animated) from my Windows7.
Here is testing script:
; cursors from Win7 #AutoIt3Wrapper_Res_File_Add=aero_link.cur, rt_cursor, CUR_1 #AutoIt3Wrapper_Res_File_Add=aero_busy.ani, rt_anicursor, ANI_CUR_1 ; cursors from Win XP #AutoIt3Wrapper_Res_File_Add=3dsmove.cur, 1, CUR_2 #AutoIt3Wrapper_Res_File_Add=banana.ani, rt_anicursor, ANI_CUR_2 #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_UseX64=n #include <GuiConstants.au3> #include <WinAPI.au3> $gui = GUICreate("Cursor from resources example",820,400) $label1 = GUICtrlCreateLabel("abc def",20,320,380,100) ; controls in GUI with standard cursor GUISetState(@SW_SHOW) GUIRegisterMsg($WM_SETCURSOR, 'WM_SETCURSOR') $hInstance = _WinAPI_GetModuleHandle("") $hCursor = _WinAPI_LoadCursor($hInstance, 'CUR_2') _WinAPI_SetCursor($hCursor) Sleep(5000) $hCursor = _WinAPI_LoadCursor($hInstance, 'ANI_CUR_2') _WinAPI_SetCursor($hCursor) While 1 If GUIGetMsg() = -3 Then Exit WEnd Func WM_SETCURSOR($hWnd, $iMsg, $iWParam, $iLParam) If $hWnd = $gui Then _WinAPI_SetCursor($hCursor) Return 0 EndIf Return $GUI_RUNDEFMSG EndFunc Func _WinAPI_LoadCursor($hInstance, $sCursor) Local $aResult, $sType = "int" If IsString($sCursor) Then $sType = "str" $aResult = DllCall("User32.dll", "hwnd", "LoadCursor", "hwnd", $hInstance, $sType, $sCursor) _WinAPI_Check("_WinAPI_LoadCursor", ($aResult[0] = 0), 0, True) Return $aResult[0] EndFunc ;==>_WinAPI_LoadCursor
Attached Files
Edited by Zedna, 30 March 2012 - 11:16 AM.







