×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    15

    Background image 7650

    Hi, can someone please help me with my background image problem? I have a controller view architecture and I want to display a background image (bmp) in one of my views. I've checked the example collection but havent managed to extract the important parts to get i right. Is there anyone that has some example code that does this or that can help me in some other way?

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    15

    RE: Background image 7650

    From your project .mmp file:

    START BITMAP intro.mbm
    HEADER
    TARGETPATH ..\..\..\..\wins\c\system\apps\graphics
    SOURCEPATH ..\gfx
    SOURCE c12 Intro.bmp
    END


    From CCoeControl based class .cpp file:

    (global)

    _LIT (KIntroFilename,"c:\\System\\Apps\\Graphics\\Intro.mbm");

    (in ConstructL())

    iIntroImage= NBitmapMethods::CreateBitmapL(KIntroFilename,0);

    (in Draw())

    // Get the standard graphics context
    CWindowGc& gc = SystemGc();

    // Blit the background image onto the screen at the top left position
    gc.BitBlt(aRect.iTl,iIntroImage);


    From CCoeControl based class .h file:

    private:
    CFbsBitmap* iIntroImage;

    ----

    That should do it! I understood how to do this from the graphics series 60 example.

Posting Permissions

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