Draw method

Called by MSHTML to render the Dynamic HTML (DHTML) behavior.

Syntax

HRESULT retVal = object.Draw(hdc, lLayer, pRect, pReserved);

Parameters

hdc [in]

Type: HDC

A handle to a device context in which the Dynamic HTML (DHTML) behavior is rendered.

lLayer [in]

Type: LONG

An unsigned long integer value that specifies the layer in which the Dynamic HTML (DHTML) behavior is rendered, as specified by IElementBehaviorRender::GetRenderInfo. It can be one of the following values.

BEHAVIORRENDERINFO_BEFOREBACKGROUND

Renders the behavior before rendering the background.

BEHAVIORRENDERINFO_AFTERBACKGROUND

Renders the behavior after rendering the background.

BEHAVIORRENDERINFO_BEFORECONTENT

Renders the behavior before rendering the text.

BEHAVIORRENDERINFO_AFTERCONTENT

Renders the behavior after rendering the text.

BEHAVIORRENDERINFO_AFTERFOREGROUND

Renders the behavior after rendering the foreground.

pRect [in]

Type: RECT

A pointer to a RECT structure that specifies the drawing area for the Dynamic HTML (DHTML) behavior.

pReserved [in]

Type: IUnknown

Reserved. Must be set to NULL.

Return value

Type: HRESULT

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

Remarks

This method is available in Microsoft Internet Explorer 5, but is not supported in later versions. Instead, use the IHTMLPainter interface and the IHTMLPaintSite interface.