Is it possible to put a logo in a dialog box (CAknDialog)?
Is it possible to put a logo in a dialog box (CAknDialog)?
refer to http://discussion.forum.nokia.com/fo...d.php?t=124915 there are more then one post discussed this .
Hello,
I try to put an Image in a dialog box CAknDialog.
I wrote :
In the .rss :
RESOURCE DIALOG r_camera_dialog_about
{
flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect
| EEikDialogFlagWait | EEikDialogFlagCbaButtons | EEikDialogFlagNoTitleBar;
//put here something to put an Icon DLG_LINE...
buttons = R_AVKON_SOFTKEYS_BACK;
} // RESOURCE
In the .cpp
void CCameraAboutDlg::PreLayoutDynInitL()
{
CEikImage* Icon = new CEikImage;
Icon->SetBitmap(iBitmap);//iBitmap is a CFbsBitmap* created and loaded with a picture located in the phone memory
CRichText* richText = iTextEditorAbout->RichText();
HBufC* message = StringLoader::LoadLC(R_CAMERA_DIALOG_DESCRIPTION);
richText->InsertL(0, '\f'); // EOL
richText->InsertL(0, *message);
CleanupStack::PopAndDestroy(); // message
message = 0;
CParaFormat paraFormat;
TParaFormatMask paraFormatMask;
iTextEditorAbout->SetSelectionL(0, richText->DocumentLength());
paraFormatMask.SetAttrib(EAttAlignment); // set the mask
paraFormat.iHorizontalAlignment = CParaFormat::ECenterAlign;
iTextEditorAbout->ApplyParaFormatL(¶Format, paraFormatMask);
// Create scroll bar.
CEikScrollBarFrame* scrollBarFrame = iTextEditorAbout->CreateScrollBarFrameL();
scrollBarFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
iTextEditorAbout->SetCursorPosL(0, EFalse);
iTextEditorAbout->UpdateScrollBarsL();
}
And I have no picture on my dialog box but I have the text. If somebody can help me.
Thanks
I dont see the CEikImage aka icon in your code being used anywhere to be set on the dialog, how do u expect it to be displayed?
For instance I use a CAknMessageQueryDialog, since I have lot of text to display and to add the image for instance to the header I use something like :-
Code:if(iMyDlg->QueryHeading()) { iMyDlg->QueryHeading()->SetHeaderImageL(icon); }
Cheers,
Mayank