我的Dhtml总是提示,不支持此接口.!!!
MailDhtml.DocumentHTML:='<html><body></body></html>';
self.MailDhtml.DocumentHTML :='HtmlBuffer.htm'
都不行.你有Dhtml的例子吗发给我一个[email protected]最好是delphi 2005的.

解决方案 »

  1.   

    http://msdn.microsoft.com/archive/en-us/dnaredcom/html/edcomfaq.asp
      

  2.   

    嘿嘿
    知道这个问题原因所在的人并不多的~_~任何机器只要安装MS的补丁KB891781后,DHTML就动不了的!
    现在的XPSP2,2003SP1等都内含那个补丁,所以DOM接口用不了的没有办法了么??有的,呵呵首先,保存Delphi系统下的OleCtrls.Pas到你的程序所在目录
    然后修改部分代码,增加IOleContainer接口TOleControl = class(TWinControl, IUnknown, IOleClientSite,
    IOleControlSite, IOleInPlaceSite, IOleInPlaceFrame, IDispatch,
    IPropertyNotifySink, ISimpleFrameSite, IOleContainer)//IOleContainer
    function EnumObjects(grfFlags: Longint; out Enum: IEnumUnknown):
    HResult; stdcall;
    function LockContainer(fLock: BOOL): HResult; stdcall;
    function ParseDisplayName(const bc: IBindCtx; pszDisplayName:
    POleStr; out chEaten: Longint; out mkOut: IMoniker): HResult; stdcall;function TOleControl.EnumObjects(grfFlags: Integer;
    out Enum: IEnumUnknown): HResult;
    begin
    Result := E_NOTIMPL;
    end;function TOleControl.LockContainer(fLock: BOOL): HResult;
    begin
    Result := E_NOTIMPL;
    end;function TOleControl.ParseDisplayName(const bc: IBindCtx;
    pszDisplayName: POleStr; out chEaten: Integer;
    out mkOut: IMoniker): HResult;
    begin
    Result := E_NOTIMPL;
    end;并修改
    function TOleControl.GetContainer(out container: IOleContainer):
    HResult;
    begin
    container:= Self;
    Result:= S_OK;
    end;做完以上修改后,DHTML就又能使用的:)
      

  3.   

    这个问题我不懂啊, 不过, Liuliu给出答案了
      

  4.   

    [Fatal Error] mdi_main.pas(8): F2051 Unit SHDocVw was compiled with a different version of OleCtrls.TOleControl
      

  5.   

    就不会把Delphi自己的SHDocVw.Pas都复制到项目文件夹下
    然后编译的吗?我用得好好的,呵呵如果你不想自己弄,直接下载http://lysoft.lz169.com/LYSoft/DHTML.rar
      

  6.   

    那个mshtml作什么的.告诉我我要给分了.
      

  7.   

    你QQ多少.我加你.还有aiirii你的QQ多少我作一个群4909956进来哈哈.加进来.
      

  8.   

    MSHTML就是IE的一个扩展类型库
    Type Library嘛,呵呵