×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Apr 2005
    Posts
    162

    how to load two transparent gif-files and handle these 2 layers independently?

    Hi Symbies,

    I want to load gif-files, for using bitmaps as layers. I read that the class CPAlbBitmap would be good for this.
    My question: Can CPAlbBitmap load 2 gif-files (for example wave.gif and ship.gif), so that both are visible (like layers)? Besides I need to actualize both layers (the wave has to move and the ship has to rotate). For this I use a AO with a RTimer, that gives me new coordinates in a interval.
    To say it shortly: how to load two transparent gif-files and handle these 2 layers independently?
    Please help me.

    Best regards
    Christian

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

    Re: how to load two transparent gif-files and handle these 2 layers independently?

    yep, just load them separately to separate bitmaps for each image & mask. Should really be no-problem at all there.

    yucca

  3. #3
    Regular Contributor
    Join Date
    Apr 2005
    Posts
    162

    Re: how to load two transparent gif-files and handle these 2 layers independently?

    Hi Symbianyucca,

    i tried it. But constructing CPAlbBitmap fails. I tried it with the NewL()-method. Is there something to attend?
    I get the following failure message:

    AO_MENU.obj : error LNK2001: not resolved external symbol "public: static class CPAlbBitmap * __cdecl CPAlbBitmap::NewL(class TDesC16 const &,enum TDisplayMode const &)" (?NewL@CPAlbBitmap@@SAPAV1@ABVTDesC16@@ABW4TDisplayMode@@@Z)
    \Symbian\6.1\Siemens\SX1\bin\EPOC32\BUILD\SYMBIAN\6.1\SERIES60\SERIES60EX\BELEG_03\GROUP\BELEG_03\WINS\UDEB\BELEG_03.APP : fatal error LNK1120: 1 unresolved external link
    NMAKE : fatal error U1077: 'link.exe' : return-code '0x460'

    My code:

    class CAO_Menu : public CActive
    {
    public:

    static CAO_Menu* NewL();
    static CAO_Menu* NewLC();
    ~CAO_Menu();
    void DoCancel();
    void Activate();
    private:
    CAO_Menu();
    void ConstructL();
    void StartAO();
    void RunL();
    public:
    TRect* iRect;
    RTimer iTimer;
    TRequestStatus status;
    CAppView* iAppView;
    CFbsBitmap* iWave;
    CPAlbBitmap* iAlbWave;
    };

    ______________________________________

    CAO_Menu* CAO_Menu::NewL()
    {
    CAO_Menu* self = CAO_Menu::NewLC();
    CleanupStack::Pop(self);
    return self;
    }
    CAO_Menu* CAO_Menu::NewLC()
    {
    CAO_Menu* self = new (ELeave) CAO_Menu;
    CleanupStack::PushL(self);
    self->ConstructL();
    return self;
    }
    void CAO_Menu::ConstructL()
    {
    if (!iAppView)
    {
    iAppView = CAppView::NewL();
    }
    iWave = new (ELeave) CFbsBitmap();
    _LIT(iFileName, "c:\\Nokia\\Images\\wave_1.gif");
    iAlbWave = CPAlbBitmap::NewL(iFileName, EColor16M);
    iRect = new (ELeave) TRect;
    User::LeaveIfError(iTimer.CreateLocal());
    status = KErrNone;
    CActiveScheduler::Add(this);

    }
    CAO_Menu::CAO_Menu() : CActive(0)
    {
    }
    CAO_Menu::~CAO_Menu()
    {
    delete iRect;
    delete iWave;
    delete iAlbWave;
    Cancel();
    }
    void CAO_Menu::StartAO()
    {
    status = KRequestPending;
    iTimer.After(iStatus, 100000);
    SetActive();


    }
    void CAO_Menu::RunL()
    {
    CAO_Menu::StartAO();
    }
    void CAO_Menu::Activate()
    {
    CAO_Menu::StartAO();
    }
    void CAO_Menu:oCancel()
    {
    iTimer.Cancel();
    }

    Please help me!

    Best regards
    Christian

  4. #4
    Regular Contributor
    Join Date
    Apr 2005
    Posts
    162

    Question Re: how to load two transparent gif-files and handle these 2 layers independently?

    Hi guys,

    Can anybody help me? I still didn't find the solution.
    Please help me.

    Best regards
    Christian

  5. #5
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    64

    Re: how to load two transparent gif-files and handle these 2 layers independently?

    hi

    u need to include library file --> PAlbView.lib

    Code:
    AO_MENU.obj : error LNK2001: not resolved external symbol "public: static class CPAlbBitmap * __cdecl CPAlbBitmap::NewL(class TDesC16 const &,enum TDisplayMode const &)" (?NewL@CPAlbBitmap@@SAPAV1@ABVTDesC16@@ABW4TDisplayMode@@@Z)
    \Symbian\6.1\Siemens\SX1\bin\EPOC32\BUILD\SYMBIAN\6.1\SERIES60\SERIES60EX\BELEG_03\GROUP\BELEG_03\WINS\UDEB\BELEG_03.APP : fatal error LNK1120: 1 unresolved external link
    NMAKE : fatal error U1077: 'link.exe' : return-code '0x460'

Posting Permissions

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