Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Regular Contributor tlr's Avatar
    Join Date
    Jan 2009
    Posts
    116
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    CFbsBitmap::Load

  3. #3
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    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 kiran10182's Avatar
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,236
    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 tlr's Avatar
    Join Date
    Jan 2009
    Posts
    116
    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 tlr's Avatar
    Join Date
    Jan 2009
    Posts
    116
    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
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    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
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    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
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    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 tlr's Avatar
    Join Date
    Jan 2009
    Posts
    116
    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 tlr's Avatar
    Join Date
    Jan 2009
    Posts
    116
    friends its not working
    somebody help me plzzz........

  12. #12
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    icons.mbm is there at specified location ??? Try to put them in private/application folder.

  13. #13
    Regular Contributor tlr's Avatar
    Join Date
    Jan 2009
    Posts
    116
    hey,
    the path \private\application does not exist

  14. #14
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,667
    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
    Nokia Developer Champion savaj's Avatar
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034
    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\

Page 1 of 2 12 LastLast

Similar Threads

  1. Grid app is crashing... need urgent help...
    By shankha in forum Symbian C++
    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 C++
    Replies: 7
    Last Post: 2007-08-03, 02:12
  3. Mif file doesn't load icons
    By iulian_moldovan in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved