Please help I'd like to add a button to the mouse function.

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
yang0401
New User
Posts: 5
Joined: Sat Aug 03, 2013 12:08 pm

Please help I'd like to add a button to the mouse function.

Post by yang0401 »

I'd like to add a button to the mouse, my girlfriend likes to hang out with her right click the left mouse button click, she thinks it is the left mouse button double-click.
我想让给鼠标增加一个按键,我女朋友喜欢鼠标左键和右键一起按,她认为这是鼠标左键双击。
I tried WH_MOUSE_LL Hook, but unfortunately I failed, I also tried WH_GETMESSAGE Hook, also didn't succeed. I have used your software, the feeling is running smoothly, function is very accord with my request. So please give me a hand, how to realize the left mouse button + the right mouse button = mouse the left key double-click. Thank you very much, would you please help?
我试过WH_MOUSE_LL Hook,但是很遗憾的是失败了,我也试过WH_GETMESSAGE Hook,也没成功。我使用了你们的软件,感觉运行很流畅,功能很符合我的要求。所以请你们帮助我一下,怎么实现鼠标左键+鼠标右键=鼠标左键双击。非常感谢,请帮助好吗?
yang0401
New User
Posts: 5
Joined: Sat Aug 03, 2013 12:08 pm

Re: Please help I'd like to add a button to the mouse funct

Post by yang0401 »

My Email:yang0401@live.com Would you please help me?
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: Please help I'd like to add a button to the mouse funct

Post by phil »

I dont understand, are you trying to write your own software thats does the same thing that XMBC does? I see references to hooks and things, but there is a lot of non-english stuff in your message (is it Chinese?) and I have no idea what that's trying to say.

If XMBC works, then you should be able to do what you want in code really easily (but why do that when something already works?!). Use LowLevel mouse hooks (WH_MOUSE_LL) - its not difficult and the examples on MSDN and various other websites work fine. You really shouldn't need any more information that what is already available on google! If you have a more specific question then feel free to ask, but there are plenty of answers on generic hook programming.

A couple of pointers...
Your hook procedure needs to be in a DLL, not an EXE.
Your hook needs to be quick, too slow and it will be removed by Windows (there is a globally configurable timeout in the Windows registry but for something simple like changing a button it shouldn't matter).

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
yang0401
New User
Posts: 5
Joined: Sat Aug 03, 2013 12:08 pm

Re: Please help I'd like to add a button to the mouse funct

Post by yang0401 »

我想改变,鼠标左键和鼠标右键同时按下变成鼠标左键双击
我是一个中国人,使用的是中文
I want to change, the left mouse button and the right mouse button pressed into the left mouse button double click at the same time
I am a Chinese, use Chinese
yang0401
New User
Posts: 5
Joined: Sat Aug 03, 2013 12:08 pm

Re: Please help I'd like to add a button to the mouse funct

Post by yang0401 »

My code, but can't work normally;

LRESULT CALLBACK LowLevelMouseProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if(nCode>0)
{
if(wparam == WM_LBUTTONDOWN) Condition1 = 1;
if(wparam == WM_LBUTTONUP) Condition1 = 0;
if(wparam == WM_RBUTTONDOWN) Condition2 = 1;
if(wparam == WM_RBUTTONUP) Condition2 = 0;
if(Condition1 & Condition2)
{
Condition1 = Condition2 =0;
sendmessage(NULL,WM_LBUTTONDBLCLICK,0,0);
return 1;
}
}
return CallNextHookEx(hookmose,nCode, wParam,lParam);
}
yang0401
New User
Posts: 5
Joined: Sat Aug 03, 2013 12:08 pm

Re: Please help I'd like to add a button to the mouse funct

Post by yang0401 »

Please tell me how to change the Mouse messages, X - Mouse Button Control is very nice, but my software does not work, please tell me why? thank you
Post Reply