开发学院手机开发Symbian 开发 Symbian OS S60 3rd platform 开发入门 阅读

Symbian OS S60 3rd platform 开发入门

 2010-03-24 03:56:00 来源:WEB开发网   
核心提示:AppUI中的HandleKeyEventL(),如果OffKeyEventL()处理了事件则返回EKeyWasConsumed,Symbian OS S60 3rd platform 开发入门(4),如果想直接调用AppUI中的HandleKeyEventL()可以通过set ECoeStackFlagRefuses
AppUI中的HandleKeyEventL()。如果OffKeyEventL()处理了事件则返回EKeyWasConsumed。

如果想直接调用AppUI中的HandleKeyEventL()可以通过set ECoeStackFlagRefusesAllKeys 来省去调用OfferKeyEventL()。

每次按键都会产生3个事件类型1 EEventKeyDown,2 EEventKeyUp,3 EEventKey;可以从OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)中的aType中得到事件类型。aKeyEvent是一个struct可以得到按键的更多属性,eg:iCode指名按了哪个键(键名在 e32keys.h中)iRepeats可以判断是重复按键还是长按键。如果想改变系统的按键重复率可以通过RWsSession 的SetKeyboardRepeatRate方法来设置。

错误“Illegal use of incomplete struct/union/class”可能是由于缺少头文件造成的。

比如在工程中新加入了一个类A,类B中使用类A。在类B的头文件使用了类AFORWARD DECLARATIONS,而在类B的.cpp文件中却没有包含类A的头文件。

为了知道哪些类需要哪些库,有以下三个html格式的文档可以参考:

2.0_libindex.html

3.0_classindex.html

3.0_libindex.html

S60的开发与Qt的开发是相似的,没有类似msdn的文档。大部分疑问应该上网,SDK或者参看各个类的头文件来解决,特别是看头文件这一点和Qt是一样的。

User::LeaveIfError( iFsSession.Connect() );

// Let other sessions to use this. ShareProtected() must be called for

// enabling other other threads in this process to use this handle.

iFsSession.ShareProtected();

关于绘图可以多参考gdi.h中的内容。

iEikonEnv与CEikonEnv::Static()的用法:

1.包含头文件#include 。否则出现“undefined identifier 'CEikonEnv'”的错误。

2.在.mmp文件中包含库LIBRAR eikcore.lib

After becoming accustomed to the automatic zeroing of all member data for CBase-derived classes, developers often forget to initialize member data for non-CBase-derived classes. Automatic zero-initialization is CBase-specific behavior, so T-classes and all standard types should initialize their data to suitable values on construction.

上一页  1 2 3 4 5 6 7  下一页

Tags:Symbian OS rd

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接