The bitmap you pass to the menu item is getting leaked every time the menu is invoked in explorer. Please move the HBITMAP to a class member of CMPCBEContextMenu, create it once in the constructor or on demand, and then call DeleteObject on it in the destructor.
The bitmaps returned from TransparentBMP are leaked.
SetMenuItemBitmaps(hmenu, indexMenu, MF_BYPOSITION, TransparentBMP(m_hPlayBmp), NULL);
SetMenuItemBitmaps(hmenu, indexMenu, MF_BYPOSITION, TransparentBMP(m_hAddBmp), NULL);
The bitmap you pass to the menu item is getting leaked every time the menu is invoked in explorer. Please move the HBITMAP to a class member of CMPCBEContextMenu, create it once in the constructor or on demand, and then call DeleteObject on it in the destructor.
The bitmaps returned from TransparentBMP are leaked.
SetMenuItemBitmaps(hmenu, indexMenu, MF_BYPOSITION, TransparentBMP(m_hPlayBmp), NULL);
SetMenuItemBitmaps(hmenu, indexMenu, MF_BYPOSITION, TransparentBMP(m_hAddBmp), NULL);