Hi All,


I want to display 6 diffrnt icons(Griditem1.bmp,Griditem2.bmp,Griditem3.bmp ..... with there Mask Griditemm1.bmp, Griditemm2.bmp ......) in my grids .... here I have included my .rss , .mmp, .resources and AppView files can any one help me ??? WHT ELSE I NEED TO ADD TO VIEW IT ....

***********
In .RSS
***********

RESOURCE GRID r_selectiongrid
{ array_id = r_selectiongrid_items;
flags = EAknListBoxSelectionGrid;
style = r_selectiongrid_style;
}
RESOURCE GRID_STYLE r_selectiongrid_style
{ layoutflags = EAknGridHorizontalOrientation | EAknGridLeftToRight | EAknGridTopToBottom;
primaryscroll = EAknGridFollowsItemsAndLoops;
secondaryscroll = EAknGridFollowsItemsAndLoops;
itemsinprimaryorient = 3;
itemsinsecondaryorient = 3;
gapwidth = 5;
gapheight = 5;
width = 55;
height = 70;
}

RESOURCE ARRAY r_selectiongrid_items
{
items =
{ LBUF { txt = "0\tItem 0"; },
LBUF { txt = "1\tItem 1"; },
LBUF { txt = "2\tItem 2"; },
LBUF { txt = "3\tItem 3"; },
LBUF { txt = "0\tItem 4"; } ,
LBUF { txt = "1\tItem 5"; }

};
}



~~~~~~~
In .MMP
~~~~~~~
LIBRARY egul.lib


START BITMAP Geni_Grid.mbm
HEADER
TARGETPATH \system\apps\Geni_Grid
SOURCEPATH ..\gfx

SOURCE c12 GridItem1.bmp
SOURCE c12 GridItemM1.bmp
SOURCE c12 GridItem2.bmp
SOURCE c12 GridItemM2.bmp
SOURCE c12 GridItem3.bmp
SOURCE c12 GridItemM3.bmp
SOURCE c12 GridItem4.bmp
SOURCE c12 GridItemM4.bmp
SOURCE c12 GridItem5.bmp
SOURCE c12 GridItemM5.bmp
SOURCE c12 GridItem6.bmp
SOURCE c12 GridItemM6.bmp
END




----------------
In .resources file
----------------
<mbm targetfile = "Geni_Grid.MBM" targetpath = "Z\SYSTEM\APPS\Geni_Grid" header = "true">
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditem1.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditemm1.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditem2.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditemm2.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditem3.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditemm3.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditem4.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditemm4.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditem5.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditemm5.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditem6.bmp"/>
<bmp bpp = "c12" sourcepath = "..\GFX" sourcefile = "griditemm6.bmp"/>
</mbm>


----------------
In AppView.cpp file
----------------
#include <Geni_Grid.mbg>
#include <AknIconArray.h>


_LIT(KMbmPath, "Z:\\system\\apps\\multiviews\\Geni_Grid.mbm");

void CGeni_GridAppView::ConstructL(const TRect& aRect)
{

CreateWindowL();

iGrid = new( ELeave ) CAknGrid;
iGrid->SetContainerWindowL( *this );
TResourceReader reader;
CEikonEnv::Static()->CreateResourceReaderLC(reader, R_SELECTIONGRID);
iGrid->ConstructFromResourceL(reader);




CArrayPtr <CGulIcon>* icons = new(ELeave) CAknIconArray(1);
CleanupStack::PushL( icons );
//--------------------------------------------------------------------------------->
CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL( KMbmPath,EMbmGeni_gridGriditem);
CleanupStack::PushL( bitmap );

CFbsBitmap* mask = iEikonEnv->CreateBitmapL( KMbmPath,EMbmGeni_gridGriditemm);
CleanupStack::PushL( mask );

#########################
$$ HOW I'LL ADD THE REST IMAGE???? I MEAN ..............
grid "Item 0" should have Griditem1.bmp
grid "Item 1" should have Griditem2.bmp
grid "Item 2" should have Griditem3.bmp
.....
....
grid "Item 5" should have Griditem6.bmp
#########################
//---------------------------------------------------------------------------------->
icons->AppendL( CGulIcon::NewL( bitmap, mask ) );
iGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );


CleanupStack::Pop();
CleanupStack::Pop();
CleanupStack::Pop(2);

iGrid->SetFocus(ETrue);
iGrid->DrawNow();

SetRect(aRect);

ActivateL();
CleanupStack::PopAndDestroy();
}


I have confused in AppView.cpp part can any one xplain me this part .... ....