Mouse speed

0

Jedno (chyba nie proste :]) pytanko: jak odczytać/ustawić szybkość myszki?

z góry thx :]

0

No wiesz... Panel sterowania->mysz->Ruch...

0

This next example uses SystemParametersInfo to double the mouse speed and update the MouseSpeed value in the WIN.INI file.

TCHAR tchBuffer[BUFFER]; // buffer for expanded string
int nSize; // size of string

int aMouseInfo[3]; // array for mouse information

// Get the current mouse speed.

SystemParametersInfo(SPI_GETMOUSE, // get mouse information
NULL, // not used
&aMouseInfo, // holds mouse information
NULL); // not used

// Double it.

aMouseInfo[2] = 2 * aMouseInfo[2];

// Change the mouse speed to the new value and update WIN.INI.

SystemParametersInfo(SPI_SETMOUSE, // set mouse information
NULL, // not used
aMouseInfo, // mouse information
SPIF_UPDATEINIFILE); // update win.ini

zaczerpnięte z SDK. resztę musisz już sam zrobić [hurra]

0

Hmm... To już też wcześniej znalazłem, ale to chyba nie działa :/ (przynajmniej na XP). Czy moglibyście sprawdzić? :] W delphi ten kod prezentuje się następująco:

var aMouseInfo:array[0..2]of integer;
begin
 SystemParametersInfo(SPI_GETMOUSE,0,@aMouseInfo,0);
 aMouseInfo[2]:=aMouseInfo[2]*2;
 SystemParametersInfo(SPI_SETMOUSE,0,@aMouseInfo,SPIF_UPDATEINIFILE);

U mnie to nie ma żadnego wpływu na szybkość myszki... Zresztą zmiana szybkości w panelu sterowania nie zmienia informacji uzyskiwanych przez SysParamInfo...

//sahan, nie chodzi mi o szybkość DblClicka, tylko poruszania się myszki po ekranie...

0
SetDoubleClickTime(milisekund);

Opis funkcji API:
BOOL SetDoubleClickTime(

UINT uInterval 	// double-click interval

);

Parameters

uInterval

Specifies the number of milliseconds that may occur between the first and second clicks of a double-click. If this parameter is set to zero, Windows uses the default double-click time of 500 milliseconds.


UINT GetDoubleClickTime(VOID)

Parameters

This function has no parameters.

Return Values

If the function succeeds, the return value specifies the current double-click time, in milliseconds.

0

Jednak dowiedziałem się (przypadkowo) że tu chodzi o czułość myszki (mouse sensitivity), a nie szybkość :]. Więc to znajduje się (chyba) tylko w rejestrze: HKEY_CURRENT_USER\Control Panel\Mouse\MouseSensitivity.
eot

1 użytkowników online, w tym zalogowanych: 0, gości: 1