Archived:Switching application UI orientation between landscape and portrait using Symbian C++
Switching application UI orientation between landscape and portrait
By default, applications are started in the current orientation of the device screen.
In order to force an application to be started in landscape mode or portrait mode, a corresponding flag needs to be passed to the BaseConstructL() function in CAknAppUi::ConstructL():
BaseConstructL( EAknEnableSkin | EAppOrientationLandscape ); // start in landscape mode
To change the orientation while the application is running, call
void CAknAppUiBase::SetOrientationL( TAppUiOrientation aOrientation );
with either EAppUiOrientationLandscape or EAppUiOrientationPortrait as a parameter. Note that these are not the same enumeration values as those passed to BaseConstructL().