PDA

View Full Version : OSDMenu doesn't get messages from SendMessage



frdfsnlght
December 19th, 2002, 09:40 PM
I'm sure this is a stupid noob problem, but I can't figure it out. I've done some searches and came up empty.

I have a very simple OSDMenu which works via keyboard. I want to control it with IR so I'm using the SendMessage plugin to send WM_COMMANDs to OSDMenu, but OSDMenu doesn't respond. I'm following the instructions in the OSDMenu doc and targetting a window with class="OSDMenuWnd" and executable="girder.exe" (also tried "Girder.exe" since that's how it shows up in the target list. I'm trying to send a message with wparam=40002 (what to use for "Message Number" and "lparam"?) to move the menu selection down. OSDMenu happily ignores me.

I'm using Girder 3.2.6b, OSDMenu 1.6.4, and the SendMessage that came with Girder.

Any ideas why I'm so dense?

-Tab

mattwire
December 20th, 2002, 06:54 AM
It should work! :D

I know it sounds obvious but have you removed the quotes around the classname/executable?
ie class=OSDMenuWnd
executable=girder.exe

frdfsnlght
December 20th, 2002, 09:07 AM
Yes I have removed the quotes. I only included them here for "clarity".

I've attached a sample menu and GML file to illustrate. Use the backslash "\" to open the menu and the spacebar to move the selection down (or not, as the case may be). If you can point out anything I've done wrong, I'd be in your debt.

I'd also like to point out that there's an issue with the OSD sizing. The attached example also shows this. It appears the menu title width is not taken into account when using the "fit2text" setting for "wnd_size".

-Tab

frdfsnlght
December 21st, 2002, 10:49 PM
Well, I've now also tried the builtin Girder method for sending messages (didn't know it existed before) and it also doesn't work for me.

I've resorted to targetting the window and sending keyboard keys and that works, but it just doesn't seem right.

Is this a bug or am I just doing something wrong?

-Tab

mattwire
December 22nd, 2002, 08:51 AM
"Message Number" should be set to 273 for WM_COMMAND. lparam is 0. Your example works correctly on my machine when I do this.
Also, I can't see why you cant get girders built in message function to work. It works fine when I test it with your example. (eg. wparam=40002, lparam=0).
The "osdmenu sample.gml" includes an example of this which should work.

I'll have a look at the sizing issue.