×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    2

    Help....load a bmp file in the Helloworldbasic

    I add the code like this in the example project--Helloworldbasic:

    _LIT (KMultiBitmapFilename,"c:\\System\\Apps\\Graphics\\IMAGES.MBM");

    // CHelloWorldBasicAppView::ConstructL(const TRect& aRect)iImage2 = new(ELeave) CFbsBitmap();
    CleanupStack::PushL(iImage2);
    User::LeaveIfError(iImage2->Load(KMultiBitmapFilename,0));
    CleanupStack::Pop(EMbmImagesImage1);

    //CHelloWorldBasicAppView:raw(const TRect& aRect)
    CWindowGc& gc = SystemGc();
    gc.SetPenStyle(CGraphicsContext::ENullPen);
    gc.SetBrushColor(KRgbGray);
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    gc.DrawRect(aRect);
    gc.BitBlt(Rect().iTl ,iImage2);
    and I have modify the mmp and add the header file, it is successful when compiling, and abortion when execute it,.
    Using the debugger ,and it send the error " e32user-cbase, error code 90'"

    I have read the most reference article on this issue,and it does not help. so I put it in the discuss board,and hope somaone help me! it has confused me for days.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,175

    Re: Help....load a bmp file in the Helloworldbasic

    Originally posted by Amaryllisonline

    CleanupStack::PushL(iImage2);
    User::LeaveIfError(iImage2->Load(KMultiBitmapFilename,0));
    CleanupStack::Pop(EMbmImagesImage1);
    [/B]
    you should pop same thing as you push, just remove the EMbmImagesImage1 from the pop, and it should work. Also you infact should not push the bitmap at all, since it appears to be class member and will be takes care in your classes destructor.

    yucca

Posting Permissions

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