×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Mar 2010
    Posts
    148

    Smile [Moved] loading image

    Please checkmy codes and suggest me the proper way to load image.
    I had taken these codes from this forum only but getting error
    undefined identifier "EMbmGrbmap2Smiley"

    I had pasted these codes in "AppView.cpp".


    _LIT(KMBMFileName,"z:\\resource\\apps\\black2.mbm");
    // load the bitmap from an .mbm file
    CFbsBitmap* MainBitmap = new (ELeave) CFbsBitmap();
    MainBitmap = new (ELeave) CFbsBitmap();
    CleanupStack::PushL(MainBitmap);
    User::LeaveIfError(MainBitmap->Load(KMBMFileName, EMbmGrbmap2Smiley));
    // EMbmGrbmap2Smiley is the ID of a bitmap in the .mbm file...
    // clean up
    CleanupStack::PopAndDestroy();

  2. #2
    Registered User
    Join Date
    Dec 2008
    Posts
    113

    Re: loading image

    I think you are forget to include *.mbg file
    ex:
    #include <black2.mbg>
    Regards
    MKS

  3. #3
    Nokia Developer Champion
    Join Date
    May 2004
    Posts
    2,267

    Re: [Moved] loading image

    Hi,

    Agree with talk2mks, and also note a memory leak issue:

    Code:
    CFbsBitmap* MainBitmap = new (ELeave) CFbsBitmap();
    // MainBitmap = new (ELeave) CFbsBitmap(); // the MainBitmap has pointed to a valid CFbsBitmap object so no need to create a new one.
    ...
    Regards

    Ziteng Chen

Similar Threads

  1. MBM image is not found
    By tamhanna in forum Symbian
    Replies: 14
    Last Post: 2009-04-20, 12:44
  2. Loading part of an Image
    By Andy2013 in forum Mobile Java General
    Replies: 9
    Last Post: 2009-03-10, 19:49
  3. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 06:34
  4. Media Server ... Image Loading !!???
    By hoopsman in forum Symbian
    Replies: 0
    Last Post: 2003-12-12, 12:20
  5. Media Server ... Image Loading!!?
    By hoopsman in forum Symbian
    Replies: 0
    Last Post: 2003-12-11, 10:21

Posting Permissions

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