Pls help me to solve this............
| Sat, 2007-10-20 10:48 | |
|
I want to use the icons EMbmAknexlistCheck,EMbmAknexlistCheckm used in ListBox (S60_2nd_FP3) SDK in my Application.So , I copied the Bitmaps check.bmp,checkm.bmp to my application and added to the .mmp File.But not able to use that icons in my application.How to use the icons of another application in my application?Is this possible? |
|






Forum posts: 2009
yes, it is possible. Check your MMP and PKG files content.
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 65
Hai,
When I add the Icons EMbmAknexlistCheck,
EMbmAknexlistCheckm,
EMbmAknexlistNon_check,
EMbmAknexlistNon_checkm from aknexlist example(SDK) to my application, Iam facing the following error.
FATAL ERROR: ERROR: Duplicate bitmap target "Z\SYSTEM\APPS\MYAPPLICATION\MYAPPLICATION.MBM
Forum posts: 71
hi Shilpa ,
we can use the in built images..
this is the way i add icons to my multiselection list box...
hope this example helps
rss file
RESOURCE AKN_ICON_ARRAY r_icon_testicons
{
type = EAknIconArraySimple;
// for release
bmpfile = "z:\\SYSTEM\\DATA\\AVKON.MBM";
icons =
{
AKN_ICON
{
iconId = EMbmAvkonQgn_indi_checkbox_on;
maskId = EMbmAvkonQgn_indi_checkbox_on_mask;
},
AKN_ICON
{
iconId = EMbmAvkonQgn_indi_checkbox_off;
maskId = EMbmAvkonQgn_indi_checkbox_off_mask;
}
};
}
in the constructl of container
CAknIconArray* icons =new(ELeave) CAknIconArray(2);
CleanupStack::PushL(icons);
icons->ConstructFromResourceL(R_ICON_TESTICONS);
// Sets graphics as ListBox icon.
iContactListBox->ItemDrawer()->ColumnData()->SetIconArray(icons);
CleanupStack::Pop(); // icons
Please note you do not need to delete the icons as the qwenership is passes to the list box..
Hope it helps,
Sohil
Forum posts: 65
Hai Sohil,
Thanks for ur reply.Earlier , I followed the same code .I added the Icons
EMbmAvkonQgn_indi_checkbox_on;
EMbmAvkonQgn_indi_checkbox_on_mask;
EMbmAvkonQgn_indi_checkbox_off;
EMbmAvkonQgn_indi_checkbox_off_mask;
to my ListBox.But in checkBoxes Iam getting crosssmarks instead of tickmarks.So,How to get tick marks instead of crossmarks?
Forum posts: 71
ok..
so you require tick marks..
the above code helps you to give cross marks..
Let me see if i can check.i will get back to you if i find the ans
Forum posts: 71
Hi,
Do you wanna check box in place of cross mark ?
i have a sample application which puts a check box on the right hand side of the item
Please let me know if you require that..
i will forward that app..
Forum posts: 65
Ok Sohil,pls forward taht sample It may help me.
Forum posts: 71
hi Shilpa ,
Please send me you email address for me to forward you the example.
Forum posts: 65
Hai Sohil,
Pls send me the lines of code.
Forum posts: 71
yeah sure...
void CMarkableListContainer::CreateListL()
{
// First phase construction
iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
iListBox->SetContainerWindowL(*this);
// Second Phase Construction
TResourceReader reader;
CEikonEnv::Static()->CreateResourceReaderLC(reader, R_MARKABLELIST_LISTBOX);
iListBox->ConstructFromResourceL(reader);
CleanupStack::PopAndDestroy(); // reader
}
void CMarkableListContainer::SetupListIconsL()
{
// Get the name of the file containing the icons
HBufC* iconFileName;
iconFileName = StringLoader::LoadLC(R_ICON_FILE_NAME); // Pushes iconFileName onto the Cleanup Stack.
// Create an array of icons, reading them from the file
CArrayPtr<CGulIcon>* icons = new(ELeave) CAknIconArray(KNumberOfIcons);
CleanupStack::PushL(icons);
icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMarkablelistTick, EMbmMarkablelistTick_mask));
icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMarkablelist1player, EMbmMarkablelist1player_mask));
icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMarkablelist2player, EMbmMarkablelist2player_mask));
CleanupStack::Pop(icons);
CleanupStack::PopAndDestroy(iconFileName);
iListBox->ItemDrawer()->ColumnData()->SetIconArray(icons); // passing ownership of icons
}
Hope this thing helps
if u have any queriers do let me know..
Forum posts: 65
Hai Sohil,
From which file r u adding those icons.Is the icons from avkon.mbm?When I add those icons, Iam getting the errors as those icons are undeclared identifiers.
Forum posts: 71
Hi,
Actually the sample applications makes its own bitmap files and then creating the mbm file
they are not standard icons..
Forum posts: 65
Hai Sohil,
Pls forward the sample to
Forum posts: 65
Hai,
I added the Bitmaps of ListBox Sample(aknexlist) from SDk to my application.But Iam facing with the error
FATAL ERROR: ERROR: Duplicate bitmap target "Z\SYSTEM\APPS\MYAPP\MYAPP.MBM"
Pls help me to solve this.
MyApp.mmp is as follows
enum TMbmMyApp
{
EMbmMyAppList_icon,
EMbmMyAppList_icon_mask
};
Forum posts: 71
START BITMAP SecureDB.mbm
HEADER
TARGETPATH \system\apps\SecureDB
SOURCEPATH ..\aif
SOURCE c12,1 list_icon.bmp list_icon_mask.bmp
END
START BITMAP SecureDB.mbm
HEADER
SOURCEPATH ..\src
SOURCE c8,8 non_checkm.bmp non_check.bmp checkm.bmp check.bmp
END
hi you creating two mbm files of the same name change the names
START BITMAP SecureDB1.mbm
...
END
START BITMAP SecureDB2.mbm
...
END