×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Feb 2004
    Posts
    63

    extending CAknDoubleStyleListBox

    Hi :), I have problems derriving CAknDoubleStyleListBox
    in debug mode I get User 42 error when close the view that contains the listbox, in release it works fine (not exactly ... but works)
    Please help :)
    this is a piece of my code
    ////h file
    class CSongsDrawer : public CColumnListBoxItemDrawer
    {
    public:
    ~CSongsDrawer();
    CSongsDrawer(MTextListBoxModel* aTextListBoxModel);
    protected :
    virtual void DrawActualItem(TInt aItemIndex, const TRect& aActualItemRect, TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed,TBool aItemIsSelected) const;
    };

    class CSongsListBox : public CAknDoubleStyleListBox
    {
    public:
    virtual void CreateItemDrawerL();
    };
    //cpp file
    CSongsDrawer::CSongsDrawer(MTextListBoxModel* aTextListBoxModel):
    CColumnListBoxItemDrawer(aTextListBoxModel, LatinPlain12(), CColumnListBoxData::NewL())
    {}

    void CSongsListBox::CreateItemDrawerL()
    {
    // CAknDoubleStyleListBox::CreateItemDrawerL();
    // delete iItemDrawer;
    iItemDrawer = new CSongsDrawer(Model(), this);
    }

  2. #2
    Regular Contributor
    Join Date
    Feb 2004
    Posts
    63

    :)

    Instead of derriving from CAknDoubleStyleListBox, I now use CEikTextListBox, CTextListItemDrawer and CListBoxView (virtual TPoint ItemPos(TInt aItemIndex) const), my listbox looks almost exactly like a doublelistbox and everything works seamless :))

Posting Permissions

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