1. make a new bitmap manually
bt = BmpCreate( wDx, wDy, 16, NULL, &error );
UInt8* pBitmapBits = ( UInt8* )BmpGetBits( bt );
MemMove( pBitmapBits, pData, wDx * 2 );
2. make a new bitmap resource manually
hBitmap = DmNewResource( m_Ref,
'Tbmp',
_uID,
BmpSize( bt ) + 50 );
pResBitmap = ( BitmapType* ) MemHandleLock( hBitmap );
err = DmWrite( ( void* ) pResBitmap, 0, ( void* ) bt, 24 );
pBits = ( UInt8* ) BmpGetBits( bt );
err = DmWrite( pResBitmap, 24, pBits, BmpSize( bt ) - 24 );
UInt8 uIndirect = 4;
err = DmWrite( pResBitmap, 6, &uIndirect, 1 );
MemHandleUnlock( hBitmap );
3. to add bitmap into form
pFormBmp = FrmNewBitmap( ( FormType** ) &pForm,
_uID,
_uID,
m_iLeft,
m_iTop );
ktc> Hi Developers!!
ktc> I want to draw a bitmap from a file. I am downloading that bitmap from
the server. Is it possible to get the bitmap at run time and draw it without
using resource?
ktc> If yes then how? if Not then what can be the alternative solution?
ktc> thanks in Advance.
ktc> ..
ktc> KiraN Puranik
--
Best regards,
Vladimir mailto:[EMAIL PROTECTED]
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/