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.
}
The corresponding class of the floating point request dialog box is CAknFloatingPointQueryDialog. The following code is used as an example:
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.
}
In addition to the above, there are many types of Dialog in Symbian. Since I have not analyzed them, I will not give them one by one.