Aside from the multiple requests for the resource which I eye warily
(isn't the busy bit set in the first DmGetResource making the second
call fail?), it will be slower to do it as you present as opposed to
using a VoidHand because of the multiple calls to DmGetResource.

Cheers,

Mike

> -----Original Message-----
> From: Dave Lippincott [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, April 15, 1999 2:06 PM
> To:   PalmOS Developer Forum
> Subject:      Is this legal?
> 
> I have some code that seems to work and I would like to know if it
> would
> always work.
> 
> BitmapPtr bitmapP;
> 
> bitmapP = (BitmapPtr) MemHandleLock(DmGetResource('Tbmp',1300));
> WinDrawBitmap(bitmapP,X,Y);
> MemHandleUnlock(DmGetResource('Tbmp',1300);
> 
> Specifically do I need to assign the result from DmGetResource to
> VoidHandle
> or will it work as is.  So far it compiles and runs correctly.
> 
> Thanks
> Dave
> 
> 

Reply via email to