hi
I have implemented the "HandleResourceChangeL" function and my application is working well when i apply the screen rotation function while my app is on the main view. I am working on S60 3rd edition and using E60 mobile phone.
The problem occurs when i open some other view e.g AboutView of app and my app goes in background, now if i apply screen rotation function than my app crashes. To be more specific following is the code of HandleResourceChangeL function written in

AppUI.cpp

void CMyAppUi::HandleResourceChangeL(TInt aType)
{
CAknAppUi::HandleResourceChangeL( aType );
if ( aType == KEikDynamicLayoutVariantSwitch )

{
iMainView->ReLayout();
iAboutView->ReLayout();
}
}

and code of ReLayout Function in MyView.cpp is as fallows

void CMyView::ReLayout()
{
if (iContainer)
iContainer->SetRect( ClientRect() );
}

and same code is written in AboutView.cpp for ReLayout function.

Now why that code works well when executed for main view of app and not working when executed for other views.
waiting for replay
regards
Muhammad Shahzad Amin