U can use this :
TBuf<300> pMsg;
pMsg.Append(_L("test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test "));
TBuf<30> pTitle = _L("INFO");
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(pMsg);
dlg->PrepareLC(R_MESSAGE_QUERY);
dlg->QueryHeading()->SetTextL(pTitle);
dlg->RunLD();
and in the resource U must add:
RESOURCE DIALOG r_message_query
{
flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
items=
{
DLG_LINE
{
type = EAknCtPopupHeadingPane;
id = EAknMessageQueryHeaderId;
control = AVKON_HEADING
{
};
},
DLG_LINE
{
type = EAknCtMessageQuery;
id = EAknMessageQueryContentId;
control = AVKON_MESSAGE_QUERY
{
//layout = EConfirmationQueryLayout;
};
}
};
}