开发学院手机开发Symbian 开发 Symbian 开发技巧总结100条 阅读

Symbian 开发技巧总结100条

 2010-03-15 15:52:00 来源:WEB开发网   
核心提示:#endiftypedef PACKED struct tagBITMAPFILEHEADER{};68. SetExtent(TPoint(0,0), iQikAppUi.ClientRect().Size());并不可靠,特别是改变屏幕显示模式,Symbian 开发技巧总结100条(9),可以使用CQikGridL

#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 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接