后来因为其他程序需要,改成#define WINVER 0x0501,结果菜单里面的图标就没了,菜单的背景也都变成了系统的灰色

经过痛苦的查找,终于在atlctrlw.h里面找到一点线索
// Define _WTL_CMDBAR_VISTA_MENUS as 0 to exclude Vista menus support
#if !defined(_WTL_CMDBAR_VISTA_MENUS) && (WINVER >= 0x0500) && (_WIN32_WINNT >= 0x0501) && (_WIN32_IE >= 0x0501)
#define _WTL_CMDBAR_VISTA_MENUS 1
#endif
于是在头文件增加
#define _WTL_CMDBAR_VISTA_MENUS 0 // Currently we have a drawing issue for user-defined bitmap
搞定!