I am making a frontend application for an older windows application. Is is possible to get the handles of the menus somehow with the Windows API so that I can control some of the menu actions?

So if I clicked on a command button in my frontend, then it would click the "Preferences..." selection in the other windows application.

Please let me know if this is possible, and if it is, then how would I do this...

Thank you,

Simon Bingier