Delphi修正EmbeddedWEB中キーでスクロールできないバグ


Modified :/EmbeddedWB/EmbeddedWB.pas
{$IFDEF Enable_MouseWheelFix}

function MouseHookProc(nCode: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
var
  hwnd: THANDLE;
  WndClass: string;
begin
  Result := CallNextHookEx(MouseHook, nCode, wParam, lParam);
  case nCode < 0 of
    TRUE: Exit;
    FALSE:
      begin
        if (wParam = WM_MOUSEWHEEL) then
        begin
          hwnd := WindowFromPoint(Mouse.CursorPos);
          if hwnd <> 0 then
          begin
           //hwnd := GetParent(hwnd); ///        
            if hwnd <> 0 then
            begin
              SetLength(WndClass, 25);
              SetLength(WndClass, GetClassName(hwnd, PChar(WndClass), Length(WndClass)));
              if WndClass = 'Shell DocObject View' then
                Windows.SetFocus(hwnd);
            end;
          end;
        end;
      end;
  end;
end;
{$ENDIF}