symbian编程,从已有的菜单项过渡到输入字符串功能如何实现

来源:百度知道 编辑:UC知道 时间:2024/06/30 10:04:27
/*
============================================================================
Name : wtt.rss
Author :
Copyright : Your copyright notice
Description : This file contains all the resources for the wtt.
============================================================================
*/
// RESOURCE IDENTIFIER
NAME WTTX // 4 letter ID

// INCLUDES
#include <eikon.rh>
#include <avkon.rsg>
#include <avkon.rh>
#include <appinfo.rh>
#include "wtt.hrh"
#include "wtt.rls"

// RESOURCE DEFINITIONS
// -----------------------------------------------------------------------------
//
// Define the resource file signature
// This resource should be empty.
//
// -----------------------------------------------------------------------------
//
RESOURCE RSS_SIGNATURE
{
}

// -----------------------

菜单的按键响应不用我说了吧?HandleCommandL
.h文件中定义 TBuf<20> PhoneNumber;
.rss资源文件中定义
RESOURCE DIALOG r_phone_number_query
{
flags = EGeneralQueryFlags;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
items =
{
DLG_LINE
{
type = EAknCtQuery;
id = EGeneralQuery;
control = AVKON_DATA_QUERY
{
layout = EPhoneLayout;
label = qtn_phone_query;
control = EDWIN
{
flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
maxlength = 15;
};
};
}
};
}

.cpp文件中
#include <AknQueryDialog.h>
TInt CSMS3rdAppView::GetPhoneNumberL()
{

CAknTextQueryDialog* dlg = new (ELeave) CAknTextQueryDialo