Re: How to show File menu
Quote:
Originally Posted by
robertpantangco
I would like to application to deactivate the active child window and then show the File menu as if the alt-F key was pressed from the keyboard.
Maybe you'll just use SendInput to send alt-F keys?
Re: How to show File menu
Quote:
Originally Posted by
robertpantangco
I have tried CMenu *pMenu=AfxGetMainWnd()->GetMenu();
but this does not display the menu at all.
Of course it doesn't. GetMenu just returns menu object to let you start working with the one. To show its Files submenu you need to call GetSubMenu (File menu has 0 index) and then TrackPopupMenu for the obtained submenu object.