April 20, 2024, 08:01:32 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Cursors

Started by Brian, March 04, 2020, 07:57:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

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

h3kt0r

March 04, 2020, 09:53:31 AM #1 Last Edit: March 04, 2020, 09:55:30 AM by h3kt0r
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

Brian

March 04, 2020, 09:55:18 AM #2 Last Edit: March 04, 2020, 11:03:08 AM by Brian
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

h3kt0r

Post a snippet so we can check your code and see where the problem is occuring.

Brian

Thanks, Hector, but the program is not really in a runnable state yet

Brian