92 questions
0
votes
1
answer
100
views
How to block right mouse button and convert it to middle mouse button without delay (like AutoHotkey)?
I’m trying to remap the right mouse button to act as the middle mouse button in C++ on Windows.
What I did
I wrote code using Raw Input (see below).
My code successfully sends a middle click when I ...
0
votes
2
answers
533
views
SetWindowsHookExW not calling the MouseProc callback procedure
So I'm trying to run a simple code in C that prints the position of the mouse every time it moves. To keep the program running for a while and then exit, I use a for loop shown below. I want the hook ...
1
vote
1
answer
2k
views
Python Global Capturing and Disposing Mouse Click Event
I want to create a tool, which allows me to send keys to active window using my mouse.
Let's say I want to send the key "A" when I click the left mouse button. But I also want to suppress / ...
0
votes
0
answers
102
views
Failed to intercept WM_LBUTTONUP message with WH_GETMESSAGE or WH_MOUSE_LL
In development of GUI automation service, our team faces with the problem that we can not handle WM_LBUTTONUP message correct.
The goal is to intercept WM_LBUTTONUP, disable active window, do our job ...
1
vote
1
answer
502
views
What is the end of the road for a WM_LBUTTONUP or WM_LBUTTONDOWN in a low level procedure hook?
I'm writing a low level mouse hook in Windows using the Win32 API, I want to intercept either a button being pressed down or up (still undecided) depending on certain conditions.
To position ourselves ...
1
vote
0
answers
385
views
SendInput() causes infinite loop when used with GetAsyncKeyState() (WinAPI)
So I want to make when you hold down your left click, the mouse starts to click at regular intervals.
In theory all should work right, but in practice, not so well.
Anyways here is the code I am using ...
0
votes
1
answer
143
views
Java / Transform key from keyboard or mouse to another key
I have a swing Java application (A) that launches another application (B) using Runtime.getRuntime().exec() when a certain button is pressed.
Is it possible to set a certain Key Hook so that when the ...
0
votes
1
answer
376
views
Mouse Global Hook - WM_MOUSEMOVE delay
Okay so there are plenty of samples for mouse global hooking.
My issue is how can I add a timer/delay for mouse movement.
What is the way of doing this? I thought maybe I should Thread.Sleep() on ...
0
votes
1
answer
149
views
how to access ui structures(textboxes,labels) inside static function MouseProc, SetWindowsHookEx?
In my .h file function mouseProc is declared as static(it has to be)
.h file
static LRESULT CALLBACK mouseProc(int Code, WPARAM wParam, LPARAM lParam);
initially i thought i would add &ui as a ...
1
vote
1
answer
1k
views
Setting process DPI awareness so that the system compensates for scaling factors
I have the following mouse hook procedure (simplified for the explanation).
SetWindowsHookEx(WH_MOUSE_LL, mouseHookProc, GetModuleHandle(NULL), 0) ;
LRESULT mouseHookProc(int code, WPARAM wParam, ...
0
votes
1
answer
954
views
Why are Low Level Mouse Hooks Causing Lag
I'm trying to make an application that just detects if the left mouse button is held down. In trying to do this, as well as learn mouse hooks, I copy-pasted a hook from an example source (https://...
0
votes
1
answer
835
views
How to Hook Mouse Event in C++ Builder Application using Windows Mouse Hook API Function?
I have a problem hooking mouse event in C++Builder, it's showing an error:
[bcc32 Error] MainUnit.cpp(24): E2034 Cannot convert 'long * (__stdcall * (_closure )(int,unsigned int,long))(int,unsigned ...
1
vote
0
answers
239
views
com.sun.jna.Native$1 uncaughtException
Recently,I try to get information of mouse by jna because my project need this function.The.But there is a exception occur when I run the following code.I have google ,but there is nothing about ...
0
votes
2
answers
329
views
How to detect a mouseclick event while MouseHook is set?
I am creating a tool that grabs the color of anything on the screen, whether it be inside the form or even outside the form. The user will use their mouse cursor to grab any pixel on the screen by ...
0
votes
1
answer
439
views
c++: window re-position with global mouse hook
I'm trying to develop the app like desktop divider.
I used global mouse hook (low level mouse hook) because when left button up after dragging window into specific position, the window located into ...
0
votes
0
answers
526
views
C programming Mouse Hook Proc
I want the messagebox to appear whenever I click my mouse, how do I achieve it? do mouse clicks have virtual key code like keyboard presses do? Do I also need to use lparam with MouseHookStruct, ...
1
vote
2
answers
2k
views
WinApi: Can the message loop be interrupted by an Async Procedure Call?
The following code register a low level mouse hook to monitor mouse events globally.
It's the simplest working example I can get.
Compiled with VC++ 2010: cl test.cpp /link /entry:mainCRTStartup /...
-3
votes
1
answer
2k
views
How to disable right-click button on windows using C++?
Is there a way to disable the right-click button?
I'm trying to use a mouse hook, that just simply disables the right-click button when you run the program.
#include <iostream>
#include <...
0
votes
1
answer
3k
views
VB6 mouse hook to capture a control a user clicks
I have a keyboard hook that listens for [shift] + [F12] key button press to activate an edit mode in my program. By edit mode, I mean that any form that is inactive in the program window is disabled ...
3
votes
0
answers
352
views
How to swallow mouse input while using Raw Input?
Situation: I am working on an overlay application that needs to intercept the input headed to another process and block that input if necessary.
Previous Attempts: So far I have created a low level ...
1
vote
1
answer
247
views
Repeat message in Mouse Proc C++ Win32
I have a procedure that when a user press Ctrl button and right click it will show a message box to screen. But it has a loop, I only press Ctrl button and right click once time but it shows a ...
0
votes
1
answer
274
views
Mouse hook, respond only when clicked on Button
I developed C# application which responds to low level mouse clicks. I used mouse hook to do this. The application is working fine, whenever i click any window it responds and perform some task. But i ...
1
vote
1
answer
727
views
Running a C++ Event Loop WITHOUT using QT
I have been trying to develop a background Windows application in c++ to capture system wide keystrokes and mouse clicks (no I'm not writing a keystroke logger, just keystroke rates!). For this I have ...
0
votes
0
answers
195
views
Detect Mouse Hook
I have an application that launches the Problem Steps Recorder utility that ships with Windows 7 and later that records all user mouse and keyboard interactions. It does so by creating a new Process ...
-2
votes
1
answer
2k
views
Disable Right Button (global) in c# like AHK program
I know c# and i want create a fuction for deactive and active mouse left/right button only (in c# code) like a AHK program. Can you help me?