FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

RESOURCES

Call a color cursor by its name


Try the right number : _"crsr" is equal to 1668445042.
I tested it and it seemed to work, but as Mars confirmed this, you won't be able to use the handle returned by GETNAMEDRESOURCE to set your cursor. However you can go with the method I gave earlier.
Here is the code I used :

GLOBALS
DIM CursorHandle&
END GLOBALS
RESOURCES "test.rsrc"
'===========
CLEAR LOCAL
LOCAL FN ChangeCursor(ResourceType&,Param$)
  CursorHandle& = FN GETNAMEDRESOURCE(ResourceType&, Param$)
  LONG IF CursorHandle& = 0
    CursorHandle& = FN GETCCURSOR(VAL(Param$))
  XELSE
    CALL GETRESINFO(CursorHandle&,resID,resType&,resName$)
    CALL RELEASERESOURCE(CursorHandle&)
    CursorHandle&=0
    CursorHandle& = FN GETCCURSOR(resID)
  END IF
  IF CursorHandle& THEN CALL SETCCURSOR(CursorHandle&)
END FN
'============
WINDOW 1

REM DEFSTR LONG
REM rtype&=_"crsr"

CursorHandle& = 0
rtype& = 1668445042

FN ChangeCursor(rtype&,"mycurs")

DO
UNTIL FN BUTTON OR LEN(INKEY$)
CURSOR 0
LONG IF CursorHandle&BR>   CALL RELEASERESOURCE(CursorHandle&)
END IF

Alain