Joe, The iconRect is DIMmed and if I use GETCICON it works just fine. But what I'm trying to do is get the cicn from a resource file other than the current application's hence the fiddling with OPENRFPERM, USERESFILE, etc. GETCICON gets the icon from the current application. >Not exactly sure, but in most of my FNs I use the following sequence of calls >and they work fine: > >icnHdl& = FN GETCICON(rsrcID%) >CALL PLOTCICON (iconRect,icnHdl&) >CALL DISPOSCICON (icnHdl&) > >Did you remember to DIM the iconRect ? like: > >DIM iconRect.8 > >Joe Wilkins > >Charlie Dickman wrote: > > > 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@... Charlie Dickman charlied@...