Keyboard & mouse hook example program (for VS Express 2012)?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Keyboard & mouse hook example program (for VS Express 2012)?

  1. #1
    Join Date
    Sep 2013
    Posts
    2

    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.

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,276

    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

  3. #3
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,265

    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. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  4. #4
    Join Date
    Sep 2013
    Posts
    2

    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.

  5. #5
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,276

    Re: Keyboard & mouse hook example program (for VS Express 2012)?

    Quote Originally Posted by zolds View Post
    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

  6. #6
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    5,927

    Re: Keyboard & mouse hook example program (for VS Express 2012)?

    Quote Originally Posted by zolds View Post
    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.

    Quote Originally Posted by zolds View Post
    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center