×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    116

    how to load from .mbm file when it has multiple .bmp icons

    hi,
    i was able to create .mbm file using bmconv.exe tool from cmd prompt
    but i'm not getting how to load individual icon from that file

    thanks in advance.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: how to load from .mbm file when it has multiple .bmp icons

    CFbsBitmap::Load

  3. #3
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: how to load from .mbm file when it has multiple .bmp icons

    If you have multiple images in .mbm file than you need to remember index of image to access it.

    For example if create .mbm file with images

    bmconv My.mbm /c24list_icon.bmp list_icon_mask.bmp /c24list_icon1.bmp list_icon1_mask.bmp

    Then you can access first image as
    CFbsBitmap* pBitmap = new (ELeave) CFbsBitmap();
    pBitmap->Load(My.mbm,0); //for first image
    second one as
    CFbsBitmap* pBitmap1 = new (ELeave) CFbsBitmap();
    pBitmap1->Load(My.mbm,1); //for second image

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: how to load from .mbm file when it has multiple .bmp icons

    Quote Originally Posted by tlr View Post
    hi,
    i was able to create .mbm file using bmconv.exe tool from cmd prompt
    but i'm not getting how to load individual icon from that file

    thanks in advance.
    Search CFbsBitmap in the Wiki: For e.g: Setting the image and mask bitmaps


    Quote Originally Posted by savaj View Post
    If you have multiple images in .mbm file than you need to remember index of image to access it.
    Use /h switch as /hMy.mbg and it will generate corresponding header (.mbg) file with enumerations. Include it in your application and you don't need to remember indexes. :)
    Nokia Developer Wiki Moderation team

  5. #5
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    116

    Re: how to load from .mbm file when it has multiple .bmp icons

    Quote Originally Posted by savaj View Post
    bmconv My.mbm /c24list_icon.bmp list_icon_mask.bmp /c24list_icon1.bmp list_icon1_mask.bmp
    is it not possible if i don't have mask?

  6. #6
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    116

    Re: how to load from .mbm file when it has multiple .bmp icons

    hey savaj, thank u
    i want the image to act as a button.
    for this do i have to set the image on any button, like CEikCommandButton
    or is there any function that makes the image act as a button?
    Last edited by tlr; 2009-04-10 at 12:36.

  7. #7
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: how to load from .mbm file when it has multiple .bmp icons

    Quote Originally Posted by kiran10182 View Post
    Use /h switch as /hMy.mbg and it will generate corresponding header (.mbg) file with enumerations. Include it in your application and you don't need to remember indexes. :)
    Thanks kiran for giving valuable info. :)

  8. #8
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: how to load from .mbm file when it has multiple .bmp icons

    Quote Originally Posted by tlr View Post
    is it not possible if i don't have mask?
    Yes, You can create .mbm file without mask, but without the mask image would be transparent and let the background screen colour show through.

  9. #9
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: how to load from .mbm file when it has multiple .bmp icons

    Quote Originally Posted by tlr View Post
    hey savaj, thank u
    i want the image to act as a button.
    for this do i have to set the image on any button, like CEikCommandButton
    or is there any function that makes the image act as a button?
    Which class you are using for button??? AFAIK you can not draw image on button created by CEikTextButton, because CEikTextButton has no image associated with it, it displays a label only. you can change color of it.

    If you want to draw image on button control than u can refer this article.
    http://wiki.forum.nokia.com/index.php/Custom_button

  10. #10
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    116

    Re: how to load from .mbm file when it has multiple .bmp icons

    hey, i dont want that type of button
    the image itself should act as a button
    i don't know how does BitmapButton look like, but still i'm trying it in this way
    Code:
     LIT(KFileName, "z:\\resource\\apps\\icons.mbm");
    	iBitmapButton = new (ELeave) CEikBitmapButton;
    	iBitmapButton->SetContainerWindowL(*this);
    	iBitmapButton->SetPictureFromFileL(KFileName, EMbmIconsDollar, -1,    CEikCommandButtonBase::EFirst);
    EMbmIconsDollar was generated in .mbg file, and -1 is the default mask

    my control stopped at the last line while debugging and it didn't display any image on emulator
    where i'm wrong ?

  11. #11
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    116

    Re: how to load from .mbm file when it has multiple .bmp icons

    friends its not working
    somebody help me plzzz........

  12. #12
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: how to load from .mbm file when it has multiple .bmp icons

    icons.mbm is there at specified location ??? Try to put them in private/application folder.

  13. #13
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    116

    Re: how to load from .mbm file when it has multiple .bmp icons

    hey,
    the path \private\application does not exist

  14. #14
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: how to load from .mbm file when it has multiple .bmp icons

    there can not be a private/application path, and usually you can not see what folders there are in the private folder.

    Instead just use private/{your-app-uid}, where you replace the {your-app-uid} with your UID without the 0x prefix.

  15. #15
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: how to load from .mbm file when it has multiple .bmp icons

    Quote Originally Posted by tlr View Post
    hey,
    the path \private\application does not exist
    "private/application folder" means private folder of your application.
    Like.
    private\AppUID\

Similar Threads

  1. Grid app is crashing... need urgent help...
    By shankha in forum Symbian
    Replies: 5
    Last Post: 2010-10-19, 12:07
  2. S60 3rd trying to load a bitmap from a mbm file
    By codepatch in forum Symbian
    Replies: 7
    Last Post: 2007-08-03, 02:12
  3. Mif file doesn't load icons
    By iulian_moldovan in forum Symbian
    Replies: 3
    Last Post: 2006-03-29, 06:52
  4. Replies: 1
    Last Post: 2005-05-26, 14:22
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

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