symbian 界面绘制

 
全屏
构造container时,将AppUi()->ApplicationRect()做为参数aRect传递进去。
然后在container构造函数中调用SetRect(aRect);这样即可全屏显示
 
隐藏状态栏
      CEikStatusPane* statusPane = StatusPane();    
            statusPane->MakeVisible( EFalse );   
 
旋转屏幕
2.8,3.0 SDK支持屏幕旋转,程序里面可以捕获该消息,然而使UI自定义的改变位置
继承的函数为: Container::HandleResourceChange,原先的 SizeChange这个函数不会响应
 
在该函数内不要使用 AppUi->ClientRect函数来获取工作区范围,数据会有偏差(这个问题郁闷了好久),可以使用
TRect rect;
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,rect );
来获取RECT 
 
 
全屏到正常
User "SetRect" inside your container. Pass in the original client area rect parameter back to the CCoeControl.

You may use the following code:

1) Before calling "SetExtentToWholeScreen", save the rect:

iRect = Rect();

Gets the control's extent

2) call "SetExtentToWholeScreen"

3) Switch back:

SetRect( iRect );
 
 
获取当前旋转状态
#include <aknappui.h>
 
CCoeEnv* env = CCoeEnv:: Static ( );
if ( env )
    {
    CAknAppUiBase* appUiBase = REINTERPRET_CAST ( CAknAppUiBase*, env->AppUi ( ) );
    if ( appUiBase )
        {
        /*
        * Possible values for TAppUiOrientation are :
        * EAppUiOrientationUnspecified,
        * EAppUiOrientationPortrait,
        * EAppUiOrientationLandscape,
        * EAppUiOrientationAutomatic
        **/

        CAknAppUiBase:: TAppUiOrientation orientation = appUiBase->Orientation ( );
        }
    }
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值