最近在升级一个工程,将VC6.0升级到VS2010,希望将菜单替换为Ribbon。由于工程使用了第三方插件,所以需要使用静态共享以及MTd。但是发现Ribbon创建失败,在动态共享模式以及MDD 可以编译通过,跪求各位大神帮助,怎么修改才能在MTD下使用Ribbon。
网盘是失败的案例(静态共享以及MTd)。附上几张截图
【工程目录】https://pan.baidu.com/s/1lqaN9501aZECGIDA6NGXeg
【图1静态共享以及MTd配置Ribbon创建失败】
【图2动态共享以及MDd配置Ribbon创建成功】
看了对比了一下,应该是.rc文件中不对
把这个加上:
#if !defined(_AFXDLL)
#include "afxribbon.rc" // MFC ribbon and control bar resources
#endif
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
#ifdef _WIN32
LANGUAGE 4, 2
#pragma code_page(936)
#endif //_WIN32
#include "res\Test2.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#include "afxprint.rc" // printing/print preview resources
#if !defined(_AFXDLL)
#include "afxribbon.rc" // MFC ribbon and control bar resources
#endif
#endif