VS2013编译 Duilib & UIDesigner 遇到的问题汇总

1、报找不到 Riched20.lib

解决方法:

在工程属性->链接器中删除Riched20.lib;

在 UIRichedEidt.cpp 文件中找到

if(FAILED(CreateTextServices(NULL, this, &pUnk)))
        goto err;

 

修改为:

HINSTANCE richHandle = NULL;
typedef HRESULT  (_stdcall *_CTS)(
        IUnknown *punkOuter,
        ITextHost *pITextHost,
        IUnknown **ppUnk) ; 
_CTS CTS = NULL;
richHandle = LoadLibraryW(L"Riched20.dll");
if(richHandle == NULL)
    exit(0);
else
{
    CTS = (_CTS)GetProcAddress(richHandle, "CreateTextServices");
    if(NULL == CTS)
        exit(0);
}
// Create Text Services component
if(FAILED(CTS(NULL, this, &pUnk)))
    goto err;
FreeLibrary(richHandle);

 

2、找不到定义 CanAdjustLayout

解决办法:

在 ResourceView.cpp 中注释掉此行

if (CanAdjustLayout())

 

最后送上一个VS2013编译版的最新 UIDesigner

http://pan.baidu.com/s/18D55y