how can i put the image on my application??

Login to reply to this topic.
Tue, 2005-07-26 13:14
Joined: 2005-07-12
Forum posts: 8
i want to put the image .bmp file on my application for background image.....

so i converted the .bmp image to .mbm ....but it didn't work...

i just want to use the background image.....plz help.....

Thu, 2005-08-18 07:25
Joined: 2005-06-21
Forum posts: 107
Re: how can i put the image on my application??
you can do that with:

void CGameDemoAppView::ConstructL(const TRect& aRect)
    {

    _LIT(iPathName,"c:\\System\\Apps\\GameDemo\\welcome.mbm");

    iBackground=CEikonEnv::Static()->CreateBitmapL(iPathName, EMbmWelcomeImage01);

    // Create a window for this application view
    CreateWindowL();

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }

// Draw this application's view to the screen
void CGameDemoAppView::Draw(const TRect& /*aRect*/) const
    {
      CWindowGc& gc = SystemGc();
      TRect drawRect = Rect();
      gc.DrawBitmap(TPoint(0, 0), iBackground);
      gc.Clear();
    }


  • Login to reply to this topic.