We can specify an image for the navigation pane in the resource file using the NAVI_IMAGE resource. This resource has three fields:
The following is the code snippet for .rss file :
#include <avkon.mbg>
RESOURCE NAVI_IMAGE r_yourapplication_navi_image
{
bmpfile = "\\system\data\avkon.mbm"; // or KAvkonBitmapFile define in avkon.rh
bmpid = EMbmAvkonQgn_stat_keyguard;
}
The bmpfile field specifies the .mbm file's location, and the specific bitmap to use from the file is specified by the bmpid field.
TUid naviPaneUid;
naviPaneUid.iUid = EEikStatusPaneUidNavi;
CEikStatusPane* statusPane = StatusPane();
CEikStatusPaneBase::TPaneCapabilities subPane = statusPane->PaneCapabilities(naviPaneUid);
// if we can access the navigation pane
if (subPane.IsPresent() && subPane.IsAppOwned())
{
CAknNavigationControlContainer* naviPane = (CAknNavigationControlContainer*)statusPane->ControlL(naviPaneUid);
// read the navigation pane image resource
TResourceReader reader;
iCoeEnv->CreateResourceReaderLC(reader, R_YOURAPPLICATION_NAVI_IMAGE);
if (iNaviDecorator)
{
delete iNaviDecorator;
iNaviDecorator = NULL;
}
// set the navigation pane image
iNaviDecorator = naviPane->CreateNavigationImageL(reader);
// pushed by CreateResourceReaderLC
CleanupStack::PopAndDestroy();
naviPane->PushL(*iNaviDecorator);
}
No related wiki articles found