[futurebasic] CALL PLOTCICON

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

From: Charlie Dickman <charlied@...>
Date: Sat, 30 Oct 1999 21:52:34 -0400
Friends,

I'm using the following code to extract a cicn from a resource file 
and plot it but what gets plotted is just a bunch of junk. If I use 
GETCICON to extract the icon from the app's resources this works 
fine. CALLing DETACHRESOURCE on the iconH& doesn't change anything I 
must be missing some magic somewhere. Can anyone clue me in?

   priorResFile% = FN CURRESFILE
   resFileID% = FN OPENRFPERM(filename$, vRefNum%, _fsRdPerm)
   CALL USERESFILE(resFileID%)
   DEFSTR LONG
   iconH& = FN GET1RESOURCE(_"cicn", 128)
   DEFSTR WORD
   CALL CLOSERESFILE(resFileID%)
   CALL USERESFILE(priorResFile%)
   LONG IF iconH&
     WINDOW 1,"Icon Calls",(0,0)-(32,32),_docNoGrow
     CALL SETRECT(theRect, 0, 0, 32, 32)
     CALL PLOTCICON(theRect, iconH&)
   END IF

Thanks,
Charlie Dickman
charlied@...