> Howdy all,
>       I have been wrestling over performing a very simple task.  Perhaps
> I am not attacking the problem from the right angle.  All I want to do is
> stick an icon on a button.  I'm not talking baou tthe notion of icons that
> CodeWarrior uses (although maybe I should, I don't understand the
> difference between an icon resourse and a bitmap resource).  I have
> created some bitmaps in CodeWarrior.  They are not Form bitmaps, just
> regular bitmaps.  All I have is their resource ID. Again they aren't
> associated with any form.
> 
> To display a bitmap I need a BitmapPtr.  So the question is, how do I get
> from a Bitmap's resource ID to a BitmapPTr.  

  there is a much easier way to do it :)

---
  MemHandle bitmapHandle = DmGet1Resource('Tbmp', bitmapID);
  WinDrawBitmap((BitmapType *)MemHandleLock(bitmapHandle), x, y);
  MemHandleUnlock(bitmapHandle);
  DmReleaseResource(bitmapHandle);
---

  :)) this of course extracts a resource with type 'Tbmp' and a given
  ID out of the .prc data area. :P

  hope this helps.

az. 
--
Aaron Ardiri 
Java Certified Programmer      http://www.hig.se/~ardiri/
University-College i G�vle     mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN       
Tel: +46 26 64 87 38           Fax: +46 26 64 87 88
Mob: +46 70 656 1143           A/H: +46 8 668 78 72

if you enjoy it, then it aint work :) - rule #106 of life


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to