OleMainWindow is a subclass of
CwMainWindow. It extends the functionality of a main window to support menu-bar negotiation when an object is activated in place. You must use an
OleMainWindow instead of
CwMainWindow in any application that embeds or links OLE objects or uses OCXs.
Hence, when an embedded OLE object is activated in place, a merged menu bar is built and managed by the OleMainWindow--first using the menus specified by the container, and then querying the server for its menu groups. In addition, real estate in the container's
OleMainWindow is negotiated for any tool bars and floating palettes that the server provides for editing the object. When the embedded object is deactivated, the original menu bar of the
OleMainWindow is restored along with any window areas used by the server for tool bars and so on.