本帖最后由 jianye112 于 2011-12-16 16:28:16 编辑

解决方案 »

  1.   


    function TForm1.GetHwnd(AHwnd:THandle):THandle;
    begin
      //Result := FindWindowEx(ParentHwnd, 0,'Shell Embedding', nil);
      Result := FindWindowEx(AHwnd, 0,'Shell DocObject View', nil);
      Result := FindWindowEx(Result, 0,'Internet Explorer_Server', nil);
    end;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      SendMessage(GetHwnd(EmbeddedWB1.Handle), WM_MOUSEWHEEL, (-120*3) shl 16, (5 shl 16) or 5);//失败
      //SendMessage(Memo1.Handle), WM_MOUSEWHEEL, (-120*3) shl 16, (5 shl 16) or 5);//成功
    end;
      

  2.   

    SendMessage(GetHwnd(EmbeddedWB1.Handle), WM_MOUSEWHEEL, (-120*3) shl 16, (5 shl 16) or 5);//失败
      

  3.   

            IHTMLWindow2(IHTMLDocument2(WebBrowser1.Document).ParentWindow).Focus;
            IHTMLWindow2(IHTMLDocument2(WebBrowser1.Document).ParentWindow).scroll(100,100);用这个吧,效果一样的,直接鼠标消息那个我也没做出来,放弃了,呵呵