Here's the code:
Sync on
Sync rate 0
Set Window On
User32 = 1 : Kernel32 = 2
GCL_HCURSOR = -12 : IDC_WAIT = 32514
Load dll "User32.dll",User32
Load dll "Kernel32.dll",Kernel32
hWnd = Call dll(User32, "GetActiveWindow")
GAWError = Call dll(Kernel32, "GetLastError")
IsWindow = Call dll(User32, "IsWindow", hWnd)
Cursor = Call dll(User32, "LoadCursorA", 0, IDC_WAIT)
CursError = Call dll(Kernel32, "GetLastError")
Result = Call dll(User32, "SetClassLongA",hWnd, GCL_HCURSOR, Cursor)
SCLError = Call dll(Kernel32, "GetLastError")
Print "Darkbasic Window Handle: " + Str$(hWnd)
Print "Get Active Window Error: " + Str$(GAWError)
Print "DarkBasic Window Exist: " + Str$(IsWindow)
Print "New Cursor Handle: " + Str$(Cursor)
Print "New Cursor Error: " + Str$(CursError)
Print "Old Cursor Handle: " + Str$(Result)
Print "Set Class Long Error: " + Str$(SCLError)
wait key
All calls to GetLastError() return 0, but so does the call to SetClassLong and that is supposed to return the old cursor handle.
and the cursor doesn't change. any help?
Edit:
I changed it a little and added a call to GetClassLong() to see if it changed, it did change but the cursor isn't changing. i also tried using ShowCursor() to see if you had to "RePaint" the cursor like you do with windows. but nope not working.
New Site! Check it out \/