473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Capturing Global Mouse and Keyboard Events

Hi,

I would like to enable my VC++ application to capture general mouse
and keyboard events (click, double-click, key press) that occur
outside of my application's frame (eg. clicking inside the frame of
another application). I'm quite sure this is possible, but I don't
know how to do it. Anyone have experience with this?

Thanks in advance for your help.

Aug 13 '07 #1
3 4548
Hi,

Set hooks using SetWindowsHookEx().

Hope this helps.

Dinesh Venugopalan
"wbyeats" <va**********@gmail.comwrote in message
news:11*********************@l22g2000prc.googlegro ups.com...
Hi,

I would like to enable my VC++ application to capture general mouse
and keyboard events (click, double-click, key press) that occur
outside of my application's frame (eg. clicking inside the frame of
another application). I'm quite sure this is possible, but I don't
know how to do it. Anyone have experience with this?

Thanks in advance for your help.

Aug 13 '07 #2
Thanks, Dinesh.

That put me on the right track. Now I'm just trying to figure out
DLLs.
Aug 15 '07 #3
wbyeats wrote:
Thanks, Dinesh.

That put me on the right track. Now I'm just trying to figure out
DLLs.
wbyeats:

You might find this article useful.

<http://www.codeproject.com/dll/hooks.asp>

There are some other hook articles on Codeproject also.

--
David Wilkinson
Visual C++ MVP
Aug 16 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Nolan Martin | last post by:
Is it just me or are there no good librarys out there to access the keyboard or mouse? I have been looking around for a while now and can only find ones that are bundled with a bunch of other...
13
by: lost hope | last post by:
hi, i have a very simple html page with a global variable, a function to increment its value, and a form that calls the function. however, what happens is that every time i click the image, the...
9
by: Will Pittenger | last post by:
If I were writing a C++ program, I would write a mouse hook. Does C# and ..NET 1.1 have anything equivalent. If not, I suppose I will need to use the Win32 API. ---------- Will Pittenger...
5
by: Nick | last post by:
Hey guys, I have 2 events on a windows forms datagrid, the mouse move as well as the double click events. What's happening is that when I double click on a row in the grid, the mouse move event...
0
by: learner404 | last post by:
Hello, I have a Windows Pyhon-Tk app which need to capture mouse end keyboard events even when the app is not in focus. On Windows so far I've used the excellent PyHook which does the job...
16
by: dfaber | last post by:
Hi all, I have been searching for a keyboard and mouse tracker on linux. I've read solutions (watch at sourceforge) which look at /proc/interrupts to check keyboard or mouse activity. I also read...
0
by: Gamey | last post by:
I have an application that NEEDS (don't ask) to handle additional mouse and keyboard processing during DoDragDrop. Normally, DoDragDrop kindly squashes all keyboard and mouse events. Alternate,...
1
by: pavanjosh | last post by:
Hello All, I want to develop an application which is a banking application. I have already developed a application in .NET , C#. The major functionality of this application is automatic logging...
3
by: nomihn0 | last post by:
I'd like to accept mouse gestures and keyboard shortcuts as input to a program. The nature of this program requires that these commands be issued regardless of the currently active window. Here's...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.