WEB开发网
开发学院手机开发Symbian 开发 symbian 开发实践总结大全 阅读

symbian 开发实践总结大全

 2010-05-31 19:58:00 来源:WEB开发网   
核心提示:#endiftypedef PACKED struct tagBITMAPFILEHEADER{};68. SetExtent(TPoint(0,0), iQikAppUi.ClientRect().Size());并不可靠,特别是改变屏幕显示模式,symbian 开发实践总结大全(9),可以使用CQikGridLay

#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(&wg), EFalse));

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

上一页  4 5 6 7 8 9 10 11 12  下一页

Tags:symbian 开发 实践

编辑录入:coldstar [复制链接] [打 印]
赞助商链接