Condividi tramite


COleControl::OnGetViewExtent

Called by the framework in response to a container's IViewObject2::GetExtent request.

virtual BOOL OnGetViewExtent(
   DWORD dwDrawAspect,
   LONG lindex,
   DVTARGETDEVICE* ptd,
   LPSIZEL lpsizel 
);

Parameters

  • dwDrawAspect
    DWORD describing which form, or aspect, of an object is to be displayed. Valid values are taken from the enumeration DVASPECT or DVASPECT2.

  • lindex
    The portion of the object that is of interest. Currently only –1 is valid.

  • ptd
    Points to the DVTARGETDEVICE structure defining the target device for which the object's size should be returned.

  • lpsizel
    Points to the location where the object's size is returned.

Return Value

Nonzero if extent information is successfully returned; otherwise 0.

Remarks

Override this function if your control uses two-pass drawing, and its opaque and transparent parts have different dimensions.

Requirements

Header: afxctl.h

See Also

Reference

COleControl Class

Hierarchy Chart

COleControl::OnGetViewRect

Other Resources

COleControl Members