wm_messages

Nik

2011-06-27 15:34:51

Hi all,
I been using MT Pro (mostly for doing midi conversions) for a couple of years now and I think it's really great software.
I am currently trying to get to grips with using wm_messages. I'm using Winspector to help me with this.
The problem I'm having is this - if I send a wm_message to the parent window of an application it gets posted no problem. But if I try to send a wm_message directly to a child window it won't send. In the MT Log it says "Error sending Windows message : could not get HWND". I'm using the "Match by class" option, and specifying the class name exactly. Like I said, it works great for parent windows, but not for child windows.
Any idea what I might be doing wrong ?

Nik

2011-07-04 17:05:46

Any chance I could get a response here.....I still can't get it to work. I've also tried "match by title" but it only seems to work for parent windows. Is it just not possible to send messages to child windows or am I doing something wrong ?

florian

2011-07-10 14:17:58

Hi Nik,

it sounds as if you know what you're doing, so maybe it is not possible like that to specify a child window.
If no title is given, or a title is given with "equal" match, the FindWindow() function is used to find the window by either class name or title or both.

If you specify a title and choose "substring", "beginning", or "end", a custom Midi Translator function is used to find the window. So maybe you have better luck by specifying the class name and a substring of the title, one character is enough, as long as it appears in the title of the targeted window...

Let me know...
Florian

Nik

2011-07-14 16:39:55

I tried your suggestion but it still can't seem to find the window. I'm starting to think that it might be because the application I'm trying to control is an MDI application. The application is Cubase and I'm using Winspector to get the class names. I can see the main parent window is called "CubaseFrameWindowClass", and inside this is "MDIClient", and inside this is "SteinbergMDIWindowClass" which is basically the Cubase project window and is the one I am trying to send the message to. Any thoughts on this ?
BTW - According to Microsoft, the FindWindow() function does not search child windows and they suggest using the FindWindowEx() function instead for searching child windows. Maybe this is the answer....I don't know, but either way do you think it might be possible to address this issue in a future update ?

florian

2011-07-28 14:19:42

Hi, thanks for the update. I'm writing this down as a ToDo, child windows should be supported, too.

Regards,
Florian