OWLNext 7.0
Borland's Object Windows Library for the modern age
|
A server makes the same changes to its OLE classes that a container makes.
ObjectWindows wraps a great deal of power in its new window, document, and view classes. To give an ObjectWindows program OLE capabilities, change its derived classes to inherit from OLE classes. Here are some examples:
When you change to OLE classes, be sure that those methods in your classes which refer to their direct base classes now use the OLE class names.
It is generally safer to allow the OLE classes to handle Windows events and Doc/View notifications. This is particularly true for the Paint method and mouse message handlers in classes derived from TOleView. TOleView::Paint knows how to paint the objects embedded in your document. (Servers are often containers as well, and a server's object might have other objects embedded in it.) Similarly, the mouse handlers of TOleView let the user select, move, resize, and activate an OLE object embedded or linked in your document.