Help for displaying Application Icons in uiq3
| Thu, 2006-11-23 11:52 | |
|
I am trying to display the Names and Icons of all the applications in UIQ3. I have got the names and displayed it into list box but not finding a way to disply the Icons into the ListBox. Here is my code but it is making Panic at runtime as it goes to Pop the first element aMaskBmp   CApaMaskedBitmap* aAppBitmap = CApaMaskedBitmap::NewLC(); TInt aErr = aSession.GetAppIcon(aAppInfo.iUid,1,*aAppBitmap); CFbsBitmap* aMaskbmp = new(ELeave) CFbsBitmap(); CleanupStack::PushL(aMaskbmp); aMaskbmp = aAppBitmap->Mask(); CGulIcon* aGulIcon = CGulIcon::NewLC(); aGulIcon = CEikonEnv::CreateIconFromMaskedBitmapL(*aAppBitmap); CFbsBitmap* aIconBmp = new(ELeave) CFbsBitmap(); CleanupStack::PushL(aIconBmp); aIconBmp = aGulIcon->Bitmap(); CQikContent* aContent = new(ELeave) CQikContent(); CleanupStack::PushL(aContent); aContent->SetBitmap(aIconBmp); aContent->SetMask(aMaskbmp); aTaskListBoxData->AddIconL(aContent,EQikListBoxSlotLeftSmallIcon1); CleanupStack::Pop(aMaskbmp); CleanupStack::Pop(aIconBmp); CleanupStack::Pop(aContent); Pankaj Dubey |
|






Forum posts: 3
may be the order of CleanupStack::Pop should be in the reverse..
may be like this:
CleanupStack::Pop(aContent);
CleanupStack::Pop(aIconBmp);
CleanupStack::Pop(aMaskbmp);