-
September 10th, 2013, 05:22 PM
#1
Keyboard & mouse hook example program (for VS Express 2012)?
I was using an old example system wide keyboard and mouse hook written by Paul DiLascia. It works in Windows XP in Visual Studio NET 2003. But now I need an example system wide keyboard and mouse hook for Visual Studio Express 2012 in Windows 8. I'm familiar with C++, but I could learn C# or Visual Basic. I can do the programming syntax and logic, but I have trouble with the Windows interface code. I would like to again use an example hook and replace the guts with my own code.
Thanks.
-
September 11th, 2013, 03:05 AM
#2
Re: Keyboard & mouse hook example program (for VS Express 2012)?
So doesn't the code of Paul DiLascia work in Visual Studio Express 2012 in Windows 8?
Victor Nijegorodov
-
September 11th, 2013, 04:35 AM
#3
Re: Keyboard & mouse hook example program (for VS Express 2012)?
If the example doesn't compile for Visual Studio Express 2012, what compile errors are you getting?
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
September 11th, 2013, 06:01 PM
#4
Re: Keyboard & mouse hook example program (for VS Express 2012)?
I made some progress and then ran into this
error C1083: Cannot open include file: 'afxwin.h'
Apparently Visual Studio Express does not include MFC.
I might try using "virtual box" or whatever it's called to run Windows XP and my Visual Studio NET 2003. That will probably be quicker than restoring Windows XP when I need to adjust my macro recorder code. I do almost no programming. Once in a great while, I use the same macro recorder, changing the recorder output text to whatever scripting language I'm using at the time. Few and far between programming tasks. Buying a professional version of C++ in order to get MFC working in Windows 8 isn't going to happen here.
Thanks to the replies.
-
September 12th, 2013, 04:49 AM
#5
Re: Keyboard & mouse hook example program (for VS Express 2012)?
Originally Posted by zolds
I made some progress and then ran into this
error C1083: Cannot open include file: 'afxwin.h'
Apparently Visual Studio Express does not include MFC.
Which MFC classes do you use?
What happens if you comment out this #include?
Victor Nijegorodov
-
September 12th, 2013, 07:43 AM
#6
Re: Keyboard & mouse hook example program (for VS Express 2012)?
Originally Posted by zolds
I was using an old example system wide keyboard and mouse hook written by Paul DiLascia. It works in Windows XP in Visual Studio NET 2003. But now I need an example system wide keyboard and mouse hook for Visual Studio Express 2012 in Windows 8.
I don't see why you cannot use VS NET 2003 in Win8.
Originally Posted by zolds
Buying a professional version of C++ in order to get MFC working in Windows 8 isn't going to happen here.
Pure Win32 API mouse hook sample: mouhook_dll_with_shared_section_win32_api_only.zip (proved to work in Win 7)
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|