IHTMLWindow3::onbeforeprint Property

Sets or retrieves a pointer to the event handler function that is called when the onbeforeprint event is fired.

Syntax


HRESULT IHTMLWindow3::get_onbeforeprint(VARIANT *p);HRESULT IHTMLWindow3::put_onbeforeprint(VARIANT v);

Parameters

p
Pointer to a variable of type VARIANT of type VT_DISPATCH that receives the IDispatch interface of an object with a default method that is invoked when the event occurs.
v
VARIANT of type VT_DISPATCH that specifies the IDispatch interface of an object with a default method that is invoked when the event occurs.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

This property provides a way to specify a function that can change a document's markup for printing. For example, you may want a document to expand collapsed lists, make hidden elements visible, create a watermark, and so on.

See Also

Community Additions

ADD
Show:
© 2015 Microsoft