×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    27

    Red face How do i update the icon on my Wait dialog at run time?

    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
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: How do i update the icon on my Wait dialog at run time?

    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
    Join Date
    Apr 2008
    Posts
    27

    Red face Re: How do i update the icon on my Wait dialog at run time?

    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
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: How do i update the icon on my Wait dialog at run time?

    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
    Join Date
    Apr 2008
    Posts
    27

    Red face Re: How do i update the icon on my Wait dialog at run time?

    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
    Join Date
    Apr 2008
    Posts
    27

    Re: How do i update the icon on my Wait dialog at run time?

    Please help me out. I am still not able to get where i am wrong....

  7. #7
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: How do i update the icon on my Wait dialog at run time?

    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
    Replies: 5
    Last Post: 2010-01-04, 06:22
  2. how to show wait dialog asynch...???
    By ibraheemJazba in forum Symbian
    Replies: 12
    Last Post: 2007-03-27, 17:08
  3. [announce] wait dialog wrapper
    By lfd in forum Symbian
    Replies: 14
    Last Post: 2007-02-16, 09:09
  4. 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
  •  
×