I'm facing problems using bitmaps. I created 5 image controls in my GUI without specifying "Image" property, and then in my code I tried to set the same bitmap for all 5 objects, but unfortunately I get a KERN-EXEC 3 panic code.
Reading some threads I probably found the reason of this, but I didn't find the solution. This is my code, actually used by the Container::ConstructL function but it could be called in different functions during the execution:
Maybe I'm wrong but I read that doing this, at the end of the program it tries to destroy the same bitmap 5 times, because every SetBitmap() links the bitmap to more than one object. I read something about a SwapBitmap function instead of SetBitmap, but I cannot find it. I also tried SetPicture but the result is the same. Also I tried "bitmap->Load()" instead of AknIconUtils but the panic error remained.
CFbsBitmap *bitmap, *mask;
// Load BMP, no mask required
AknIconUtils::CreateIconL( bitmap, mask, wMBM2Path, EMbmTexasholdemteacher2Dr, -1 );
// Set the same BMP on various image controls
Please can anybody help me? I would also understand the difference between "SetBitmap() / SetPicture()" and "bitmap->Load() / AknIconUtils" because reading the documentation I still am in trouble deciding which one I have to use.