×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2003
    Location
    Munich, Germany
    Posts
    30

    Bitmap icons in Lists

    Hi!

    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:

    HBufC* iconFileName;
    iconFileName = StringLoader::LoadLC(R_ICON_FILE_NAME);
    CArrayPtr<CGulIcon>* icons = new(ELeave) CAknIconArray(KNumberOfIcons);
    CleanupStack::PushL(icons);

    icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMessengeroffline, EMbmMessengeroffline_mask));
    icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMessengeronline, EMbmMessengeronline_mask));
    icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMessengersamecell, EMbmMessengersamecell_mask));

    Actually, the compilation aborts when the AppendL method is called, saying that the Enumeration tag is unknown. I suspect, that the mbm (or mbg?) file does not contain the enumerations of my three icons, OR I am using the wrong enumerations (in that case, I do not know where to find the correct ones).

    I have some example code about how to insert bitmap into the list, but I found no semantic differences comparing that source code to mine (mmp, rss, etc).

    Can anyone please help me? Probably I am just using the wrong enumerations. Where can I find the enumerations that describe the source bitmaps?

    Thank you in advance,

    Maniac

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    the enumerations should be on the mbg file, just click it open with notepad/wordpad and see what it contains.

    yucca

  3. #3
    Registered User
    Join Date
    Dec 2003
    Location
    Munich, Germany
    Posts
    30

    It works :-)

    Hi yucca,

    Thank you for the hint, I got it to work now.

    CU

    Maniac

Posting Permissions

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