duilib踩坑记录

duilib官方 https://github.com/duilib/duilib 

duilib他人扩展 https://github.com/qdtroy/DuiLib_Ultimate

关于两者的对比 https://www.zhaokeli.com/article/8224.html

贴近官方版,并更改了很多bug https://github.com/juhuaguai/duilib

腾讯云通信消息服务SDK(DuiLib_Ultimate) https://github.com/tencentyun/TIMSDK/tree/master/cross-platform/Windows/IMApp/Basic/duilib?tdsourcetag=s_pcqq_aiomsg

网易云信Windows应用界面开发框架 https://github.com/netease-im/NIM_Duilib_Framework

 

duilib官方文档较少,网上找了些资料,总结下

 alberl写过的 duilib入门简明教程 (推荐,本人小白一枚,跟着这个教程一步步做也算是了解了个大概) 和 duilib进阶教程

https://blog.csdn.net/zhuhongshu/article/details/43816875(暂时未看,内含博主自己维护的duilib库连接,博主博客内也有很多资料)

https://www.cnblogs.com/redrainblog/category/636556.html(暂时未看,内含博主自己维护的duilib库连接,有仿酷狗音乐播放器)

 

如果能把demo认真学好,再理解控件和布局的用法,就可以开始使用duilib了。不过如果想用好duilib,那么阅读并且修改duilib的源码是必不可少的,因为duilib存在不少的bug,我博客的其他博文描述过一部分bug的修复,否则在使用duilib的时候出现了问题可能都找不到原因。怎么学习duilib的源码我就不说了,一共3万多行代码,只要愿意去读那就不是难事。 --------------------- 本文来自 Redrain 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/zhuhongshu/article/details/43816875?utm_source=copy

 

2018年9月21日16:15:04

在使用官方库时遇到些问题。。。

1 、error LNK2019: 无法解析的外部符号 “public: virtual __thiscall CWndShadow::~CWndShadow(void) 这是因为新版的DuiLib新增了两个文件但DuiLib.vcproj中忘记添加了导致,我们分别将DuiLib\Utils\WndShadow.h和DuiLib\Utils\WndShadow.cpp添加到工程中,再重新生成就OK了

2、UIGifAnim.cpp 编码需要修改

                              

2018年12月20日17:32:02

2018年12月24日14:50:28

list在实现动态添加成员后滚动条自动滚动到底部时,需要设置定时器才能成功,原因示例

2019年7月16日15:26:42

DuiLib_Ultimate版本

1.WindowImplBase类中

MessageHandler 继承自IMessageFilterUI类,在MessageLoop->CPaintManagerUI::TranslateMessage->CPaintManagerUI::PreMessageHandler中被调用。

HandleMessage 继承自CWindowWnd类,在CWindowWnd::__WndProc中被调用。

HandleCustomMessage 定义在WindowImplBase中,被WindowImplBase::HandleMessage调用

2.CPaintManagerUI类中

MessageHandler 定义在CPaintManagerUI中,被WindowImplBase::HandleMessage调用

总结:

只有继承自IMessageFilterUI类的MessageHandler为消息过滤器,参数bHandled为true则不下发消息,其余为消息处理。

参考

2019年7月16日15:48:30

WindowImplBase::Notify 继承自INotifyUI类(Listener interface)

posted @ 2018-09-21 16:16  嘿.嘿.嘿  阅读(3115)  评论(0编辑  收藏  举报