Moin,
I need an advice in the following case ...
I want to create a control from scratch, a Tab Control.
In the moment I've created a simple struct for the TabItems and a class for the TabWindow.
Does it make sense, or do I get advantages, if I let TabWindow derive from TabItem ?Code:struct TabItem { LPCTSTR itemText; unsigned itemID; RECT itemRect; }; class TabWindow { /* Con- / Destructors ... */ private: TabItem* tabItems; // pointer to an array of TabItems /* ... */ };
Or is it unnessecery, because there are no advantages ...
Thanks for reply.Code:class TabItem { LPCTSTR itemText; unsigned itemID; RECT itemRect; }; class TabWindow : private TabItem { /* Con- / Destructors ... */ private: TabItem* tabItems; // pointer to an array of TabItems /* ... */ };
Greetz
Greenhorn



LinkBack URL
About LinkBacks






CornedBee