releaseCapture method

Removes mouse capture from the object in the current document.

Syntax

HRESULT retVal = object.releaseCapture();

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.

Standards information

There are no standards that apply here.

Remarks

For IHTMLDocument3::releaseCapture to have an effect, you must set mouse capture through the IHTMLElement2::setCapture method.

You can invoke the IHTMLDocument3::releaseCapture method on the document object. The IHTMLDocument3::releaseCapture method makes it unnecessary to determine which element has capture to programmatically release it. Other actions that release document capture include displaying a modal dialog box and switching focus to another application or browser window.

See also

Reference

HTMLFrameSiteEvents::onlosecapture

IHTMLElement2::setCapture

msSetPointerCapture

msReleasePointerCapture

Conceptual

About Mouse Capture