Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Load image from MBM file

0 replies · 4,732 views · Started 18 August 2003

Hi,

I am attempting to load a bitmap from an MBM file I have created. It dies when I try the line (additional source below):

User::LeaveIfError(bitmap->Load(KMBMFileName));

The complete source is below. Please could someone post an example of loading a bitmap into a Symbian C application. Cheers,

Adrian.

// Load image from mbm file
_LIT(KMBMFileName, "c:\\system\\apps\\HelloWorld\\images.mbm"😉;
CFbsBitmap* bitmap = new (ELeave) CFbsBitmap();
User::LeaveIfError(bitmap->Load(KMBMFileName));

CleanupStack::PushL(bitmap);
gc.BitBlt(TPoint(10,30),bitmap);
CleanupStack::PopAndDestroy(bitmap);