M
Michi
Hi.
I'm trying to post a wm_command message to a control in a toolbar
(ToolbarWindow32) but don't get it done.
After getting the hanlde of the application I retrieve the handle of
the toolbar:
hwnd = (IntPtr)FindWindow("#1000", appTitle);
hwndChild = FindWindowEx((IntPtr)hwnd, IntPtr.Zero, "ToolbarWindow32",
null);
And then post the message like:
chk = PostMessage((int)hwndChild, WM_COMMAND, 7, 0);
(=> nothing happens in the application and chk is set to 1)
I used Winspector to check out the wParam (Control ID (7)), lParam
(Code (0)), the message (WM_COMMAND) and the toolbars handle. All
those seems to be correct.
Can you please give me a hint, what I'm overlooking?
Many thanks and kind regards.
Michi
I'm trying to post a wm_command message to a control in a toolbar
(ToolbarWindow32) but don't get it done.
After getting the hanlde of the application I retrieve the handle of
the toolbar:
hwnd = (IntPtr)FindWindow("#1000", appTitle);
hwndChild = FindWindowEx((IntPtr)hwnd, IntPtr.Zero, "ToolbarWindow32",
null);
And then post the message like:
chk = PostMessage((int)hwndChild, WM_COMMAND, 7, 0);
(=> nothing happens in the application and chk is set to 1)
I used Winspector to check out the wParam (Control ID (7)), lParam
(Code (0)), the message (WM_COMMAND) and the toolbars handle. All
those seems to be correct.
Can you please give me a hint, what I'm overlooking?
Many thanks and kind regards.
Michi