How do I detect keypresses while application runs in the background?

This is a discussion on How do I detect keypresses while application runs in the background? within the C++ Programming forums, part of the General Programming Boards category; I'll be upfront, I'm not a great programmer, I primarily work with web based languages (PHP / Javascript) and this ...

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    1

    How do I detect keypresses while application runs in the background?

    I'll be upfront, I'm not a great programmer, I primarily work with web based languages (PHP / Javascript) and this is my first attempt to work with C++. I've learned all the basics (via this site) but now I'm stuck.

    What I'm trying to do is have a key that, when pressed, performs an action. This works fine expect the program will be running in the background. I came across the function "registerHotKey" but because my ability to understand easily from documentation isn't very good I'm struggling. Documentation here.

    I'd appreciate if someone could give me a basic example of how I would use this, thankyou

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    You're going to have to help us help you: what's wrong with the example you posted?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Run a program in the background
    By rkooij in forum C Programming
    Replies: 7
    Last Post: 07-17-2007, 10:51 AM
  2. MFC run application by clicking on file...
    By dug in forum Windows Programming
    Replies: 4
    Last Post: 12-02-2004, 03:33 AM
  3. Detect Close of a background process
    By Schwarzhelm in forum C Programming
    Replies: 1
    Last Post: 11-05-2003, 12:46 AM
  4. Cannot run program in background?
    By registering in forum Linux Programming
    Replies: 3
    Last Post: 06-16-2003, 05:47 AM
  5. Replies: 6
    Last Post: 10-24-2002, 08:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21