How can I change the image in "Wait" dialog using Symbian
I tried to change the image (icon) of the wait dialog from the "Gear" icon to a different one but i failed though I follow a lot of articles and examples in books:
RESOURCE DIALOG r_progressdlg_container_wait_dialog1
{
flags = EAknWaitNoteFlags;
buttons = R_AVKON_SOFTKEYS_CANCEL;
items =
{
DLG_LINE
{
id = EProgressdlgContainerViewWaitDialog1;
type = EAknCtNote;
control = AVKON_NOTE
{
layout = EWaitLayout;
singular_label = STR_progressdlgContainerView_10;
animation = R_QGN_GRAF_WAIT_BAR_ANIM;
};
},
DLG_LINE
{
id = EProgressdlgContainerViewWaitDialog1;
type=EEikCtImage;
control = IMAGE
{
horiz_align=EEikLabelAlignHRight;
vert_align=EEikLabelAlignVTop;
bmpfile = "\\resource\\apps\\progressdlg.mbm";
bmpid = EMbmProgressdlgList_icon;
bmpmask = EMbmProgressdlgList_icon_mask;
extension=0;
};
}
};
}
here is my updated code based on your supported information but, The dialog still shows th开发者_高级运维e default icon "Gear", So what is wrong in code ?
I'm using Carbide.C++ 2.7, S60 5th Ed SDK, Testing on Nokia E7 (Symbian^3)
You can replace the image a bit like this:
// CONSTANTS
#define AVKON_BMPFILE_NAME "\\resource\\apps\\avkon2.mbm"
...
RESOURCE DIALOG r_my_progress_note
{
flags = EAknProgressNoteFlags;
buttons = r_my_softkeys_cancel;
items =
{
DLG_LINE
{
type = EAknCtNote;
id = EMyCtrlIdProgressNote;
control = AVKON_NOTE
{
layout = EProgressLayout;
singular_label = STRING_r_exnt_progress_singular;
plural_label = STRING_r_exnt_progress_plural;
imagefile = AVKON_BMPFILE_NAME;
imageid = EMbmAvkonQgn_note_progress;
imagemask = EMbmAvkonQgn_note_progress_mask;
};
}
};
}
The Note example application has lots of examples of replaced images in different dialogs. On the S60 5th edition SDK, you'll find it under:
C:\S60\devices\S60_5th_Edition_SDK_v1.0\S60CppExamples\Note
There could also be a problem with your .mbm or indices, so try first with avkon2.mbm.
Looks to me like the code you have posted applies to the progress bar animation, rather than the icon. I would guess you need something like
DLG_LINE {
id=EDlgListBoxViewWaitDialog1;
type=EEikCtImage;
control = IMAGE
{
bmpfile = "example.mbm"; // Replace with your .mbm file
bmpid = mbmID; // // The id of the image
};
}
or just set it in code?
精彩评论