A query is a simplified dialog containing one or two editors.
Note that in order to have a header pane, the AVKON_HEADING
component
should be specified as the first dialog line in the resource description.
At runtime, the dialog's header pane CAknPopupHeadingPane
)
can be obtained by calling the function CAknQueryDialog::QueryHeading()
.
Query dialogs are dialogs that can be used to require user input or
user selection. All query dialogs derive from CAknQueryDialog
,
which inherits for CAknDialog
.
There are two types of queries: local and global queries. Local query dialogs
are local to a certain application. That means they are only displayed within
this application. Global query dialogs are system-wide queries, and are shown
topmost even when another application moves to the foreground. Query dialogs
require resource definitions when they are used in your code.
For information on the required resource declaration, see Defining the resource in Using Dialogs. For more information on using query dialogs in your UI, see Query dialog.
The following example illustrates the Secret Editor Query, which contains
a Secret Editor, resides inside the dialog. The values for flags
, type
, id
,
and control
are specific to the query dialog. These values
are enumerated in the avkon.hrh
file,
which is in the ./epoc32/include
folder.
RESOURCE DIALOG r_aknexquery_code_query { flags = EGeneralQueryFlags buttons = R_AVKON_SOFTKEYS_OK_CANCEL; items = { DLG_LINE { type = EAknCtQuery; id = EGeneralQuery; control = EGeneralQueryFlags { layout = ECodeLayout; label = label_text; control = SECRETED { num_letters = 8; }; }; } }; }
The query in the above example includes a secret editor. For information on implementing secret editors, see the Editors API.