Load Cursor...

BlitzPlus Forums/BlitzPlus Programming/Load Cursor...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

It's a lot easier than that :)

userlib needed is

.lib "user32.dll"
LoadCursor%( ID, Cursor ):"LoadCursorA"
SetCursor%( ID ):"SetCursor" 


You can also use these for the different cursors

; Mouse Pointers
Const IDC_ARROW			= 32512
Const IDC_IBEAM			= 32513
Const IDC_WAIT			= 32514
Const IDC_CROSS 		= 32515 
Const IDC_UPARROW 		= 32516
Const IDC_SIZENWSE 		= 32642
Const IDC_SIZENESW 		= 32643
Const IDC_SIZEWE 		= 32644 
Const IDC_SIZENS 		= 32645 
Const IDC_SIZEALL 		= 32646 
Const IDC_NO 			= 32648 
Const IDC_HAND 			= 32649
Const IDC_APPSTARTING 	= 32650
Const IDC_HELP 			= 32651
Const IDC_ICON 			= 32641
Const IDC_SIZE 			= 32640

And then you just use

cursor = loadcursor(0,cursor_constant)

And setting the cursor is as simple as

setcursor cursor

If you don't use setcursor in a loop then Blitz automatically resets the cursor to the default arrow.