Symbian 开发中卡拉OK字幕实现方法
2010-02-23 04:09:00 来源:WEB开发网iBackBufferDevice = NULL;
}
if (iBackBuffer)
{
delete iBackBuffer;
iBackBuffer = NULL;
}
if (iBackBufferContext_2)
{
delete iBackBufferContext_2;
iBackBufferContext_2 = NULL;
}
if (iBackBufferDevice_2)
{
delete iBackBufferDevice_2;
iBackBufferDevice_2 = NULL;
}
if (iBackBuffer_2)
{
delete iBackBuffer_2;
iBackBuffer_2 = NULL;
}
}
void CAuditionContainer::DrawToBackBuffer()
{
const CFont *Font = CEikonEnv::Static()->DenseFont();
iBackBufferContext->UseFont(Font);
// _LIT(KText,”hello world”);
TBuf8<20> msg8 ;
TBuf<20> KText ;
msg8.Format(_L8(” 谢谢您的使用”)) ;
ConvGbk2Uni(msg8, KText) ;
iBackBufferContext->SetPenColor(KRgbGreen);
iBackBufferContext->DrawText(KText,TPoint(0,Font->HeightInPixels()));
iBackBufferContext_2->UseFont(Font);
// _LIT(KText,”hello world”);
iBackBufferContext_2->SetPenColor(KRgbRed);
iBackBufferContext_2->DrawText(KText,TPoint(0,Font->HeightInPixels()));
}
void CAuditionContainer::Draw( const TRect& ) const
{
CWindowGc& gc = SystemGc();
gc.Clear();
gc.BitBlt(TPoint(0,100),iBackBuffer,TRect(TPoint(0,0),TSize(iBackBuffer->SizeInPixels().iWidth/5,iBackBuffer->SizeInPixels().iHeight)));
gc.BitBlt(TPoint(iBackBuffer_2->SizeInPixels().iWidth/5,100),iBackBuffer_2,TRect(TPoint(iBackBuffer_2->SizeInPixels().iWidth/5,0),TSize(iBackBuffer_2->SizeInPixels().iWidth*4/5,iBackBuffer_2->SizeInPixels().iHeight)));
}
使用步骤
第一步:初始化
- ››开发Android 日历教程
- ››开发学院总结 Win 8实用技巧大全
- ››开发学院原创教程:把win8的IE10放桌面上方法(非...
- ››开发者眼中的Windows Phone和Android
- ››Symbian S60 SocketConnection参数
- ››开发学院教你用SQL 语句最快速清空MySQL 数据表的...
- ››Symbian乏力:2010年诺基亚悲情大事记
- ››Symbian三大升级开启2011年新战略
- ››Symbian/Android/iOS/WM安装包对比
- ››Symbian一个活动对象的测试例子
- ››Symbian ListBox控件
- ››Symbian下自动切换SDK的批处理代码
更多精彩
赞助商链接