DUILIB与MFC的结合
会产生Crect等冲突。
解决方法:
1:在stdafx.h中添加
#if USE(DuiLib)
#define CRect DuiLib::CRect
#define CPoint DuiLib::CPoint
#define CSize DuiLib::CSize
#else
#define CRect ::CRect
#define CPoint ::CPoint
#define CSize ::CSize
#endif
在用的地方定义DuiLib;例:afx_msg void OnMouseMove(UINT nFlags, ::CPoint point);
2:将duilib中的crect工程中全部改名Cduirect等。全工程替换。不过一分钟的事。
3:不在MFC中使用 using namespace Duilib 在使用duilib时都加上Duilib::CRect。
4:在dui相关代码中使用Duilib::CRect,在MFC代码中使用::CRect.
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。