Hi, I want to load two PNG images and store them in CFbsBitmap and display them in an overlapping manner(one on top of another). However... When I try to blit them... Only one image is shown... Can anybody help me please? Here's my code... Thanks!
//This is from my CCipherConter.Cpp file
void CCipherContainer::ConstructL(const TRect& aRect)
{
iMenuCode=0;
iCurrentScreen=EMainScreen;
CreateWindowL();
SetRect(aRect);
ActivateL();
iConverter = CMdaImageFileToBitmapUtility::NewL(*this);
//Start an asynchronous process to open the PNG file
iConverter->OpenL(KMainPngFileName);
iConverter->OpenL(KRedButtonPngFileName); //This to be displayed on top of KMainPngFileName
}
void CCipherContainer::LoadMainMenuL()
{
CWindowGc& gc = SystemGc();
gc.Activate(*DrawableWindow());
gc.Clear(Rect());
if (iConvertState==EConvertStateReady)
{
gc.BitBlt(Rect().iTl,iBitmap);
}
gc.Deactivate();
}
//THESE ARE THE CALLBACK FUNTIONS
void CCipherContainer::MiuoOpenComplete(TInt aError)
{
if (aError == KErrNone)
{
iConvertState = EConvertStateConvertingFromPng;
TFrameInfo frameInfo;
//Get the frame info
iConverter->FrameInfo(KPngFrameIndex,frameInfo);
iBitmap = new (ELeave) CFbsBitmap();
//Create a bitmap based on the size of the PNG
TInt err = iBitmap->Create(frameInfo.iOverallSizeInPixels,KDeviceColourDepth);
if (err == KErrCouldNotConnect)
{
//NEikonEnvironment::MessageBox(_L("Could not connect to font and bitmap server"));
return;
}
if (err == KErrArgument)
{
//NEikonEnvironment::MessageBox(_L("Illegal Gif file size"));
return;
}
//Convert the gif into a bitmap
TRAPD(convertErr,iConverter->ConvertL(*iBitmap,KPngFrameIndex)); //*iBitmap
//Trap error as this function cannot leave
if (convertErr != KErrNone)
{
//NEikonEnvironment::MessageBox(_L("Cannot initiate converter"));
}
}
else if (aError == KErrUnderflow)
{
//This error occurs if the gif file contains insufficient information
//This is usually because the file is being opened in a cache so a futher attempt to open
//should be performed
TRAPD(err,iConverter->OpenL(KMainPngFileName));
if (err !=KErrNone)
{
//NEikonEnvironment::MessageBox(_L("Gif file contains insufficient information, cannot retry"));
}
}
else
{
//NEikonEnvironment::MessageBox(_L("Error opening file"));
}
}
void CCipherContainer::MiuoConvertComplete(TInt aError)
{
if( aError != KErrNone )
{
iErrorCode = aError;
return;
}
//What's next?
iConvertState=EConvertStateReady;
MenuLoaderL();
//DrawNow();
}
void CCipherContainer::MiuoCreateComplete(TInt aError)
{
}
Somebody help me please...Thanks...

Thanks...



