My method is the following

        MemPtr *bitmap;

        MemHandle resH = DmGet1Resource('XXXX', Bitmap_ID);
        if (resH==0) SysFatalAlert ("ressource pas trouv�e");

        bitmap = MemHandleLock (resH);

bitmap points now on your bitmap.

XXXX is your ressource type.



----- Original Message -----
From: "Daniel Morais" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 3:51 PM
Subject: Re: Getting the Base address of a bitmap


On Friday 06 July 2001 14:01, Vijay Raghavan wrote:

> How do I get the base address of the bitmap?
> PS : I am using ver PalmOS 3.2

To get the address of a bitmap, you can use BmpGetBits, but unfortunately
for
you, it is valid since Palm OS 3.5 only...

If I understood what you want, you maybe just need the address of your
window.
In this case, just use the following code, coming from SDK exemples :

if ( PalmOSVersion < PalmOS35 )
{
WindowType *winP;

winP = WinGetWindowHandle( win );
ptr = winP->displayAddrV20;
}
else
{
BitmapType *Bitmap;

Bitmap = WinGetBitmap( win );

if ( Bitmap ) ptr = BmpGetBits( Bitmap );
}

If I didn't understood what you want, I would suggest you to look at the
knowledge base, there is tons of exemples relative to bitmaps.

--
Daniel Morais


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



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

Reply via email to