Partager via


OnPreRender method

Enables your ActiveX control to be notified when it has started to render a frame.

 

Syntax

HRESULT retVal = object.OnPreRender();

Parameters

This method has no parameters.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This notification occurs after layout is complete but right before Trident starts to draw the content in the frame. This gives the control a chance to present contents and to ensure that what is presented is drawn onto the screen in that draw cycle.

Trident calls this notification only if your control implements the IViewObjectPresentNotify interface and you have set the composition mode to ISurfacePresenter. The notification is not called when the control is not active, or if Internet Explorer is minimized to the task bar. This behavior improves overall system performance by not calling your control when nothing would be displayed.