如何以编程方式打开或关闭Windows XP中的鼠标过滤器

时间:2011-03-21 14:06:44

标签: c windows

主题是打开或关闭鼠标过滤器。我找到了除鼠标过滤器之外的所有api配置鼠标,它在哪里?

1 个答案:

答案 0 :(得分:0)

if (needToOff())
    {
        deb("mouse filter: off");

        mouseAccel.MouseSpeed = mouseAccel.MouseThreshold1 = mouseAccel.MouseThreshold2 = 0;
        SystemParametersInfo(SPI_SETMOUSE, 0, &mouseAccel, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
    }
    else
    {
        deb("mouse filter: on");
        mouseAccel.MouseSpeed = 1;
        mouseAccel.MouseThreshold1 = 6;
        mouseAccel.MouseThreshold2 = 10;
        SystemParametersInfo(SPI_SETMOUSE, 0, &mouseAccel, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
    }