Symbian 对话框用法
2010-03-05 06:11:00 来源:WEB开发网id = EGeneralQuery;
control = AVKON_DATA_QUERY
{
layout = EFloatingPointLayout;
label = "Enter value :";
control = FLPTED
{
maxlength=10;
min=0;
max=100;
default=0;
};
};
}
};
}
STRUCT FLPTED
{
WORD maxlength=18;
DOUBLE min=-9.9e99;
DOUBLE max=9.9e99;
DOUBLE default=0; // if !(min<=default<=max), default = min.
}
浮点数请求对话框对应的类是:CAknFloatingPointQueryDialog。下面代码示例之:
TReal value = 2.12345;
// create dialog instance; value is a TReal reference that is used for // the editor
CAknFloatingPointQueryDialog* dlg =new (ELeave) CAknFloatingPointQueryDialog (value);
// launch the dialog with resource R_DEMO_FLOATING_QUERY
if (dlg->ExecuteLD( R_DEMO_FLOATING_QUERY ))
{
// ok pressed, value is the entered floating point number in the // editor.
}
除了以上这些以外 Symbian还有很多类型的Dialog 由于我还没有分析 就不在此一一举例
更多精彩
赞助商链接