OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Deriving new classes

To change or add behavior to a class, you derive a new class from it:

class TNewWindow : public TWindow
{
public:
TNewWindow(...);
// ...
};

When you derive a new class, you can do three things:

  • Add new data members
  • Add new member functions
  • Override inherited member functions

Adding new members lets you add to or change the functionality of the base class. You can define a new constructor for your derived class to call the base classes' constructors and initialize any new data members you might have added.