jamesbrown
asked on
Toggling Xmouse on Windows NT 4.0
I am trying activate/deactivate XMouse on a Windows NT machine (similar to the XMouse check box in TweakUI). I have found the registry key ("HKEY_CURRENT_USER\Contro l Panel\Mouse\ActiveWindowTr acking") and I can change the value there of.
But, I cannot force the necessary refresh to activate/deactivate XMouse. But, after logging out and logging back in, XMouse is set as expected.
So, is there an API call to force the refresh? (Note: I have tried :
::SendMessage (HWND_BROADCAST, WM_SETTINGCHANGE, NULL, NULL);
which does not seem to work.
Do I have to "restart" the mouse device? If so, how?
Any help would be greatly appreciated.
Cheers,JB.
But, I cannot force the necessary refresh to activate/deactivate XMouse. But, after logging out and logging back in, XMouse is set as expected.
So, is there an API call to force the refresh? (Note: I have tried :
::SendMessage (HWND_BROADCAST, WM_SETTINGCHANGE, NULL, NULL);
which does not seem to work.
Do I have to "restart" the mouse device? If so, how?
Any help would be greatly appreciated.
Cheers,JB.
I forgot to mention this before, but TweakUI uses both the functions I listed.
ASKER
I have looked at the parameters that are available for use in SHChangeNotify() and SystemParametersInfo() and none of them even hint at anything close to performing what I need done. If you know of an undocumented parameter, please let me know.
JB
JB
What version of the documentation are you reading?
I just spent some time hacking about, and I have the answer you want. It took me a couple of hours though, so do you think you could raise the value of this question? it would make me feel better about spending my time this way.
I just spent some time hacking about, and I have the answer you want. It took me a couple of hours though, so do you think you could raise the value of this question? it would make me feel better about spending my time this way.
ASKER
I took a look at the documentation - not exactly sure what version. I did however have a look through the MSDN site and found that in NT 5 SystemParametersInfo() has SPI_GETACTIVEWINDOWTRACKIN G and SPI_SETACTIVEWINDOWTRACKIN G. But I need this for NT 4. I looked all over for the #define's for these but could not find them. I hope your solution works for NT 4.
JB
JB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you. I looked and loked and did not find.
JB
JB
SHChangeNotify() might be a way of kicking the shell into noticing the change you made to the registry, without having to reboot. Have you read the documentation for this function?