Called by MSHTML whenever a selected element is resized or moved in the editor.
HRESULT retVal = object.SnapRect(pIElement, prcNew, eHandle);
- pIElement [in]
A pointer to an IHTMLElement interface that specifies the element that is resized or moved.
- prcNew [in, out]
A pointer to a variable of type RECT that specifies the element's current size and position, relative to the containing document's global coordinate system, and that receives the new size and position for the element.
A ELEMENT_CORNER enumeration that specifies which handle or corner the user has selected for the resizing operation.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
You can use this method to provide a snap-to-grid feature for element resizing and positioning.