Compartilhar via


IHTMLEditHost interface

Provides a method to customize the way that elements are resized and moved.

Members

The IHTMLEditHost interface inherits from the IUnknown interface but does not have additional members.

Remarks

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.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

Reference

IHTMLEditDesigner

IHTMLEditServices

Conceptual

Implementing IHTMLEditHost