gc.DrawText程序一打开就关闭

signsmile 2009-02-10 12:01:39
void CHelloBasicContainer::Draw( const TRect& aRect ) const
{
// [[[ begin generated region: do not modify [Generated Contents]
CWindowGc& gc = SystemGc();
gc.Clear( aRect );
TRect a(40,80,200,180);
gc.DrawEllipse(a);
TPoint textPoint(150,115);
//gc.DrawText(_L("text!"),textPoint);
// ]]] end generated region [Generated Contents]

}

没有gc.DrawText(_L("text!"),textPoint);时程序正常运行
有了那句话后 程序一启动就关闭 这是怎么回事啊 望高手解决
...全文
113 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
signsmile 2009-03-09
  • 打赏
  • 举报
回复
谢谢了 试了一下成功了 原来是没有设置笔颜色和字体 不过系统没有带一个默认的吗?
netlib 2009-02-13
  • 打赏
  • 举报
回复

//gc.DrawText(_L("text!"),textPoint);
之前加一句

gc.UseFont(CEikonEnv::Static()->LegendFont());
gc.SetPenColor(TRgb(255, 0, 0));
netlib 2009-02-13
  • 打赏
  • 举报
回复
在DrawText之前加一句

gc.UseFont(CEikonEnv::Static()->LegendFont());
gc.SetPenColor(TRgb(255, 0, 0));

3,120

社区成员

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

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