Home COM GDI+ WebBrowser Data Access

IViewObjectEx Interface

 

IID_IViewObjectEx

{3AF24292-0C96-11CE-A0CF-00AA00600AB8}

 

 

The IViewObjectEx interface is an extension derived from IViewObject2 to provide support for:

  • Enhanced, flicker-free drawing for non-rectangular objects and transparent objects

  • Hit testing for non-rectangular objects

  • Control sizing

Containers call the methods of this interface to draw objects in an efficient, flicker free manner, test whether points or rectangles are within the object, or to resize controls.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IViewObject Methods

Description

Draw

Draws a representation of the object onto a device context.

GetColorSet

Returns the logical palette the object uses for drawing.

Freeze

Freezes the drawn representation of an object so it will not change until a subsequent Unfreeze.

Unfreeze

Unfreezes the drawn representation of an object.

SetAdvise

Sets up a connection between the view object and an advise sink so that the advise sink can receive notifications of changes in the view object.

Draw

Draws a representation of the object onto a device context.

IViewObject2 Method

Description

GetAdvise

Returns the information on the most recent SetAdvise.

IViewObjectEx Methods

Description

GetRect

Returns a rectangle describing a requested drawing aspect.

GetViewStatus

Returns information about the opacity of the object, and what drawing aspects are supported.

QueryHitPoint

Indicates whether a point is within a given aspect of an object.

QueryHitRect

Indicates whether any point in a rectangle is within a given drawing aspect of an object.

GetNaturalExtent

Provides sizing hints from the container for the object to use as the user resizes it.

 

Draw

 

FUNCTION IViewObjectEx_Draw ( _
  BYVAL pthis AS DWORD PTR, _
  BYVAL dwDrawAspect AS DWORD, _
  BYVAL lindex AS LONG, _
  BYVAL pvAspect AS DWORD, _
  BYREF ptd AS DVTARGETDEVICE, _
  BYVAL hdcTargetDev AS DWORD, _
  BYVAL hdcDraw AS DWORD, _
  BYREF lprcBounds AS RECTL, _
  BYREF lprcWBounds AS RECTL, _
  BYVAL pfnContinue AS DWORD, _
  BYVAL dwContinue AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IViewObjectEx_Draw (pthis, dwDrawAspect, lIndex, pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

GetColorSet

 

FUNCTION IViewObjectEx_GetColorSet ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwAspect AS DWORD _

, BYVAL lindex AS LONG _

, BYVAL pvAspect AS DWORD _

, BYREF ptd AS DVTARGETDEVICE _

, BYVAL hdcTargetDev AS DWORD _

, BYREF ppColorSet AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IViewObjectEx_GetColorSet (pthis, dwAspect, lIndex, pvAspect, ptd, hdcTargetDev, ppColorSet) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

Freeze

 

FUNCTION IViewObjectEx_Freeze ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwAspect AS DWORD _

, BYVAL lindex AS LONG _

, BYVAL pvAspect AS DWORD _

, BYREF pdwFreeze AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[5] USING IViewObjectEx_Freeze (pthis, dwAspect, lIndex, pvAspect, pdwFreeze) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

Unfreeze

 

FUNCTION IViewObjectEx_Unfreeze ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwFreeze AS DWORD _

  ) AS LONG
 

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


END FUNCTION

 

 

SetAdvise

 

FUNCTION IViewObjectEx_SetAdvise ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL aspects AS DWORD _

, BYVAL advf AS DWORD _

, BYVAL pAdvSink AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[7] USING IViewObjectEx_SetAdvise (pthis, aspects, advf, pAdvSink) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

GetAdvise

 

FUNCTION IViewObjectEx_GetAdvise ( _

  BYVAL pthis AS DWORD PTR _

, BYREF aspects AS DWORD _

, BYREF advf AS DWORD _

, BYREF ppAdvSink AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[8] USING IViewObjectEx_GetAdvise (pthis, aspects, advf, ppAdvSink) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

GetExtent

 

FUNCTION IViewObjectEx_GetExtent ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwAspect AS DWORD _

, BYVAL lindex AS LONG _

, BYREF ptd AS DVTARGETDEVICE _

, BYREF lpsizel AS SIZEL _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[9] USING IViewObjectEx_GetExtent (pthis, dwAspect, lindex, ptd, lpsizel) TO HRESULT
  FUNCTION = HRESULT

 

END FUNCTION

 

 

GetRect

 

FUNCTION IViewObjectEx_GetRect ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwAspect AS DWORD _

, BYREF pRect AS RECTL _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[10] USING IViewObjectEx_GetRect (pthis, dwAspect, pRect) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

GetViewStatus

 

FUNCTION IViewObjectEx_GetViewStatus ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pdwStatus AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[11] USING IViewObjectEx_GetViewStatus (pthis, pdwStatus) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

QueryHitPoint

 

FUNCTION IViewObjectEx_QueryHitPoint ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwAspect AS DWORD _

, BYREF pRectBounds AS RECT _

, BYREF ptlLoc AS POINTAPI _

, BYVAL lCloseHint AS LONG _

, BYREF pHitResult AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[12] USING IViewObjectEx_QueryHitPoint (pthis, dwAspect, pRectBounds, ptlLoc, lCloseHint, pHitResult) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

QueryHitRect

 

FUNCTION IViewObjectEx_QueryHitRect ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwAspect AS DWORD _

, BYREF pRectBounds AS RECT _

, BYREF pRectLoc AS RECT _

, BYVAL lCloseHint AS LONG _

, BYREF pHitResult AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[13] USING IViewObjectEx_QueryHitRect (pthis, dwAspect, pRectBounds, pRectLoc, lCloseHint, pHitResult) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

GetNaturalExtent

 

FUNCTION IViewObjectEx_GetNaturalExtent ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwAspect AS DWORD _

, BYVAL lIndex AS LONG _

, BYREF ptd AS DVTARGETDEVICE _

, BYVAL hicTargetDev AS DWORD _

, BYREF pExtentInfo AS DVEXTENTINFO _

, BYREF pSizel AS SIZEL _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[14] USING IViewObjectEx_GetNaturalExtent (pthis, dwAspect, lIndex, ptd, hicTargetDev, pExtentInfo, pSizel) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:34:07 +0200