![]() |
|
SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.) |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
using Win32 SendMessage call
By reading Girder GML files it appears to me that SageView can handle old-style windows messages using the Win32 ::SendMessage API.
Further, I've seen a complete list of "commands" posted on this site. However, I don't know what parameters to use for: message wParam lParam "SageTV 1.01.GML" has "1258 1 6" for the Pause command, but nothing happens if I try: ::SendMessage(hWnd, 1258, 1, 6); I've also tried: ::SendMessage(hWnd, WM_COMMAND, 6, 0); ::SendMessage(hWnd, WM_APP, 6, 0); Can somebody help me with this? -Erik |
#2
|
||||
|
||||
It does work -- I use these codes as arguments to PostMessage in my ATI remote wonder plugin.
One thing to note: hWnd needs to be the handle of the Application Class, not the top-level window, ie: HWND hSageTV = FindWindow("SageApp", NULL); if ( hSageTV != NULL ) SendMessage(hSageTV, 1258,1,6); Note also that the last parameter of the SendMessage command matches the index of the command in the list in the detailed properties / Commands dialog, so you can extrapolate to get commands not defined in the GML file, eg: -- Aspect Ratio Fill = 1258 1 47 -- Aspect Ratio 4x3= 1258 1 48 -- Aspect Ratio 16x9 = 1258 1 49 |
#3
|
|||
|
|||
Hi,
Can someone give an explaination about the parameters used with sendmessage? just to undertand what I'm doing ;-) thanks Ferdinand |
#4
|
|||
|
|||
The first parameter is "message = 2315", which makes it a Window message in the WM_USER range. See the following link for details:
http://msdn.microsoft.com/library/de...es/WM_USER.asp SageTV apparently picked that as the magic number to identify the message as a control message. wParam and lParam are paremeters whose purpose is defined by SageTV. I don't know why wParam is 1 and I don't know what would happen if you picked another number. Would 2 mean the button gets "pushed" twice? -Erik |
#5
|
|||
|
|||
Quote:
-Erik |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|