Hi, this is my first attempt to write a resource-based dialog. I'm trying to pop up a text query dialog. I have this code:
Here is my resource.rss file:Code:bool CSemacodeContainer::ShowQueryWithHeadingLineL() { TBuf<1024> sometext; CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL(sometext, CAknQueryDialog::EConfirmationTone); TRAPD(err, bool result = dlg->ExecuteLD(R_SEMACODE_DATA_QUERY_WITH_HEADING)); if (err != KErrNone) { User::Panic (_L("Helper"), 1); } return result; }
Code://----------------------------------------------------------------------------- // // r_semacode_data_query_with_heading // //----------------------------------------------------------------------------- RESOURCE DIALOG r_semacode_data_query_with_heading { flags = EEikDialogFlagWait | EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | EEikDialogFlagCbaButtons | EEikDialogFlagNoShadow; buttons = R_AVKON_SOFTKEYS_DONE_CANCEL; items= { DLG_LINE { type = EAknCtPopupHeadingPane; id = EAknMessageQueryHeaderId; control = AVKON_HEADING { label = "Data entering:"; bmpfile = AVKON_BMPFILE_NAME; bmpid = EMbmAvkonQgn_indi_checkbox_on; bmpmask = EMbmAvkonQgn_indi_checkbox_on_mask; }; }, DLG_LINE { type = EAknCtQuery; id = EGeneralQuery; control = AVKON_DATA_QUERY { // Use this when you have a heading in data query layout = EStaticSizeDataLayout; label = "Data query with heading looks nice!!!:"; control = EDWIN { flags= EEikEdwinNoHorizScrolling | EEikEdwinResizable; maxlength=80; width=16; lines=1; }; }; } }; }
when I run it I get "System Error (-1)".
simon



