D
David Thielen
Hi;
I am working on intercepting Word's message pump to determine when the user
clicks on a menu so I can enable/disable items in the drop down menu. (I'll
post the code once I get it working.)
I am intercepting the pump using NativeWindow. And I can get the OpusApp
window handle. But here is where I am hitting a problem.
The OpusApp window gets no specific messages as the menu is first clicked.
It gets a WM_PARENTNOTIFY (WM_LBUTTONDOWN) when it is clicked with the mouse
- but that message is fired a lot. And it gets a WM_ENTERIDLE if it's poped
up with ALT-T (Tools menu) but that fires after the menu is displayed.
I then looked at the menu child window. It gets a WM_CAPTURECHANGED message
when the menu is clicked on or accessed via ALT-T. So this will work. But is
this the best way to do this?
And if so, will this window always have a caption of "Menu Bar", even in non
English versions of Word? And a class of MsoCommandBar? And does this hold
back to Word 2000?
Also, I thought there was a WM_ message when a menu was about to be dropped
down. But I can't find it in the WM_ list of messages and I can't find a
window firing a message like this.
??? - thanks - dave
I am working on intercepting Word's message pump to determine when the user
clicks on a menu so I can enable/disable items in the drop down menu. (I'll
post the code once I get it working.)
I am intercepting the pump using NativeWindow. And I can get the OpusApp
window handle. But here is where I am hitting a problem.
The OpusApp window gets no specific messages as the menu is first clicked.
It gets a WM_PARENTNOTIFY (WM_LBUTTONDOWN) when it is clicked with the mouse
- but that message is fired a lot. And it gets a WM_ENTERIDLE if it's poped
up with ALT-T (Tools menu) but that fires after the menu is displayed.
I then looked at the menu child window. It gets a WM_CAPTURECHANGED message
when the menu is clicked on or accessed via ALT-T. So this will work. But is
this the best way to do this?
And if so, will this window always have a caption of "Menu Bar", even in non
English versions of Word? And a class of MsoCommandBar? And does this hold
back to Word 2000?
Also, I thought there was a WM_ message when a menu was about to be dropped
down. But I can't find it in the WM_ list of messages and I can't find a
window firing a message like this.
??? - thanks - dave