Maks, Great. I did not expect that class to have this functionality and assumed I had to add it. I'll look a bit more closely at the documentation next time.
Nick. "Maks Pyatkovskiy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Yes, CDefaultTreeItem doesn't have default constructor: > --------------- > > explicit CMyDefaultTreeItem(const Char* pszItemText, UInt16 wStyle = 0) > : CDefaultTreeItem(pszItemText, wStyle) { } > > CMyDefaultTreeItem(const Char* pszItemText, Int16 nNormalImageIndex, > Int16 nCurrentImageIndex, UInt16 wStyle = 0) : > CDefaultTreeItem(pszItemText, nNormalImageIndex, nCurrentImageIndex, > wStyle) { } > > --------------- > But, probably, all this code is not required, because you can associate > user-defined data with every tree item without explicit derivation. Use > CTreeItem::GetItemData(), CTreeItem::SetItemData() functions. > > ______________________________________________ > > Best regards, > Maks Pyatkovskiy > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > [mailto:bounce-palm-dev- > > [EMAIL PROTECTED] On Behalf Of Nick > > Sent: Monday, June 02, 2003 7:32 AM > > To: Palm Developer Forum > > Subject: POL/C++ question. > > > > I need to add a single variable to a CTreeItem instance so I can > access > > the > > variable when the event handler catches a user's leaf node selection. > > > > I've tried deriving CMyDefaultTreeItem from CDefaultTreeItem but the > > compiler complains with "cannot construct CMyDefaultTreeItem's base > class > > POL::CDefaultTreeItem." What does this mean? Is this because > > CDefaultTreeItem does not have a default constructor? I would expect > that > > it's base class constructor would be used. > > > > I guess I could copy the CDefaultTreeItem files from the POL sources, > > rename > > the classes, add the variables I want and go from there but that seems > not > > the correct path. > > > > Any suggestions? > > > > > > Nick. > > > > > > > > -- > > For information on using the Palm Developer Forums, or to unsubscribe, > > please see http://www.palmos.com/dev/support/forums/ > > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/