In a doc/view project using VS2008, a MFCMenuBar seems to load the correct MENU resource (IDR_MAINFRAME) from the project, since adding and removing menu items is reflected in the menu's UI. It even appends the accelerators to the default menu items (e.g. Ctrl+O to the Open... item). However, the accelerator table (IDR_MAINFRAME) doesn't seem to be connected to the menu. Changing the default Ctrl+O for Open... to something like Ctrl+7 doesn't work. The Ctrl+O is still appended to the Open... menu item, and Ctrl+O still invokes the Open... handler. There is only one accelerator table in the resource file, so I have no idea where the CMFCMenuBar is getting its accelerator information.
At this point, I've been able to get the accelerators to work by manually loading the IDR_MAINFRAME accelerator table and translating messages myself. But the CMFCMenuBar is still appending the default accelerators.
Can anyone explain what is going on here? How can I force the MFCMenuBar to utilize my accelerator table and either not append the accelerators or append the correct accelerators?