VS2008下配置WTL开发环境

本文详细介绍如何在VS2008环境下配置并使用WTL进行开发,包括安装步骤、配置方法及使用类向导创建对话框应用程序等关键流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

     为了在VS2008下使用WTL,我们首先要安装好VS2008和WTL80,我们可以通过修改WTL80的安装向导将其安装在VS2008中,其次安装WTL的开发工具VisualFC,VFC提供了WTL的类向导功能。

     VS2008下载:我使用是VS2008VSTS的90天试用版,可以从微软主站下载,地址为:vs2008vsts

     WTL80下载:可以从http://www.sf.net下载,下载地址为:wtl80

     VisualFC下载:可以从http://code.google.com/p/visualfc/下载。

                            vfc0.71bin下载地址为:vfc_0.71bin.

                           vfc0.71的VS2008插件下载地址为:vs2008addin

    第一步、安装VS80,我在安装.net3.5时遇到问题,后来连网安装正常。

    第二步、安装WTL80,将WTL80解压至c:/wtl80目录。将c:/wtl80/appwiz/setup80.js复制为setup90.js,用记事本打开setup90.js,打开编辑菜单中的替换命令,将8.0全部替换为9.0后保存。运行setup90.js即可将WTL80的应用程序向导安装至VS2008中。打末VS2008,选择Tools->Options->Projects and Solutions->VC++ Directories,在include中将c:/wtl80/include加入。

   第三步、安装VisualFC,将vfc_0.71bin解压至c:/visualfc目录,将vs2008addin解压至c:/visualfc/bin目录中,运行regvs2005.bin注册FreeCode2005.dll文件,编辑installvs2008.reg文件,将其中的"SatelliteDLLPath"="c://VisualFC//bin"改为你自己机器上的实际目录,运行installvs2008.reg文件将安装VisualFC插件至VS2008开发环境中。为了使用VFC的对话框字体设计功能,可以将c:/visualfc/bin/vfcfonts.h复制至c:/wtl80/include目录中。

   第四步,打开VS2008,新建项目,应该可以看到WTL/ATL Applicaton Wizard了。我们选择一个对话框应用程序,点击Tool中的VFC_WTL即可以使用WTL的类向导为WTL应用程序添加各种功能了。

附图:在VS2008使用WTL的应用程序向导

附图:在VS2008中使用WTL的类向导VisualFC

 

 

WTL版本为v9.0 (build 4060 @ 3-1-2014),并做了以下的改动: 1. 编辑了.rc文件,使控件具有原生的中文字符支持 2. 增加了UICC及VS2010安装脚本(环境变量添加,UICC拷贝及.props文件路径添加),在SDK v7.0A的v100工具链下也可以编译.xml文件并使用ribbon, 脚本执行后默认工程可自动包含WTL include 目录。 3. 美化了.ico图标和toolbar.bmp,新图标和位图具有Alpha通道。 4. 为winCE和winMobile添加setup100.js安装文件,使其支持VS2010。 5. VS2010外其它平台需要手工修改InstallWTL.bat。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Changes ======================================== 1. Add InstallWTL.bat and 'setup100.js'(for CE & Mobile) 2. Add 'uicc' for ribbon compilation. 3. Replace the old icon and bitmap resources. 4. Modify 'rc' file to use default 'Chinese (Simplified)' resources. About the Files Added ======================================== a> IntallWTL.bat (must be runned as administrator; install in current folder) O- Create environment variable 'WTL_INC', integrating it into the include directory of VS2010 default project. O- Place 'uicc.exe' into 'Windows SDK 7.0A' folder. O- Execute setup.js & setup100.js. b> uicc.exe (dispense the need for installing 'Windows SDK 7.1' on visual studio 2010) O- Extracted from 'Windows SDK 7.1' O- Enable 'Ribbon' compilation using VS2010 'v100' platform toolset. Issues (Questions & Answers) ======================================== Q: Error in 'VS2010' saying “An error has occurred in the script on the page" A: This is a security problem. The wizard files are marked as unsecure. Solution: compress the wtl zip, unzip it (e.g. 7zip) and install the AppWiz again. Do not copy & paste the "*.js" files to the new destination. This will mark the file as unsecure. You see this with right-click properties on the file. At the bottom of the first page you see “The file came from another computer. Access is blocked possibly for security reasons”.
评论 16
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值