在VC6.0中能不能使用Duilib界面库呢?
2016-01-27 18:32
411 查看
Duilib库的源代码是在vs2010下编译的,一般适用于vs2008及以上的版本开发使用,那么duilib能不能在vc6.0的工程中使用呢?如何在vc6.0中使用duilib库呢? 今天,由于工作要求,需要在vc6.0下使用duilib库,百度了很久,未果,所以自己来尝试了一下! 1、在vc6.0中,新建一个MFC对话框工程,我用的是mfc对话框,习惯这么用。 2、将Duilib头文件及lib引用库拷贝到工程目录,引用进去。 3、新建duidlg类,这个类是自己定义的,对应这duilib里的窗口类。 编译! 发现会有一些bug! 主要错误是对“gdiplus.h”的错误,即未找到头文件 :gdiplus.h 。 gdiplus.h : No such file or directory这是因为在vs2008版本以上,自动集成了windows sdk,里面包含了gdi相关的头文件,在vs2003及vc6.0等低版本中,要使用的话,就得自己下sdk安装使用了。所以,到网上下了 GDiplus 的开发sdk文件。添加到工程,编译使用。 提示错误: e:\code\duilibinvc6\duilib\control\uiwebbrowser.h(76) : error C2061: syntax error : identifier '__RPC__out' e:\code\duilibinvc6\duilib\control\uiwebbrowser.h(77) : error C2061: syntax error : identifier '__RPC__deref_out_opt' e:\code\duilibinvc6\duilib\control\uiwebbrowser.h(78) : error C2061: syntax error : identifier '__RPC__in' e:\code\duilibinvc6\duilib\control\uiwebbrowser.h(102) : error C2061: syntax error : identifier '__RPC__in_opt' e:\code\duilibinvc6\duilib\control\uiwebbrowser.h(103) : error C2061: syntax error : identifier '__RPC__in_opt' 查看了下,这是在"uilib.h"头文件中,引用了 #include "Control/UIWebBrowser.h" 浏览器控件支持的头文件造成的,直接注释掉这行,因为我的代码中没用到。 如果你要使用,自己添加自定义就行了。 再编译,ok!可以了! 这里,贴上我的工程,只是对duilib的使用,一个简单的在VC6.0下,MFC使用duilib的例子而已。 demo截图: vc6.0的界面很熟悉吧! 源码下载: GDI开发sdk下载:GDiplus.zip 源码下载:http://download.csdn.net/detail/feb_li/9343769+ |
相关文章推荐
- iOS UILabel、UIButton文字竖排显示
- Swagger-UI的配置与使用
- MUI - 图片预览(perviewimage)的优化
- 37 sensor kit. Arduino
- 【树】Unique Binary Search Trees
- 96. Unique Binary Search Trees && 95. Unique Binary Search Trees II
- Arduino Garden Controller - Automatic Watering and Data Logging
- Arduino based plant watering system using Soil Moisture Sensors
- 2、vuejs五脏
- hdu1121 Complete the Sequence
- HDU 4836 The Query on the Tree lca || 欧拉序列 || 动态树
- PIR Motion Sensor with Arduino
- 1,安装
- 关于UIView的autoresizingMask属性的研究【转】
- leetcode62-Unique Paths
- iOS-值对象NSValue介绍
- [转]SQL SERVER – Find Most Expensive Queries Using DMV
- 引导界面微场景交互设计与技术实现V2.0
- How to control your dust collection with an Arduino (it's easy)
- Arduino started (video)