Symbian 开发技巧总结100条
2010-03-15 15:52:00 来源:WEB开发网#endif
typedef PACKED struct tagBITMAPFILEHEADER{};
68. SetExtent(TPoint(0,0), iQikAppUi.ClientRect().Size());
并不可靠,特别是改变屏幕显示模式。可以使用CQikGridLayoutManager。
CQikGridLayoutManager* gridlayout = CQikGridLayoutManager::NewLC();
SetLayoutManagerL(gridlayout);
CleanupStack::Pop(gridlayout);
对于CQikViewDialog使用
Page(ActivePageId())->SetLayoutManagerL(gridlayout);
69. 直接创建独立的控件;
iMyCtrl->ConstructL( KCameraContainerRect, &(iEikonEnv->RootWin()));
70. 不同图片格式转换
CFbsBitmap::Create(aSizeInPixels,aDispMode);创造一张灰色位图,如EGray16
然后利用
CFbsBitmapDevice以及CFbsBitGc,将原图绘制上去即可
71. 修改视图标签:
MQikViewContext* viewContext = ViewContext();
viewContext->ChangeTextL(EContextViewText, viewContextText);
72. 侦听application焦点切换from a server process?
RWsSession ws;
User::LeaveIfError(ws.Connect());
CleanupClosePushL(ws);
RWindowGroup wg(ws);
User::LeaveIfError(wg.Construct(reinterpret_cast
CleanupClosePushL(wg);
wg.SetOrdinalPosition(-1); // hide the window
groupwg.DefaultOwningWindow();
wg.EnableReceiptOfFocus(EFalse);
wg.EnableFocusChangeEvents(); // get ready to receive focus change events
TRequestStatus status = KRequestPending;
ws.EventReady(&status);
User::WaitForRequest(status); // wait until the focus is changed
CleanupStack::PopAndDestroy(); // wg
TInt wgid = ws.GetFocusWindowGroup();
CApaWindowGroupName* gn = CApaWindowGroupName::NewLC(ws, wgid);
TUid uid = gn->AppUid(); // the uid of the focused app
CleanupStack::PopAndDestroy(2); // gn, ws
- ››Symbian S60 SocketConnection参数
- ››开发学院教你用SQL 语句最快速清空MySQL 数据表的...
- ››Symbian乏力:2010年诺基亚悲情大事记
- ››Symbian三大升级开启2011年新战略
- ››Symbian/Android/iOS/WM安装包对比
- ››Symbian一个活动对象的测试例子
- ››Symbian ListBox控件
- ››Symbian下自动切换SDK的批处理代码
- ››Symbian 3 版的 Swype 输入法正式上架
- ››Symbian中的设计模式
- ››Symbian S60平台JAVA开发环境搭建步骤
- ››Symbian自定义控件—如何实现跑马灯效果
更多精彩
赞助商链接