Bitmaps can be stored in multi-bitmap (.mbm) files, which can be built from .bmp files as part of the abld process. This topic provides an example of loading a multi-bitmap file.
Loading them has four stages:
Put the name of the bitmap file into a buffer.
Create a bitmap (CFbsBitmap).
Load the bitmap using CFbsBitmap::Load().
If an error is returned, leave and ensure the bitmap is cleaned up
// set the name of the multi-bitmap file containing the bitmaps _LIT(KMBMFileName,"z:\\resource\\apps\\grbmap2.mbm"); // load the bitmap from an .mbm file CFbsBitmap* bitmap = new (ELeave) CFbsBitmap(); CleanupStack::PushL(bitmap); User::LeaveIfError(bitmap->Load(KMBMFileName, EMbmGrbmap2Smiley)); // EMbmGrbmap2Smiley is the ID of a bitmap in the .mbm file ... // clean up CleanupStack::PopAndDestroy();
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.