Using Visual Studio 2008.
Recently found our QAT context menu was showing images on the standard QAT menu buttons:
"Customize Quick Access Toolbar..."
"Show Quick Access Toolbar Above/Below The Ribbon"
"Minimize the Ribbon"
etc.
After digging through the code, found out it was due to those buttons having hardcoded command id values
in afxribbonbar.cpp, CMFCRibbonBar::OnShowRibbonContextMenu()
const UINT idCustomize = (UINT) -102;
const UINT idQATOnBottom = (UINT) -103;
const UINT idQATOnTop = (UINT) -104;
const UINT idAddToQAT = (UINT) -105;
const UINT idRemoveFromQAT = (UINT) -106;
const UINT idMinimize = (UINT) -107;
const UINT idRestore = (UINT) -108;
Normally that would be ok, except that there's other Microsoft code that creates ribbon button structures for
the collapsed panel buttons that can occur when a ribbon panel is collapsed or you add a panel to the QAT toolbar.
The code uses negative command id values for those created 'buttons', which I'm assuming start at -1 or so.
Our code has a bunch of ribbon categories and panels (probably over 100), so at some point, it must have created
these collapsed buttons in the background with command ids -102, -103, etc. So when OnShowRibbonContextMenu
displays the QAT context menu, the ribbon code eventually gets to looking to see if an image should be displayed on
the buttons, and finds these collapsed button structures instead, and plops their images on the QAT menu!
I created a sample project to show this issue and uploaded it to my public space on onedrive.live.com,
but it won't let me paste a link here yet.... "Body text cannot contain images or links until we are able to verify your account."
File is named: MFCRibbonAppQATMenuButtonImage.rar
Launch the application, then right click on the QAT toolbar or any ribbon button, and you will see the images.