×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2010
    Location
    Bangalore
    Posts
    47

    Question [Moved] Image in Context pane

    Hi

    I get System error -1001 whenever i try to change the picture of the context pane through SetPicture() fn.

    Can anyone pls help me out.. where am i goig wrong?

    This error is the bad image format..

    I am using a .bmp image ( of size 18 * 18 pixels) for displaying.. How do i overcome this problem?

    Is there any specific size of image to be used?
    My code is ( in the view ):

    CeikStatusPaneBase::TPaneCapabilities subpane = StatusPane()->ControlL(TUid::Uid(EEikStatusPaneUidContext));
    if ( subpane.IsPresent() && subpane.IsAppOwned() )
    {
    CAknContextPane* cp = static_cast<CAknContextPane*> ( StatusPane()->ControlL(TUid::Uid(EEikStatusPaneUidContext));

    CfbsBitmap* bitmap = iEikonEnv->CreateBitmapL(KContextPaneBitmap,0);

    cp->SetPicture(bitmap);

    can any one pls tell what is wrong in this code?

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

    Re: Image in Context pane

    CreateBitmapL can not handle .bmp-s, it expects native Symbian bitmap format, .mbm (.mif may also work). The documentation also states this fact, and this is why you have to specify an image id (mbm is multi-bitmap, mif is multi-image-file).
    If you want to load bitmap from .bmp, use CImageDecoder, you can find related examples in the Wiki.
    If you choose to create a .mbm, using cp->SetPictureFromFileL is also an option.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Location
    Bangalore
    Posts
    47

    Lightbulb Re: [Moved] Image in Context pane

    Hi

    Thank you for the reply.. But my mistake was that i had specified the entire path of the image (.mbm) file .. from c:\\... actually we need to give it only from \\resource\\apps\\sample.mbm.

    That was the mistake..

    -varshini

Similar Threads

  1. Displaying SVG icon on the context pane
    By symbiannil in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-02-19, 13:56
  2. S60 3.2 --> Context pane removed! How to get it back?
    By tifou1m in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-09-27, 08:48
  3. Replies: 8
    Last Post: 2008-09-25, 10:01
  4. Replies: 1
    Last Post: 2008-07-25, 14:41

Posting Permissions

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