Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Catching messages from remote control [modified]

Catching messages from remote control [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mk_4
    wrote on last edited by
    #1

    Hi, I would like to write an application which would let me use remote control from my TV card to turn on some apps like music player. The receiver of signals from my rc is connected to TV card. There is also an application which receives the messages when I press some button on remote control. The problem is that, I can't catch all messages using the WH_GETMESSAGE hook and WM_USER parameter for MSG structure. I mean, when I press buttons which are responsible for turning on TV and radio, my application receives a message, but if I press another button like "1" or "Mute", nothing happens. I also have tried using WM_COMMAND and it works, but only if the TV is turned on. And here is my question: Is this possible to catch somehow messages connected with another buttons when my TV is turned off? Thanks in advance and sorry for my english.

    modified on Friday, January 23, 2009 2:43 PM

    C 1 Reply Last reply
    0
    • M mk_4

      Hi, I would like to write an application which would let me use remote control from my TV card to turn on some apps like music player. The receiver of signals from my rc is connected to TV card. There is also an application which receives the messages when I press some button on remote control. The problem is that, I can't catch all messages using the WH_GETMESSAGE hook and WM_USER parameter for MSG structure. I mean, when I press buttons which are responsible for turning on TV and radio, my application receives a message, but if I press another button like "1" or "Mute", nothing happens. I also have tried using WM_COMMAND and it works, but only if the TV is turned on. And here is my question: Is this possible to catch somehow messages connected with another buttons when my TV is turned off? Thanks in advance and sorry for my english.

      modified on Friday, January 23, 2009 2:43 PM

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      First of all, tell me if i am right or wrong: You made a program which hooks into the other application -probably one you got with your TV card- to catch messages (and perform your bidding) it sends itself when the remote control is invoked. If so, you could try using Spy++ to see what messages are being sent when certain buttons are pressed for starters. But it can also be that that certain program will only respond to certain remote-keyhits when an application it knows about is running and responds to these, that's why your commands work only when you TV program is running. What is that proggie you are hooking into?

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

      M 1 Reply Last reply
      0
      • C Code o mat

        First of all, tell me if i am right or wrong: You made a program which hooks into the other application -probably one you got with your TV card- to catch messages (and perform your bidding) it sends itself when the remote control is invoked. If so, you could try using Spy++ to see what messages are being sent when certain buttons are pressed for starters. But it can also be that that certain program will only respond to certain remote-keyhits when an application it knows about is running and responds to these, that's why your commands work only when you TV program is running. What is that proggie you are hooking into?

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

        M Offline
        M Offline
        mk_4
        wrote on last edited by
        #3

        hmm.. the program, I have made, sets a global hook (so I used DLL) which "probably" catch all messages, before any other application receive them, and when the message has a WM_USER parameter then on the screen is displayed a Message Box. If I don't press "OK" button, the message won't be passed to it's destination app. I'm new to the C++ and WinApi, so this is how I think it works due to things that have happend when I've launched it and pressed some button on remote control. And it looks to my that, when I press other buttons, than TV and FM, messages aren't generated by OS, drivers or some other programes connected with my TV card. And the program, I'am hooking into is WinFast Wizard. Probably there is some other application that receives all signals from my remote control, but if so, then I don't know how it's called like. And about Spy++ (I've had no idea that something like this exists, so thank you for advice).... I'am using DevC++, and as I know from the msdn site the spy++ is a part of Visual C++. I've got somewhere 2008 Express Edition but is Spy++ in there too?. I didn't see any information about it, that's why I ask.

        modified on Friday, January 23, 2009 4:24 PM

        C 1 Reply Last reply
        0
        • M mk_4

          hmm.. the program, I have made, sets a global hook (so I used DLL) which "probably" catch all messages, before any other application receive them, and when the message has a WM_USER parameter then on the screen is displayed a Message Box. If I don't press "OK" button, the message won't be passed to it's destination app. I'm new to the C++ and WinApi, so this is how I think it works due to things that have happend when I've launched it and pressed some button on remote control. And it looks to my that, when I press other buttons, than TV and FM, messages aren't generated by OS, drivers or some other programes connected with my TV card. And the program, I'am hooking into is WinFast Wizard. Probably there is some other application that receives all signals from my remote control, but if so, then I don't know how it's called like. And about Spy++ (I've had no idea that something like this exists, so thank you for advice).... I'am using DevC++, and as I know from the msdn site the spy++ is a part of Visual C++. I've got somewhere 2008 Express Edition but is Spy++ in there too?. I didn't see any information about it, that's why I ask.

          modified on Friday, January 23, 2009 4:24 PM

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #4

          Well, if controlling applications is all you want to do then -if i were you- i'd look for some already written application to achieve it, like this[^], there are usually tonns of apps like that to allow you control. No use reinventing the wheel.

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

          M 1 Reply Last reply
          0
          • C Code o mat

            Well, if controlling applications is all you want to do then -if i were you- i'd look for some already written application to achieve it, like this[^], there are usually tonns of apps like that to allow you control. No use reinventing the wheel.

            > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

            M Offline
            M Offline
            mk_4
            wrote on last edited by
            #5

            Thanks, this application does almost exactly that what I wanted my app for, but anyway I want to write my own program. If I make it, I will have a satisfaction, useful program which looks and behave as I want to, and I will learn something new. That is why I didn't look for already written apps. So, I will keep trying. One more time thank you for help, I'm sure that spy++ will be helpful (if I get it somehow) and in case of failure I can use the application you pointed to.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups