[futurebasic] Resource nightmare

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 1999 : Group Archive : Group : All Groups

From: Sylvain Guillemette <allmedia@...>
Date: Mon, 11 Jan 1999 12:28:57 -0500
Hi,

I want to change the cursor in a code resource but
i have problems with GETNAMEDRESOURCE.

The function will try to get the cursor resource
by name or by ID.

If Param$ = "128" then it works.
If Param$ = "myCursor" then it doesn't work.

I'm not using STR# resources so i had to change
_"csrs" to 29554 because otherwise it crashed.

Can you find anything wrong with this ? :
(only GETNAMEDRESOURCE doesn't work)

ResourceType& = 29554
CursorHandle& = FN GETNAMEDRESOURCE(ResourceType&, Param$)
LONG IF CursorHandle& = 0
  CursorHandle& = FN GETCCURSOR(VAL(Param$))
IF CursorHandle& = 0 THEN ReturnValue$ = "Error : Cursor not found"
END IF


Thanks

Sylvain