Pls help me to solve this............

Login to reply to this topic.
Sat, 2007-10-20 10:48
Joined: 2007-10-16
Forum posts: 65

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?


Sat, 2007-10-20 22:12
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2009
Re: Pls help me to solve this............

yes, it is possible. Check your MMP and PKG files content.


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Wed, 2007-10-24 05:59
Joined: 2007-10-16
Forum posts: 65
Re: Pls help me to solve this............

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

Wed, 2007-10-24 06:29
Joined: 2007-09-19
Forum posts: 71
Re: Pls help me to solve this............

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


Wed, 2007-10-24 06:34
Joined: 2007-10-16
Forum posts: 65
Re: Pls help me to solve this............

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?

Wed, 2007-10-24 06:46
Joined: 2007-09-19
Forum posts: 71
Re: Pls help me to solve this............

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

Wed, 2007-10-24 06:52
Joined: 2007-09-19
Forum posts: 71
Re: Pls help me to solve this............

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..

Wed, 2007-10-24 06:57
Joined: 2007-10-16
Forum posts: 65
Re: Pls help me to solve this............

Ok Sohil,pls forward taht sample It may help me.

Wed, 2007-10-24 07:15
Joined: 2007-09-19
Forum posts: 71
Re: Pls help me to solve this............

hi Shilpa ,
Please send me you email address for me to forward you the example.

Wed, 2007-10-24 08:01
Joined: 2007-10-16
Forum posts: 65
Re: Pls help me to solve this............

Hai Sohil,
Pls send me the lines of code.

Wed, 2007-10-24 08:27
Joined: 2007-09-19
Forum posts: 71
Re: Pls help me to solve this............

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..

Wed, 2007-10-24 09:59
Joined: 2007-10-16
Forum posts: 65
Re: Pls help me to solve this............

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.

Wed, 2007-10-24 10:28
Joined: 2007-09-19
Forum posts: 71
Re: Pls help me to solve this............

Hi,
Actually the sample applications makes its own bitmap files and then creating the mbm file
they are not standard icons..

Wed, 2007-10-24 11:10
Joined: 2007-10-16
Forum posts: 65
Re: Pls help me to solve this............

Hai Sohil,
Pls forward the sample to

Wed, 2007-10-24 12:44
Joined: 2007-10-16
Forum posts: 65
Re: Pls help me to solve this............

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

TARGET SecureDB.app
TARGETTYPE app
TARGETPATH \system\apps\SecureDB
UID 0x100039CE 0x05161B64
VENDORID 0

SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE \epoc32\include\libc

USERINCLUDE ..\inc ..\data

SOURCEPATH ..\data
RESOURCE SecureDB.rss
RESOURCE SecureDB_caption.rss

LIBRARY euser.lib apparc.lib cone.lib eikcore.lib
LIBRARY eikcoctl.lib avkon.lib commonengine.lib eikdlg.lib
LIBRARY eikctl.lib bafl.lib fbscli.lib efsrv.lib estor.lib aknnotify.lib
LIBRARY etext.lib gdi.lib egul.lib insock.lib aknicon.lib eikcoctl.lib
LIBRARY pbkeng.lib
LIBRARY pbkview.lib
LIBRARY cntmodel.lib
LIBRARY estlib.lib aknskins.lib aknskinsrv.lib


AIF SecureDB.aif ..\aif SecureDBaif.rss c4,1 context_pane_icon.bmp context_pane_icon_mask.bmp list_icon.bmp list_icon_mask.bmp

LANG 01

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
SOURCEPATH .
SOURCE SECUREDB_UID_.cpp

and MyApp.mbg is as follows

enum TMbmMyApp
{
EMbmMyAppList_icon,
EMbmMyAppList_icon_mask
};

Wed, 2007-10-24 13:03
Joined: 2007-09-19
Forum posts: 71
Re: Pls help me to solve this............

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

  • Login to reply to this topic.