Provides a method to customize the way that elements are resized and moved.
SnapRect Called by MSHTML whenever a selected element is resized or moved in the editor.
IHTMLEditHost can only be used on applications hosting the WebBrowser control or MSHTML. When the MSHTML Editor interface is initialized, it automatically calls IServiceProvider::QueryService on the host application to find an IHTMLEditHost interface, if there is one. To implement IHTMLEditHost, you must also implement an IServiceProvider interface on the object hosting the WebBrowser control or MSHTML to provide a pointer to your IHTMLEditHost interface. MSHTML will call the IHTMLEditHost::SnapRect method whenever an element is resized or moved in the editor.
When you implement IServiceProvider::QueryService, use the SID_SHTMLEditHost service ID and the IID_IHTMLEditHost interface ID to identify your IHTMLEditHost implementation. These are both defined in Mshtml.h.
You can use IHTMLEditHost to implement a snap-to-grid mechanism for img element resizing.
Stock Implementation mshtml.dll Custom Implementation Yes Inherits from IUnknown Header and IDL files mshtml.h, mshtml.idl Minimum availability Internet Explorer 5.5 Minimum operating systems Windows 95, Windows NT 4.0, Windows CE 4.0