COleControl::SerializeExtent

Serializes or initializes the state of the display space allotted to the control.

void SerializeExtent(
   CArchive& ar 
);

Parameters

  • ar
    A CArchive object to serialize to or from.

Remarks

You can improve a control's binary persistence performance by using SerializeExtent, SerializeStockProps, and SerializeVersion to override COleControl::Serialize. See the example below. For further information on optimizing initialization, see ActiveX Controls: Optimization.

Example

void CMyAxCtrl::Serialize(CArchive& ar)
{
   SerializeVersion(ar, MAKELONG(_wVerMinor, _wVerMajor));
   SerializeExtent(ar);
   SerializeStockProps(ar);

   if (ar.IsStoring())
   {    // storing code
   }
   else
   {    // loading code
   }
}

Requirements

Header: afxctl.h

See Also

Concepts

COleControl Class

COleControl Members

Hierarchy Chart

COleControl::SerializeStockProps

COleControl::SerializeVersion