Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jul 2004

    Question Bitmap icons in List

    Hi all

    I am trying to set up a listbox with little bitmap icons, planning on using CAknSingleGraphicStyleListbox.

    However, I do have already problems on compiling the code to load the icons into the application:

    // 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);
    icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMyAppTick, EMbmMyAppTick_mask));
    icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMyApp1player, EMbmMyApp1player_mask));
    icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMyApp2player, EMbmMyApp2player_mask));

    iSavedGamesListBox->ItemDrawer()->ColumnData()->SetIconArray(icons); // passing ownership of icons

    The compiler tell that EMbmMyAppTick, EMbmMyAppTick_mask,
    EMbmMyApp1player, EMbmMyApp1player_mask,
    EMbmMyApp2player, EMbmMyApp2player_mask
    : error C2065: 'EMbmCheatCallTick' : undeclared identifier

    I check my mbg file
    I did not find error
    My mbg file below:
    // MyApp.mbg
    // Generated by BitmapCompiler
    // Copyright (c) 1998-2001 Symbian Ltd. All rights reserved.

    enum TMbmMyApp

    Who can tell me what is error.

    Can anyone please help me?

    Thank you very much!

  2. #2
    Regular Contributor
    Join Date
    Jul 2004

    Re: Bitmap icons in List

    In my mmp file, my code below:
    // Creates Mbm file.
    START BITMAP MyApp.mbm
    TARGETPATH \system\apps\MyApp
    SOURCEPATH ..\bitmaps
    SOURCE C12 tick.bmp
    SOURCE C12 tick_mask.bmp
    SOURCE C12 1Player.bmp
    SOURCE C12 2Player.bmp
    SOURCE C12 1Player_mask.bmp
    SOURCE C12 2Player_mask.bmp

  3. #3
    Regular Contributor
    Join Date
    Jul 2004

    Re: Bitmap icons in List

    if I change my code to them below:
    The compiler is say no error.
    icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, 0, 1));
    icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, 2, 4));
    icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, 3, 5));

    I feel maybe the .mbg file is not included.
    So I check this cpp file.
    in the cpp file header, the .mbgfile have been included.
    // System includes
    #include <akniconarray.h> // CAknIcon
    #include <aknlists.h> // CAknSingleStyleGraphicListBox
    #include <barsread.h> // TResource Reader
    #include <e32def.h> // STATIC_CAST
    #include <eikclbd.h> // CColumnListBoxData
    #include <eiklbv.h> // CSelectionIndexArray
    #include <MyApp.mbg> // icons
    #include <MyApp.rsg> // R_MARKABLELIST_SAVED_LISTBOX
    #include <stringloader.h> // StringLoader
    #include <uikon.hrh> // TKeyCode #defines

  4. #4
    Regular Contributor
    Join Date
    Jul 2004

    Re: Bitmap icons in List

    I don't know the reason.
    Who can help me.
    Thank you very much.

Similar Threads

  1. 6680 and bluetooth service profiles
    By ceruault in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-08, 22:24
  2. How to - Dynamically update icons in List or Dialog
    By relliott98 in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-06-13, 14:08
  3. Bitmap icons in Lists
    By maniac_2k in forum Symbian User Interface
    Replies: 2
    Last Post: 2004-06-18, 07:42
  4. List Icons
    By sgreid101 in forum Mobile Java General
    Replies: 1
    Last Post: 2003-09-01, 14:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts