SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

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.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-25-2003, 01:33 AM
esc67 esc67 is offline
Sage User
 
Join Date: Nov 2003
Posts: 5
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
Reply With Quote
  #2  
Old 11-25-2003, 03:33 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
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
Reply With Quote
  #3  
Old 11-25-2003, 03:51 PM
LostInSpace LostInSpace is offline
Sage Advanced User
 
Join Date: Oct 2003
Location: Brussels (Belgium)
Posts: 186
Hi,

Can someone give an explaination about the parameters used with sendmessage? just to undertand what I'm doing ;-)

thanks

Ferdinand
Reply With Quote
  #4  
Old 11-25-2003, 04:50 PM
esc67 esc67 is offline
Sage User
 
Join Date: Nov 2003
Posts: 5
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
Reply With Quote
  #5  
Old 11-25-2003, 08:25 PM
esc67 esc67 is offline
Sage User
 
Join Date: Nov 2003
Posts: 5
Quote:
Originally posted by nielm

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);
Ah! That was my problem. Thank you, it works!

-Erik
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.