symbian 创建 CBrCtlInterface 注意事项

来源:互联网 发布:删除网络用户名和密码 编辑:程序博客网 时间:2024/05/01 05:11

由于 CBrCtlInterface 的特殊性,在创建的时候有些注意的。注:本文仅说明创建是的功能,对于如何使用,可以上网搜一下。

 

void CWebContainer::ConstructL(const TRect& aRect)

{

//Create a window for this application view

CreateWindowL();

 

//注意1:传入的 aRect 为客户区区域,左上角不为(0,0 )。刚开始是,我直接将此函数传入 CreateBrowserControlL ,结果是控件不能画满

TRect iRect;

TPoint iP = TPoint(0,0);

iRect.SetRect( iP, aRect.iBr);

SetRect( aRect );

//SetExtentToWholeScreen();

//Add the browser

iBrowser = CreateBrowserControlL( this,

iRect,

iCapabilities,

iCommandBase,

NULL,

NULL,

NULL,

NULL,

NULL

);

iBrowser->ActivateL();

if( iBrowser )

{

iBrowser->AddLoadEventObserverL( this );

//注意2:上边注释去的一行是标准设置,下一行是显示中文是的设置。

//iBrowser->SetBrowserSettingL( TBrCtlDefs::ESettingsFontSize, TBrCtlDefs::EFontSizeLevelNormal );

iBrowser->SetBrowserSettingL( TBrCtlDefs::ESettingsCharacterset, KCharacterSetIdentifierUtf8 );

}

ActivateL();

}

原创粉丝点击