我已经看过《如何在IE右键菜单中添加菜单项》这篇文章,但它是VB的,这里有一篇是Delphi的,但那个html文件有问题,因此总是不行,点击右键菜单没有任何反应!请给出具体的Delphi和相关的html源码!

解决方案 »

  1.   

    參看<<delphi 深度探索>>II
    裹面有很詳細的講到
      

  2.   


    在注册表如下位置添加项目即可:HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt如:HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\使用网际快车下载再在下面建两个数据项,一个指向你的htm文件路径打开注册表看看就知道啦。
      

  3.   

    这个我知道,但是那个htm怎么写?
      

  4.   

    晕。你下个flashget看看不就得了。实在不行。请email:[email protected]
    我给你一个:)
      

  5.   


    转:
    var
      reg: TRegistry;
    begin
      Reg := TRegistry.Create;
      with Reg do try
        RootKey := HKEY_CURRENT_USER;
        OpenKey('\Software\Microsoft\Internet Explorer\MenuExt\' + MenuText, True);
        WriteString('', Url);
        WriteInteger('contexts', contexts);
        CloseKey;
      finally
        Free;
      end;
    注册
    procedure TIEContextMenuFactory.UpdateRegistry(Register: Boolean);
    begin
      inherited;
      if Register then
        AddExtMenuItem('自定义文本', ExtractFilePath(GetDllName)+'网页.htm',32);
    end;
    HTM文件的VBSCRIP
    <script language="VBScript">Sub CopyLink(UrlText) 
    On Error Resume Next
    set CopyUrl=CreateObject("IEContext.IEContextMenu")
    if err<>0 then
    MsgBox("CopyUrl not properly installed!"+ vbCrLf+"Please register CopyUrl ")
    else
    call CopyUrl.CopyUrlText(UrlText)
            end if
    end subSub OnContextMenu()
    set srcEvent = external.menuArguments.event
    set EventElement = external.menuArguments.document.elementFromPoint ( srcEvent.clientX, srcEvent.clientY )
    if srcEvent.type = "MenuExtAnchor" then 
    set srcAnchor = EventElement
    do until TypeName(srcAnchor)="HTMLAnchorElement"
    set srcAnchor=srcAnchor.parentElement
    Loop
    Call CopyLink(srcAnchor.innerText)
    elseif srcEvent.type="MenuExtUnknown" then
    set srcAnchor = EventElement
    do until TypeName(srcAnchor)="HTMLAnchorElement"
    set srcAnchor=srcAnchor.parentElement
    if TypeName(srcAnchor)="Nothing" then 
    Call CopyLink(EventElement.innerText)
    exit sub
    end if
    Loop
    Call CopyLink(srcAnchor.innerText)
    elseif 1=1 then
    MsgBox("Unknown Event Source """ + srcEvent.type + """" + vbCrLf + "Please send description of error to [email protected]")
    end if
    end sub
    call OnContextMenu()</script>
      

  6.   

    在接口的实现类的DOWNLOAD方法中要返回S_OK.
      

  7.   

    在接口的实现类的DOWNLOAD方法中要返回S_OK怎样做?