Help needed for Dynamic Menu Insertion using MFC/VC/SDK

Hi ,

I have a problem, and I would appreciate if you would help.

I am not able to dynamically insert my menu into any MS Office 97 products like MS Word 97, Excel 97, etc. The problem is described below :

Find all the windows at any point in time under NT environment.
Get the window handles for all windows which are used as editors (Notepad, MS Word, MS Excel, MS Powerpoint... etc).
Insert Menus dynamically into these windows.

I am able to get the handles to the windows, and i am even able to insert my menu into Notepad, and MS Word 6.0, but it fails for all MS Office 97 onwards products.

Could you please tell me where I am going wrong or is my approach to be changed??

Please tell me any other way in which I can achieve dynamic menu insertion into MS Office 97 Applications, after they have been invoked by a user?? I have an idea that MS Office 97 products use "Custom Menu Classes" but I do not have any idea what that is, and how to get a handle to these classes.

It is very important. Please let me know about anything useful.
vimalkaulAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tommy HuiEngineerCommented:
Sorry, but you will not be able to get a handle (HMENU) for any of the newer Office applications. The reason is if you closely at the application, the "menu" exists in a toolbar. It is not a standard menu and hence you will not be able to get an HMENU to it. A better bet would be to create an add-in that is loaded by the applications and will listen to commands. With add-ins you can modify the menus to your desire.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vimalkaulAuthor Commented:
Thanks a lot because I have been breaking my head on this issue for over a week now.

Can I ask another favour???

I haven't built any add-in earlier and I have to follow a schedule. Could you please give me an example with code?? I will be very grateful.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.