Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User itsbharatk's Avatar
    Join Date
    Apr 2008
    Posts
    27
    Hi,
    I want to update the icon on my Wait dialog at run time... i.e I will be storing my icon file at a particular place in my phone and update it regularly. I want this icon to be displayed on my Wait dialog. I am using CAknWaitDialog. Does it have any member functions that i can use for using icons? or is there some other class available in Symbian S60 to make this work? Please help...

    Thanks in advance...

  2. #2
    Nokia Developer Champion stenlik's Avatar
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,

    CAknWaitDialog is derived from CEikDialog, so you can try to call SetIconL (or SetImageL()?) method. I'm not sure, which is the proper method and if it will help.

    BR
    STeN

  3. #3
    Registered User itsbharatk's Avatar
    Join Date
    Apr 2008
    Posts
    27
    Thanks stenlik,

    I tried as you have said but the note is not displaying the image. I am putting the code here, so if you find any fault in it then let me know...

    _LIT(KDrawBitmapPath,"c:\\myimage.bmp");
    CFbsBitmap* iBitmap;
    iBitmap = new (ELeave) CFbsBitmap();
    iBitmap->Load(KDrawBitmapPath);

    CEikImage * aImage;
    aImage= new (ELeave) CEikImage();
    aImage->SetBitmap(iBitmap);

    CAknWaitDialog* iWaitDialog;
    iWaitDialog = new ( ELeave ) CAknWaitDialog(
    ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ) ), ETrue );
    iWaitDialog->PrepareLC( R_WAIT_NOTE_SOFTKEY_CANCEL );
    iWaitDialog->SetTextL( _L( "My text" ) );
    iWaitDialog->SetImageL(aImage);
    iWaitDialog->RunLD();

  4. #4
    Super Contributor deepchand86's Avatar
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889
    Code:
    _LIT(KDrawBitmapPath,"c:\\myimage.bmp");
    CFbsBitmap* iBitmap;
    iBitmap = new (ELeave) CFbsBitmap();
    iBitmap->Load(KDrawBitmapPath);
    You cannot do this ...

    .bmp is not the Symbian bitmap format...
    For using CFbsBitmap you nedd the .mbm file which is the Symbian bitmap format..(.bmp is window's native format)...

    Either you have to use .mbm for loading the images or use CImageDecoder for converting .bmp to CfbsBitmap...

    Check the wiki for both....

  5. #5
    Registered User itsbharatk's Avatar
    Join Date
    Apr 2008
    Posts
    27
    Hi,
    I have done the below code, and now i am getting a blank image. Am i still wrong somewhere? Please help..

    _LIT(KDrawBitmapPath,"c:\\myimage.bmp");
    CFbsBitmap* iBitmap;
    iBitmap = new (ELeave) CFbsBitmap();

    CImageDecoder* iImageDecoder;
    RFs iFs;
    iImageDecoder = CImageDecoder::FileNewL( iFs, KDrawBitmapPath );
    iBitmap->Create( iImageDecoder->FrameInfo().iOverallSizeInPixels,
    iImageDecoder->FrameInfo().iFrameDisplayMode );

    CEikImage * aImage;
    aImage= new (ELeave) CEikImage();
    aImage->SetBitmap(iBitmap);

    CAknWaitDialog* iWaitDialog;
    iWaitDialog = new ( ELeave ) CAknWaitDialog(
    ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ) ), ETrue );
    iWaitDialog->PrepareLC( R_WAIT_NOTE_SOFTKEY_CANCEL );
    iWaitDialog->SetTextL( _L( "My text" ) );
    iWaitDialog->SetImageL(aImage);
    iWaitDialog->RunLD();

  6. #6
    Registered User itsbharatk's Avatar
    Join Date
    Apr 2008
    Posts
    27
    Please help me out. I am still not able to get where i am wrong....

  7. #7
    Super Contributor deepchand86's Avatar
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889
    You are not at all converting the image to CFbsBitmap..

    where is CImageDecoder::Convert()???

    Follow this reference code

    http://wiki.forum.nokia.com/index.ph...Symbian_bitmap

Similar Threads

  1. Wait Dialog..
    By onlyabhi in forum Symbian C++
    Replies: 5
    Last Post: 2010-01-04, 06:22
  2. wait dialog automatically dismissed when a browser control be used
    By caepek in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2007-07-04, 04:52
  3. how to show wait dialog asynch...???
    By ibraheemJazba in forum Symbian C++
    Replies: 12
    Last Post: 2007-03-27, 17:08
  4. [announce] wait dialog wrapper
    By lfd in forum Python
    Replies: 14
    Last Post: 2007-02-16, 09:09
  5. How to - Dynamically update icons in List or Dialog
    By relliott98 in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-06-13, 14:08

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