[futurebasic] RE: [FB] PLOTing icons (again)

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

From: Chris.Young@...
Date: Fri, 18 Jun 1999 09:16:50 -0500
I believe that you will need to use PlotIconSuite instead. I have some 
code that does this that I can email you privately if you wish.

Chris Young

-----Original Message-----
From: charlied [SMTP:charlied@...]
Sent: Thursday, June 17, 1999 7:57 PM
To: futurebasic
Cc: charlied
Subject: [FB] PLOTing icons (again)

Good people,

With some significant help from this list and the FBII examples I have 
been
able to "read" an icon image from the desktop database. The salient 
lines
of code are...
.
.
.
  DTPBioDTBufferH& = FN NEWHANDLE _clear (_kLarge8BitIconSize)
  IF DTPBioDTBufferH& <> _nil THEN ql% = FN HLOCK(DTPBioDTBufferH&)
.
.
.
          '
          ' DTPBRec.DTPBioDTBuffer is supposed to be the address of a 
buffer
          'to receive the icon image
          '
          DTPBRec.DTPBioDTBuffer& = [DTPBioDTBufferH&]
          DTPBRec.DTPBioDTReqCount% = _kLarge8BitIconSize
          DTPBRec.DTPBioIconType% = _kLarge8BitIcon
.
.
.
          osErr% = FN PBDTGetIcon(DTPBRec, _false)
.
.
.
  ql% = FN HUNLOCK(DTPBioDTBufferH&)
.
.
.
END FN = DTPBioDTBufferH&

then, in the calling function...

  WINDOW 2,"",(0,0)-(640,480),_DocNoGrow
  t = 32 : l = 32 : b = 64 : r = 64
  CALL PLOTCICON(theRect, icon&)   ' icon& is the value returned above 
...
END FN = DTPBioDTBufferH&

My problem is that nothing shows up in the window. If I set icon& = FN
GETCICN(icn%) then the CALL PLOTCICON displays the icon from the 
resource
as it should. I know that the addressing is not working right because 
the
debugger shows that the data in the handle dereferenced twice is all 
zero
when I call PBDTGetIcon while the data in icon& dereferenced twice looks
like icon data when I call GETCICON.

Can any of the FB gurus give me a hint what I'm doing wrong??



Charlie Dickman
charlied@...

--
To unsubscribe, send ANY message to 
<futurebasic-unsubscribe@...>
 << File: [FB] PLOTing icons (again).TXT >>