Do you know how to create a bitmap and add it to your project in PilRC or
Codewarrior?  After this is done, you can access the bitmap in your project
with the following code:

      MemHandle memH;
      BitmapPtr bmpP;

      memH = DmGetResource('Tbmp', picBitmap);
      bmpP = (BitmapPtr) MemHandleLock(memH);
      WinDrawBitmap(bmpP, 0, 0);
      MemHandleUnlock(memH);
      DmReleaseResource(memH);

where picBitmap is the ID of your bitmap.  The bitmap pointer is only valid
when the resource handle is locked, so keep this in mind.

If you want to change the bitmap, just use the ID of the bitmap you want to
draw.  This is an easy way to implement what you want to do.

-- 
Tim Kostka
http://www.nuprograms.com


"Peter Hamilton-Scott" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I need to display some information on a form and I thought it might be
> useful if I could display a bitmap. For example, if something is stopped
> display a red circle, if it's suspended, display an amber circle, and if
> it's running (pure rocket science), display a green circle.
>
> How easy is it to display a bitmap on a form and change it at runtime
> depending on the state of the data I'm displaying? Code snippet? PilRC
> definition?
>
> Thanks.
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to