您的位置:首页 > 产品设计 > UI/UE

20160531 VS2013编译duilibv1.1,“找不到Riched20.lib”的问题

2016-05-31 13:44 615 查看
1、打开DuiLib工程的属性页,进入“链接器” - “输入”选项界面。

2、删除Debug/Release/UnicodeDebug/UnicodeRelease几个配置中,“附加依赖项”中的“Riched20.lib”(如图1)。 


/

3、打开UIRichEdit.cpp定位到如下源代码:

// Create Text Services component
if(FAILED(CreateTextServices(NULL, this, &pUnk)))
goto err;

4、将该段代码修改为如下内容:

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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: