Я в основном скопировал следующий код прямо из документации MSDN :
#include <windows.h>
#include <stdio.h>
#pragma comment(lib, "user32.lib")
int main()
{
BOOL fResult;
int aMouseInfo[3]; // array for mouse information
// Get the current mouse speed.
fResult = SystemParametersInfo(
SPI_GETMOUSE, // get mouse information
0, // not used
&aMouseInfo, // holds mouse information
0); // not used
// Double it.
if( fResult )
{
aMouseInfo[2] = 1; // 2 * aMouseInfo[2];
// 1 should be a very noticeable change: slowing the cursor way down
// Change the mouse speed to the new value.
SystemParametersInfo(
SPI_SETMOUSE, // set mouse information
0, // not used
aMouseInfo, // mouse information
SPIF_SENDCHANGE); // update win.ini
}
return 0;
}
И все же, когда я его запускаю, кажется, ничего не происходит.Скорость мыши должна меняться, но она не меняется.
Windows Vista Home x32 (ай) Dev-C ++ Portable