Home COM GDI+ WebBrowser Data Access

IOleDocumentView Interface

 

IID_IOleDocumentView

{B722BCC6-4E68-101B-A2BC-00AA00404770}

 

 

The IOleDocumentView interface enables a container to communicate with each view supported by a document object.

A document object that supports multiple views of its data represents each view as a separate object. Each document view object implements IOleDocumentView, along with IOleInPlaceObject, IOleInPlaceActiveObject, and optional interfaces such as IPrint and IOleCommandTarget. A document object that supports only a single view does not require that view to be implemented as a separate object. Instead, both document and view can be implemented as a single class.

 
All document objects must implement IOleDocumentView for each view they support. If a document object supports multiple views, each view must be implemented as a separate class object. If a document object supports only a single view, the document object and its view can both be implemented as a single class.


A container calls the methods of this interface to activate, deactivate, close, and generally communicate with a document view object.
 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IOleDocumentView Methods

Description

SetInPlaceSite

Associates a container view site with this view.

GetInPlaceSite

Retrieves the view site associated with this view.

GetDocument

Obtains the IUnknown pointer of the document object that owns this view.

SetRect

Sets the coordinates of the view port.

GetRect

Retrieves the coordinates last passed in SetRect.

SetRectComplex

Sets the coordinates of the view port, scroll bars, and size box.

Show

In-place activates or deactivates a view.

UIActivate

In-place activates or deactivates a view's user-interface elements.

Open

Displays view in a separate pop-up window.

Close

Instructs view to close.

SaveViewState

Saves view state into stream.

ApplyViewState

Initializes view with view state previously saved in call to SaveViewState.

Clone

Creates a duplicate view object.

 

SetInPlaceSite

 

FUNCTION IOleDocumentView_SetInPlaceSite ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pIPSite AS DWORD _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IOleDocumentView_SetInPlaceSite (pthis, pIPSite) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetInPlaceSite

 

FUNCTION IOleDocumentView_GetInPlaceSite ( _

  BYVAL pthis AS DWORD PTR _

, BYREF ppIPSite AS DWORD _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IOleDocumentView_GetInPlaceSite (pthis, ppIPSite) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetDocument

 

FUNCTION IOleDocumentView_GetDocument ( _

  BYVAL pthis AS DWORD PTR _

, BYREF ppunk AS DWORD _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[5] USING IOleDocumentView_GetDocument (pthis, ppunk) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SetRect

 

FUNCTION IOleDocumentView_SetRect ( _

  BYVAL pthis AS DWORD PTR _

, BYREF prcView AS RECT _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[6] USING IOleDocumentView_SetRect (pthis, prcView) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetRect

 

FUNCTION IOleDocumentView_GetRect ( _

  BYVAL pthis AS DWORD PTR _

, BYREF prcView AS RECT _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[7] USING IOleDocumentView_GetRect (pthis, prcView) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SetRectComplex

 

FUNCTION IOleDocumentView_SetRectComplex ( _

  BYVAL pthis AS DWORD PTR _

, BYREF prcView AS RECT _

, BYREF prcHScroll AS RECT _

, BYREF prcVScroll AS RECT _

, BYREF prcSizeBox AS RECT _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[8] USING IOleDocumentView_SetRectComplex (pthis, prcView, prcHScroll, prcVScroll, prcSizeBox) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Show

 

FUNCTION IOleDocumentView_Show ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL fShow AS LONG _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[9] USING IOleDocumentView_Show (pthis, fShow) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

UIActivate

 

FUNCTION IOleDocumentView_UIActivate ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL fUIActivate AS LONG _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[10] USING IOleDocumentView_UIActivate (pthis, fUIActivate) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Open

 

SUB IOleDocumentView_Open ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL fUIActivate AS LONG _

  )


  CALL DWORD @@pthis[11] USING IOleDocumentView_Open (pthis)

END SUB

 

 

Close

 

FUNCTION IOleDocumentView_Close ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwReserved AS DWORD _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[12] USING IOleDocumentView_Close (pthis, dwReserved) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SaveViewState

 

FUNCTION IOleDocumentView_SaveViewState ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pstm AS DWORD _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[13] USING IOleDocumentView_SaveViewState (pthis, pstm) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

ApplyViewState

 

FUNCTION IOleDocumentView_ApplyViewState ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pstm AS DWORD _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[14] USING IOleDocumentView_ApplyViewState (pthis, pstm) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Clone

 

FUNCTION IOleDocumentView_Clone ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pIPSiteNew AS DWORD _

, BYREF ppViewNew AS DWORD _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[15] USING IOleDocumentView_Clone (pthis, pIPSiteNew, ppViewNew) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Page last updated on Monday, 29 May 2006 15:15:23 +0200