You should look for a 'Tbmp' resource not a 'PICT' one. PICT is the standard
Macintosh picture format (equivalent to windows EMF format). It has features
to encapsulated all sorts of data: vectors, text, bitmaps, jpeg etc.... The
CodeWarrior palm post-linker converts PICT resources to Tbmp resources at
link time.
--
Eric Vergnaud
President of Street Soft
----------
>De�: "Gaurav Palvia" <[EMAIL PROTECTED]>
>� : <[EMAIL PROTECTED]>
>Objet�: Re: problem in WunDrawBitmap
>Date�: Jeu 28 oct 1999 11:30
>
> thanx for the information.i tried those functions.they work fine for the
> string resource.
>
> but i created a bitmap resource
> and i used those functions as follows:then the progran gets stuck as soon as
> i call DmGetResource function and nothing is drawn on the screen.
>
> VoidHand h;
> BitmapPtr bPtr;
>
>
> switch (eventP->eType)
> {
> case menuEvent:
> return MainFormDoCommand(eventP->data.menu.itemID);
>
> case frmOpenEvent:
> frmP = FrmGetActiveForm();
> MainFormInit( frmP);
> FrmDrawForm ( frmP);
>
> h = DmGetResource('PICT',1000);
> /* here it is returning handle as h =0 and here the program
> gets stuck */
>
> bPtr = (BitmapPtr)MemHandleLock( h );
>
> WinDrawBitmap(bPtr,1,50);
>
> MemHandleUnlock( h );
> DmReleaseResource( h );
>
> handled = true;
> break;
>
> should we perform any other operation to put this bitmap on the form
> dynamically.
>
>
>
> -----Original Message-----
> From: Bob Ebert <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Thursday, October 28, 1999 6:49 AM
> Subject: Re: problem in WunDrawBitmap
>
>
>>At 12:30 PM -0700 10/27/99, Gaurav Palvia wrote:
>>> i have created a bitmap resource.i have not attached it to my form.
>>>i want this bitmap to be drawn on the fly.i know that there is one
> function
>>>called WinDrawBitmap but it requires pointer to that bimap,
>>>how will i get the pointer to an object(bitmap) which is not on my form.
>>
>>DmGetResource and MemHandleLock are the usual ways. Don't forget to
>>MemHandleUnlock and DmReleaseResource when you're done.
>>
>>Phew, this was easy -- when I first saw the subject I thought there was
>>going to be some bug in the bitmap support for OS 3.5. :-)
>>
>> --Bob
>>
>>
>
>
>