NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 9 10 11 12 13 … 93 Next »
PostMessage

 
  • 0 Vote(s) - 0 Average
PostMessage
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#1
2012-06-07, 03:15 AM
In a recent post you drew my attention to this feature

- added support for control via PostMessage id=0x8007, wparam set to the keycode you want to send.

This seems safer than sending keystrokes. How does this work to the NMT? I cannot find the hWnd to use in the call, either by the process or via a plugin in the application.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,394
Threads: 741
Joined: Nov 2003
#2
2012-06-07, 05:43 AM
I just looked into it, and that call is only relevant to PC frontend, not NMT/MVP.
bgowland
Offline

Posting Freak

Posts: 4,535
Threads: 376
Joined: Dec 2004
#3
2012-06-07, 07:07 AM
Martin - what are you trying to achieve? In other words, what is calling PostMessage and where does the message need to go?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#4
2012-06-08, 01:15 AM
I am revisiting some older code to allow wifi remote control of an NMT and a PC connected to the AVR and monitor. Wifi removes the need for line of sight and I get that with a mini wireless keyboards but that doesn't give me control from another room where I listen to a lot music.

I can get separate programs to remote control each of them today, but not one programs, and these "remote" would not have knowledge of what NextPVR is currently doing.

PostMessage() puts message into the Windows message queue from any "local" program that can get the programs window handle.

Martin.
bgowland
Offline

Posting Freak

Posts: 4,535
Threads: 376
Joined: Dec 2004
#5
2012-06-08, 02:39 AM
Quote:PostMessage() puts message into the Windows message queue from any "local" program that can get the programs window handle.
Yep, I get that bit - I've developed a number of Windows apps over the years which used various IPC calls. Smile

Quote:I am revisiting some older code to allow wifi remote control of an NMT and a PC connected to the AVR and monitor. Wifi removes the need for line of sight and I get that with a mini wireless keyboards but that doesn't give me control from another room where I listen to a lot music.

I can get separate programs to remote control each of them today, but not one programs, and these "remote" would not have knowledge of what NextPVR is currently doing.
Isn't it down to the user to have knowledge of what npvr is doing?

If, for example, you're looking at having a program which receives 'commands' (for want of a better word), and you want to pass a command to an instance of nextpvr which is running as an NMT server...if your 'command' program knows which nextpvr.exe process is serving NMT-XYZ and knows its hWnd and you personally (as the human end of the action) know it has MusicBox4 running, then it could work????
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#6
2012-06-08, 02:48 AM
bgowland Wrote:Isn't it down to the user to have knowledge of what npvr is doing?

I often have the TV off when listening to music and still might like to have art, now playing, next song, etc.

Quote:If, for example, you're looking at having a program which receives 'commands' (for want of a better word), and you want to pass a command to an instance of nextpvr which is running as an NMT server...if your 'command' program knows which nextpvr.exe process is serving NMT-XYZ and knows its hWnd and you personally (as the human end of the action) know it has MusicBox4 running, then it could work????

I can't get the hWnd of an NMT instance which is what this thread is about. My original design was custom control of MB4 running as a mini server in NextPVR but I hoped it could be more generic and move it outside.

Martin
bgowland
Offline

Posting Freak

Posts: 4,535
Threads: 376
Joined: Dec 2004
#7
2012-06-08, 03:04 AM
mvallevand Wrote:I often have the TV off when listening to music and still might like to have art, now playing, next song, etc.
Sorry, but I don't get the bit about "art.....". But aside from that, if you know an NMT in the kitchen (for example) is connected to a nextpvr.exe instance with MusicBox active, why would it matter if the TV is off?

Quote:I can't get the hWnd of an NMT instance which is what this thread is about.
Hmmm, OK, possibly....perhaps I'm wrong but I always understood that even if a process is run as 'hidden' it has an hWnd through inheritance. But that's based purely on my understanding that NMT server instances of nextpvr.exe are basically hidden versions of what we normally see when starting the nextpvr.exe UI version. Perhaps hidden processes have a null hWnd. Not sure.
bgowland
Offline

Posting Freak

Posts: 4,535
Threads: 376
Joined: Dec 2004
#8
2012-06-08, 03:16 AM
This is my NMT server instance of NextPVR.exe. Don't know if that helps.

[ATTACHMENT NOT FOUND]

WinSpy++
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#9
2012-06-08, 03:27 AM
bgowland Wrote:Sorry, but I don't get the bit about "art.....". But aside from that, if you know an NMT in the kitchen (for example) is connected to a nextpvr.exe instance with MusicBox active, why would it matter if the TV is off?

That was replying to your comment "Isn't it down to the user to have knowledge of what npvr is doing?" Sometimes you don't know what it is doing, but you still want to use the remote. Art - I still like to view the cover of the albums I have.

I will try again to see if I can get the handle from a plugin.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#10
2012-06-08, 04:06 AM
bgowland Wrote:This is my NMT server instance of NextPVR.exe. Don't know if that helps.

One of the things I tried yesterday was

hWnd = FindWindow("WindowsForms10.Window.8.app.0.33c0d9d", "MVP Server");

and it gets the same as the spied value, but using it for PostMessage doesn't work;

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  PostMessage() / IR32 No-Focus compatibility HydroChronic 1 1,223 2007-07-25, 06:36 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode