IonicWind Software

IWBasic => General Questions => Topic started by: Brian on March 04, 2020, 07:57:59 AM

Title: Cursors
Post by: Brian on March 04, 2020, 07:57:59 AM
Hi,

I have a cursor loaded as a resource, called "hand.cur". How do I go about using it in my program? I suppose it has something to do with LoadCursorA, but I don't seem to be getting it right somehow

I know there is a system hand cursor, and I can load that, but mine is slightly different

Many thanks,

Brian
Title: Re: Cursors
Post by: h3kt0r on March 04, 2020, 09:53:31 AM
SUB Swap_Cursor()

INT hCursor
': Load cursor from resource
hCursor = LoadImage ("mycursor", @IMGCURSOR)
': or load cursor from system
': hCursor = LoadCursor(NULL, IDC_APPSTARTING)
': or load it from disk
': hCursor = LoadCursorFromFile(GETSTARTPATH + "mycursor.ani")
SetCursor WIN, @CSCustom, hcursor

EndSub
Title: Re: Cursors
Post by: Brian on March 04, 2020, 09:55:18 AM
Good man! I will try that now. Many thanks

Brian

Well, nearly worked. I think it loaded, but appears to be transparent when you click
Title: Re: Cursors
Post by: h3kt0r on March 05, 2020, 01:06:57 AM
Post a snippet so we can check your code and see where the problem is occuring.
Title: Re: Cursors
Post by: Brian on March 05, 2020, 03:03:11 AM
Thanks, Hector, but the program is not really in a runnable state yet

Brian