程序需要模拟鼠标滚轮上下滚动的事件,那位高手知道如何实现?
十分感谢!

解决方案 »

  1.   

    SendMessage(hWnd,WM_MOUSEWHEEL, WHEEL_DELTA<<16, 0);  //上滚
    SendMessage(hWnd,WM_MOUSEWHEEL, -WHEEL_DELTA<<16, 0); //下滚
      

  2.   

    VOID mouse_event(
      DWORD dwFlags,         // motion and click options
      DWORD dx,              // horizontal position or change
      DWORD dy,              // vertical position or change
      DWORD dwData,          // wheel movement
      ULONG_PTR dwExtraInfo  // application-defined information
    );