OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Step 3: Inheriting from OLE classes

ObjectWindows includes classes that let windows, documents, and views interact with the ObjectComponents classes.

The ObjectWindows OLE classes include default implementations for most normal OLE operations. To adapt an existing ObjectWindows program to OLE, change its derived classes so they inherit from the OLE classes. The following table shows which OLE class replaces each of the non-OLE classes.

Non-OLE classOLE class
owl::TFrameWindowTOleFrame
owl::TMDIFrameTOleMDIFrame
owl::TDecoratedFrameTOleFrame
owl::TDecoratedMDIFrameTOleMDIFrame
owl::TWindowTOleWindow
owl::TDocumentTOleDocument
owl::TViewTOleView
owl::TFileDocumentTOleDocument
owl::TDialogTOleDialog

The TOleFrame and TOleMDIFrame classes both derive from decorated window classes. The OLE 2 user interface requires containers to handle tool bars and status bars. Even if the container has no decorations, servers might need to display their own in the container's window. The OLE window classes handle those negotiations for you.

Wherever your existing OWL program uses a non-OLE class, replace it with an OLE class, as shown here.

Before

// pre-OLE declaration of a window class
{ /* declarations */ );
Derived from TWindow, TFrameWindow controls such window-specific behavior as keyboard navigation and ...
Definition framewin.h:96

After

// new declaration of the same window class
class TMyFrame: public TOleFrame { /* declarations */ );
Note
If the implementation of your class makes direct calls to its base class, be sure to change the base class calls, as well. Response tables also refer to the base class and need to be updated.