Deepak.MA wrote:
Thanks a ton Logan. Ive managed to sync a few bmps into the VFS and am able
to see the files exist there also(using FileZ). But my concern is that how
do we get the whole image to be displayed on the screen.
Ive read ur suggestion on using the VFSFileRead operation. But how do you
think this can be rendered on the screen finally.
Something like this:
#include <PalmOSGlue.h>
BitmapPtr bitmapptr;
Int32 bitmapsize;
Int32 remainder;
VFSFileOpen (......);
bitmapsize = VFSFileSize(......);
bitmapptr = (BitmapPtr) MemGluePtrNew (bitmapsize);
if (bitmapptr == NULL)
{
/* not enough space */
}
remainder = bitmapsize;
while (remainder > 0)
{
/* read to the right position within the buffer */
VFSFileRead (......);
remainder -= how_much_you_read;
}
VFSFileClose (......);
WinDrawBitmap (bitmapptr, x, y);
MemPtrFree (bitmapptr);
By the way, I assume you're reading a PALM bitmap from this file, not
a WINDOWS bitmap, right?
- Logna
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/