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,也没æˆåŠŸã€‚æˆ‘ä½¿ç”¨äº†ä½ ä»¬çš„è½¯ä»¶ï¼Œæ„Ÿè§‰è¿è¡Œå¾ˆæµç•…,功能很符åˆæˆ‘çš„è¦æ±‚ã€‚æ‰€ä»¥è¯·ä½ ä»¬å¸®åŠ©æˆ‘ä¸€ä¸‹ï¼Œæ€Žä¹ˆå®žçŽ°é¼ æ ‡å·¦é”®+é¼ æ ‡å³é”®=é¼ æ ‡å·¦é”®åŒå‡»ã€‚éžå¸¸æ„Ÿè°¢ï¼Œè¯·å¸®åŠ©å¥½å—?
Please help I'd like to add a button to the mouse function.
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.
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.
Re: Please help I'd like to add a button to the mouse funct
My Email:yang0401@live.com Would you please help me?
Re: Please help I'd like to add a button to the mouse funct
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
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)
--[ 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)
Re: Please help I'd like to add a button to the mouse funct
我想改å˜ï¼Œé¼ æ ‡å·¦é”®å’Œé¼ æ ‡å³é”®åŒæ—¶æŒ‰ä¸‹å˜æˆé¼ æ ‡å·¦é”®åŒå‡»
我是一个ä¸å›½äººï¼Œä½¿ç”¨çš„是ä¸æ–‡
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
我是一个ä¸å›½äººï¼Œä½¿ç”¨çš„是ä¸æ–‡
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
Re: Please help I'd like to add a button to the mouse funct
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);
}
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);
}
Re: Please help I'd like to add a button to the mouse funct
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