添加了一个Label怎么无法显示?

zhoufanking 2009-01-14 09:05:08
我用Carbide c++ 2.0创建了一个UI工程,然后在AppView中添加了一个Label,代码如下:

void CBlankWinAppView::ConstructL(const TRect& aRect)
{
// Create a window for this application view
CreateWindowL();

//SetBlank();


iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL(*this);
iLabel->SetTextL(_L("aLabel"));


// Set the windows size
SetRect(aRect);

// Activate the window, which makes it ready to be drawn
ActivateL();
}

但是在模拟器中执行时,这个label中却显示不出来。求教!!
...全文
336 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
netlib 2009-02-05
  • 打赏
  • 举报
回复
TInt CIPCameraClientContainer2::CountComponentControls() const
{
return 1; // return nbr of controls inside this container
}

CCoeControl* CIPCameraClientContainer2::ComponentControl(TInt aIndex) const
{
switch ( aIndex )
{
case 0:
return iLabel;
default:
return NULL;
}
}
程序员Linc 2009-02-04
  • 打赏
  • 举报
回复
高手们~~~
coderwu 2009-01-19
  • 打赏
  • 举报
回复
来迟一步,2楼正解。
漁_夫 2009-01-15
  • 打赏
  • 举报
回复
复合控件。。。。
zhoufanking 2009-01-14
  • 打赏
  • 举报
回复
问题已解决。在View类中应该实现CountComponentControls()和ComponentControl().

3,119

社区成员

发帖
与我相关
我的任务
社区描述
塞班系统(Symbian系统)是塞班公司为手机而设计的操作系统,它的前身是英国宝意昂公司的 EP ( Electronic Piece of cheese)操作系统。
社区管理员
  • Symbian社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧