IOleDocumentView::CloneIOleDocumentView::Clone*
*Contents  *Index  *Topic Contents
*Previous Topic: IOleDocumentView::ApplyViewState
*Next Topic: IOleDocumentView::CloseView

IOleDocumentView::Clone

HRESULT Clone(
    IOleInPlaceSite *pIPSiteNew 
    IOleDocumentView **ppViewNew
    );		

Creates a duplicate view object with an internal state identical to that of the current view.

pIPSiteNew
[in] Address of the view site in which the new view object will be activated. On receiving this pointer, the view being cloned should pass it to the new view's IOleDocumentView::SetInPlaceSite method. This can be NULL, in which case the caller is responsible for calling IOleDocumentView::SetInPlaceSite on the new view directly.
ppViewNew
[out] Address of the IOleDocumentView interface pointer to the new view object. The caller is responsible for releasing this pointer when it is no longer needed.

This method is useful for creating a new view with a different view port and view site but with the same view context as the view being cloned. Typically, containers hosting a multiple document interface (MDI) application will call this method to provide "Window/New window" capability.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.