First things Vineet I am not using HandleResourceChangeL function
HTML Code:
SetRect() invokes SizeChanged() which is the first statement in the HandleResourceChangeL()
. I am using HandleResourceChange which is overridden in container.
And this is what i tried:
Code:
void CMainFeaturesContainer::HandleResourceChange(TInt aType)
{
RFile file;
TBuf8<64>data8;
data8.Zero();
file.Create(CCoeEnv::Static()->FsSession(), _L("c:\\data\\orientation2.txt"), EFileWrite);
data8.Copy(_L8("5#"));
file.Write(data8);
// Call base class implementation
CCoeControl::HandleResourceChange(aType);
SetRect(iAvkonViewAppUi->View(TUid::Uid(EMainViewId))->ClientRect());
data8.Copy(_L8("6#"));
file.Write(data8);
iBackGround = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain, Rect(), EFalse );
CreateListboxL();
data8.Copy(_L8("7#"));
file.Write(data8);
CEikAppUi* appUi = CEikonEnv::Static()->EikAppUi();
CEikApplication* app = appUi->Application();
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
TFileName bitmapFile;
bitmapFile = (app->BitmapStoreName());
bitmapFile.SetLength(bitmapFile.LocateReverse('\\') + 1);
bitmapFile.Append(_L("Listbox_bitmaps.mif"));
data8.Copy(_L8("8#"));
file.Write(data8);
CAknsItemDef* pMenuSkinItemCBA = AknsUtils::CreateBitmapItemDefL( KAknsIIDQsnBgAreaMain, bitmapFile,
EMbmListbox_bitmapsBackgroungcolor );
data8.Copy(_L8("9#"));
file.Write(data8);
TRAPD(err, skin->SetLocalItemDefL( pMenuSkinItemCBA));
TBuf<10> buf; buf.Zero();
buf.AppendNum(err);
data8.Copy(buf);
file.Write(data8);
iListBox->SetRect(Rect());
data8.Copy(_L8("11#"));
file.Write(data8);
SetIconsL();
data8.Copy(_L8("12#"));
file.Write(data8);
SetItemsL();
data8.Copy(_L8("13#"));
file.Write(data8);
file.Close();
}
and the output of the file is 5#6#7#8#9# and the app crashes with KERN EXEC 0