Overloading DoPropExchange() |
Post Reply |
Author | |
EricFowler
Groupie Joined: 01 December 2009 Status: Offline Points: 14 |
Post Options
Thanks(0)
Posted: 23 December 2009 at 3:25pm |
I wish to store to disk certain properties associated with each group text item in a task panel (it is a text string comprising a database key used to look up associated information, but that should not matter).
Since serialization is handled through DoPropExchange() I assume I must overload some part of that mechanism. If I declare a class derived from CXTPTaskPanelGroupItem, then overload DoPropExchange() in that class, I am faced with the problem that insertion of my items into my group is done through CXTPTaskPanelGroup::AddTextItem(), which returns an object of type CXTPTaskPanelGroupItem *, which does not support my overload. My first attempt was to derive a class from CXTPTaskPanelGroup, and have it create and insert my item. But the problem remains: the stored item is not of my class, but the base class, and the serialization/deserialization code I insert into the derived class will not be called. What am I doing wrong? Remember, the objective is to store a small invisible bit of text along with a task panel group item, and to read/write it out of/into the same archive as is routinely done with DoPropExchange(). This must be easy. Thanks Eric |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Use pGroup->GetItems()->Add(new CYourgroupItem()); instead of AddTextItem.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |