CFbsBitmap Dynamic Creation and Data Manipulation

Login to reply to this topic.
Mon, 2003-04-21 02:46
Joined: 2003-04-12
Forum posts: 7
I want to Create A 16bit Bitmap dynamically, here is how im currently doing it


CFbsBitmap *iBmp = new CFbsBitmap;
TSize iSz(160,120);

iBmp->Create(iSz,EColor64K); // 16bit
TUint8 *pData = (TUint8*)iBmp->DataAddress();

// .... update data address here

TInt nRet = iBmp->Save(_L("c:\test.mbm"));
// nRet value is -21 Access Denied

WindowGc gc = SystemGC();
TRect rc = Rect();
gc.BitBlt(rc.iTl,iBmp); // Does not display bmp on screen

// do clean up

I keep getting -21 when calling Save() function, any ideas why?
Plus BitBlt doesn't seem to work.
Is there something im doing wrong?
Is there a documentation on Native Bitmap Format for Symbian? Is is the same as the MBM format?

Thank  Cheezy

Rey Flip
Symbian/BREW/PocketPC Developer - Go Mobile


Tue, 2003-04-22 10:54
Joined: 2003-04-03
Forum posts: 31
CFbsBitmap Dynamic Creation and Data Manipulation
Hi!

My guess is that the string "c:\test.mbm" ist not a legal filename. Try replacing it with "c:\\test.mbm" as "\t" tends to be interpreted as a tab.

zeep

zeep

Tue, 2003-04-22 23:33
Joined: 2003-04-12
Forum posts: 7
CFbsBitmap Dynamic Creation and Data Manipulation
Sorry my bad, i typed it wrong while posting msg. in my code it has the correct path and im still getting -21(Access Denied)

Rey Flip
Symbian/BREW/PocketPC Developer - Go Mobile

  • Login to reply to this topic.