WEB开发网
开发学院手机开发Symbian 开发 Symbian 对话框用法 阅读

Symbian 对话框用法

 2010-03-05 06:11:00 来源:WEB开发网   
核心提示:#define R_AVKON_SOFTKEYS_LISTEN_EXIT 0x8cc002c#define R_AVKON_SOFTKEYS_SEARCH_BACK 0x8cc002d#define R_AVKON_SOFTKEYS_AGAIN_QUIT 0x8cc002e#define R_AVKON_SOFTKEY

#define R_AVKON_SOFTKEYS_LISTEN_EXIT 0x8cc002c

#define R_AVKON_SOFTKEYS_SEARCH_BACK 0x8cc002d

#define R_AVKON_SOFTKEYS_AGAIN_QUIT 0x8cc002e

#define R_AVKON_SOFTKEYS_QUIT 0x8cc002f

#define R_AVKON_SOFTKEYS_INSERT_BACK 0x8cc0030

如果上面的软键不能满足需求,可以通过定义新的CBA资源来定义新的软件。下面示例:

RESOURCE CBA r_softkeys_options_next

{

buttons =

{

CBA_BUTTON

{

id = EAknSoftkeyOptions;

txt = qtn_aknexeditor_cba_options;

},

CBA_BUTTON

{

id = EAknMyCmdNext;

txt = qtn_Myapp_cba_next;

}

};

}

这样对Dialog已经有一定得了解,其实对话框分为single-page对话框和multi-page对话框。

单页对话框资源定义

示例如下:

RESOURCE DIALOG r_demo_singlepage_dialog

{

flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect | EEikDialogFlagCbaButtons |

EEikDialogFlagWait;

buttons = R_AVKON_SOFTKEYS_OK_CANCEL;

items =

{

DLG_LINE

{

type = EEikCtNumberEditor;

// The caption(prompt)

prompt = "Number1:"; //这个功能相当Lable

id = ESinglePageDlgC1Id;

// The control

control = NUMBER_EDITOR { min=0; max=999; };

// The tag, indicating the measurement unit

trailer = "cm";

},

DLG_LINE

{

type = EEikCtNumberEditor;

// The caption(prompt)

prompt = "Number2:";

id = EsinglePageDlgC2Id;

// The control

control = NUMBER_EDITOR { min=0; max=999; };

// The tag, indicating the measurement unit

trailer = "cm";

}

};

}

新手们 请用好你的SDK帮助文档,宝杰建议。

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

Tags:Symbian 对话框 用法

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