Info about the CAknDialog::ExecuteLD function
| Wed, 2004-11-03 13:54 | |
|
Sometimes the documentation can be quite extraordinary bad. This is what I found when trying to know what the ExecuteLD function really does and returns. From CAknQueryDialog:
"IMPORT_C TInt CAknQueryDialog::ExecuteLD ( TInt aResourceId ) Reimplemented from CAknDialog." And this is what I found in the CAknDialog base class: "IMPORT_C TInt CAknDialog::ExecuteLD ( TInt aResourceId ) Reimplemented in CAknQueryDialog." Can someone tell me what executeLD really does and what it returns? I have the following code, which not shows the R_CONTACT_DIALOG, but only shows it in the background when the CAknQueryDialog is shown (the query dialog is not supposed to be shown at all). What can be wrong? Code: CTerminalAppContactForm* contactForm = CTerminalAppContactForm::NewL(contactInfo); if (!contactForm->ExecuteLD(R_CONTACT_DIALOG)) { //WHY IS THE FORM SHOWN HERE BUT DISAPPEARS AFTER CLICKED OK ON THE FOLLOWING DIALOG?????????? CAknMessageQueryDialog* dlg2 = CAknMessageQueryDialog::NewL(_L("APA")); dlg2->PrepareLC(R_MESSAGE_POPUP_INFO); dlg2->QueryHeading()->SetTextL(_L("DET GICK FEL VID ÖPPNING!")); dlg2->RunLD(); } //Frustrated programmer ![]() |
|







Forum posts: 1379
It returns the resource ID of the button you pressed so you would do:
if(dlg->ExecuteLD(...) == EAknSoftkeyOk) etc.
didster
Forum posts: 349
I also found out that you have to have the EEikDialogFlagWait flag set for a dialog to stay visible:
{
flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect | EEikDialogFlagWait
| EEikDialogFlagButtonsRight | EEikDialogFlagNoTitleBar
| EEikDialogFlagCbaButtons /*| EEikDialogFlagModeless */;
buttons = R_AVKON_SOFTKEYS_OPTIONS_DONE;
form = r_contact_form;
}