One of the services that the server provides to the container is document creation. MFC delegates this responsibility to COleServerDoc::OnGetEmbeddedItem(). Your COleServerDoc derived class must override this factory method to create instances of your server items, as shown in Example 22.
COleServerItem* CMyAppDoc::OnGetEmbeddedItem() { // OnGetEmbeddedItem is called by the framework to get // the ColeServerItem that is associated with the // document. It is only called when necessary. CMyAppSrvrItem* pItem = new CMyAppSrvrItem(this); ASSERT_VALID(pItem); return pItem; } |
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.