VS 2008 如何新建一个VC++.NET工程 ?

nokianasty 2010-10-18 11:10:21
我想在VS 2008中建一个VC++.NET的工程 ,这个工程有可见界面,可以拖放控件的,就像C#form窗体应用程序一样!

求救高手,小弟是初学者,不知道如何操作,望指教! 不胜感激!!


...全文
273 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
山书生 2010-10-27
  • 打赏
  • 举报
回复
just have a try~ :)
aloxy 2010-10-22
  • 打赏
  • 举报
回复
楼主这样的问题不应该在这里问,即使问了你也没什么意义,如果真心学习还是看看书或者网上搜个教程从0开始吧!
zzsimgongh 2010-10-20
  • 打赏
  • 举报
回复
MFC Win32 App - Dialog Based。
threenewbee 2010-10-20
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 nokianasty 的回复:]
大家注意了,我要新建的是C++.NET的工程 !不是MFC工程,我的VS2008是中文版的,有个Windows窗体应用程序,这个就是你们说的CLR Windows Forms App 了吧??
[/Quote]
对。
nokianasty 2010-10-20
  • 打赏
  • 举报
回复
大家注意了,我要新建的是C++.NET的工程 !不是MFC工程,我的VS2008是中文版的,有个Windows窗体应用程序,这个就是你们说的CLR Windows Forms App 了吧??
nokianasty 2010-10-20
  • 打赏
  • 举报
回复
顶顶,希望有详细点的确定点的说法
flyerwing 2010-10-18
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 caozhy 的回复:]
有2个选择:
MFC Win32 App - Dialog Based。//非托管的
CLR Windows Forms App。//托管的和C井一样
[/Quote]
自己想怎么搞都成.
threenewbee 2010-10-18
  • 打赏
  • 举报
回复
有2个选择:
MFC Win32 App - Dialog Based。
CLR Windows Forms App。
tanke1988 2010-10-18
  • 打赏
  • 举报
回复
新建项目里面选择C++,然后是CLR,在选FORM。就是你要的界面啦
WTL9.1-ReadMe-中英文对照版 Windows Template Library - WTL Version 9.1 (build 5270) 2015-09-27 Windows模板库 - WTL Version 9.1 (build 5270) 2015-09-27 (水平有限,不足之处,欢迎指正交流:ybmj@vip.163.com) ________________________________________ Copyright © 2015 Microsoft Corporation, WTL Team. All rights reserved. 微软公司WTL小组2015注册版权所有,Copyright © 2015。 This file is a part of the Windows Template Library. 该文档是WTL的一部分。 The use and distribution terms for this software are covered by the Microsoft Public License (http://opensource.org/licenses/MS-PL) which can be found in the file MS-PL.txt at the root folder. WTL的使用和分发受微软公共授权协议约束 (http://opensource.org/licenses/MS-PL),具体内容可以查看本发布根目录下的MS-PL.txt文件。 ________________________________________ Welcome to the Windows Template Library, version 9.1. This document contains the following topics: 欢迎使用Windows模板库WTL 9.1。该文档包含以下项目: • Introduction • WTL介绍 • Features and Installation • 功能和安装 • Packing List • 压缩包中的文件列表 • Class Overview • 类简介 • ATL/WTL AppWizard • ATL/WTL应用程序向导 • Support for Windows CE • Windows CE支持 • Support for Visual C++ Express • Visual C++ Express支持 • Notes • 说明 • Changes Between WTL 9.1 and 9.0 • WTL 9.1对9.0 的改变 • Changes Between WTL 9.0 and 8.0 • WTL 9.0对8.0的改变 • Changes Between WTL 8.0 and 7.5 • WTL 8.0对7.5的改变 • Changes Between WTL 7.5 and 7.1 • WTL 7.5对7.1的改变 • Changes Between WTL 7.1 and 7.0 • WTL 7.1对7.0的改变 • Changes Between WTL 7.0 and 3.1 • WTL 7.0对3.1的改变 • Changes Between WTL 3.1 and 3.0 • WTL 3.1对3.0的改变 Introduction WTL介绍 Windows Template Library, or WTL, is a set of classes that extend ATL to support more complex user interfaces for either applications or various UI components, while maintaining the big advantage of ATL - small and fast code. WTL classes were designed to be the best and the easiest way to implement rich Win32 based UI for ATL based applications, servers, components, and controls. WTL(Windows Template Library)是一种ATL扩展类库,它能为应用程序及各种控件提供更复杂的用户界面支持,同时保持ATL简洁快速的优点。WTL类库被设计为ATL实现广泛Win32用户界面的最简最优方式,支持各种应用程序、服务程序、组件和控件。 WTL provides support for implementing many user interface elements, from frame and popup windows, to MDI, standard and common controls, common dialogs, property sheets and pages, GDI objects, UI updating, scrollable windows, splitter windows, command bars, etc. The WTL classes are mostly templated and use minimal instance data and inline functions. They were not designed as a framework, so they do not force a particular application model, and can accommodate any. The classes do not use hooks or thread local storage, so they have no restrictions that those techniques impose. They also have no inter-dependencies and can be freely mixed with straight SDK code. In summary, WTL delivers very small and efficient code, very close in size and speed to SDK programs, while presenting a more logical, object oriented model to a programmer. WTL为众多用户界面元素提供支持,包括框架窗口和弹出窗口、MDI、标准和通用控件、通用对话框、属性表单和属性页、GDI对象、用户界面更新、可滚动窗口、分割窗口、命令条等等。WTL类尽量模板化,使用较少实例数据和较多内联函数。它们并非设计为一个框架,所以并不强制使用特殊应用模式,可以适应各种场合。这些类并未使用hooks(钩子程序)或线程本地存储技术,所以没有植入技术改进的限制。它们也不存在内部依赖性,可以自由地和SDK代码一起混合使用。总之,WTL提供最小最高效的代码,非常接近SDK的体积和速度,同时为程序员提供更强逻辑性和面向对象的特性。 Features and Installation 功能和安装 This is the eigth public release of WTL, after WTL 3.0, 3.1, 7.0, 7.1, 7.5, 8.0, and 9.0. This version is released under the Microsoft Public License, enabling developers from the WTL community to contribute to the library. WTL9.1是在3.0、3.1、7.0、7.1、7.5、8.0和9.0之后的第8个公开发布版本。这个版本基于微软公共授权协议,可以从WTL社区获取公共发布的WTL库进行授权开发。 WTL classes can be used with either VC++ 6.0, VC++ .NET 2002 or 2003, VC++ 2005 or 2008 or 2010 or 2012 or 2013 or 2015, or EVC++ 4.0 or 3.0. AppWizard for Visual Studio is included. WTL类库可以在下列开发环境中使用,VC++ 6.0,VC++ .NET 2002、2003,VC++ 2005、2008、2010、2012、2013、2015,以及EVC++ 3.0、4.0。WTL类库为Visual Studio提供应用程序向导组件。 The WTL classes are provided in header files located in the include directory. The only header files that must be included is atlapp.h, while others can be used when needed. The name of the file doesn't mean that you have to create an application, just that atlapp.h contains base definitions required for WTL projects. WTL类库以存放于include目录中的头文件的方式提供。只有atlapp.h是必须包含的头文件,其余头文件可按需包含引用。该文件的名称并非意味着你必须创建一个应用程序,atlapp.h只是包含了WTL所需的基本定义项目。 To install WTL, just copy the whole directory structure, or unpack the archive file, to the location of your choice. Please be sure to add the WTL\include directory to the list of include directories in VC++, so that the compiler can find them when you include them in your projects. 安装WTL,只需拷贝整个目录内容或解压所需文件到你所选定的路径。请务必在VC++环境中添加WTL的include包含目录,好让编译器能够找到你工程中的包含文件。 Setup programs for the AppWizard are provided. After executing the setup script, ATL/WTL AppWizard will appear in the list of AppWizards when you select File.New.Project in VC++ IDE. The file AppWiz\setup.js is the setup script for all supported versions of Visual Studio, while AppWizards for Windows CE have separate scripts for VS2005 and VS2008 SmartDevice projects. WTL安装包中提供了应用程序向导的安装程序。通过运行安装脚本,在VC++集成开发环境中从“文件|新建|工程”菜单新建项目时,在应用程序向导列表中将会出现ATL或WTL选项。AppWiz\setup.js文件是支持所有版本的Visual Studio的安装脚本。另外,WTL为支持Windows CE下VS2005、VS2008智能设备工程的应用程序向导,提供了单独的安装脚本。 To manually install AppWizard for VC++ .NET 2002/2003, copy all WTLAppWiz.* files from AppWiz\Files to VC++ .NET projects directory, %VC7DIR%\Vc7\vcprojects, where %VC7DIR% is the directory where VC++ .NET 2002/2003 is installed. After that, open WTLAppWiz.vsz and modify the like that contains ABSOLUTE_PATH to contain %WTLDIR%\AppWiz\Files, where %WTLDIR% is the directory where WTL files are. 要为VC++ .NET 2002/2003手工安装应用程序向导,可从AppWiz\Files目录拷贝所有WTLAppWiz.*文件到VC++ .NET工程目录%VC7DIR%\Vc7\vcprojects,%VC7DIR%是VC++ .NET 2002/2003的安装目录。然后,打开WTLAppWiz.vsz文件修改ABSOLUTE_PATH指向%WTLDIR%\AppWiz\Files,%WTLDIR%是WTL文件的存放目录。
WTL9.1-ReadMe-中英文对照版 Windows Template Library - WTL Version 9.1 (build 5270) 2015-09-27 Windows模板库 - WTL Version 9.1 (build 5270) 2015-09-27 (水平有限,不足之处,欢迎指正交流:ybmj@vip.163.com) ________________________________________ Copyright © 2015 Microsoft Corporation, WTL Team. All rights reserved. 微软公司WTL小组2015注册版权所有,Copyright © 2015。 This file is a part of the Windows Template Library. 该文档是WTL的一部分。 The use and distribution terms for this software are covered by the Microsoft Public License (http://opensource.org/licenses/MS-PL) which can be found in the file MS-PL.txt at the root folder. WTL的使用和分发受微软公共授权协议约束 (http://opensource.org/licenses/MS-PL),具体内容可以查看本发布根目录下的MS-PL.txt文件。 ________________________________________ Welcome to the Windows Template Library, version 9.1. This document contains the following topics: 欢迎使用Windows模板库WTL 9.1。该文档包含以下项目: • Introduction • WTL介绍 • Features and Installation • 功能和安装 • Packing List • 压缩包中的文件列表 • Class Overview • 类简介 • ATL/WTL AppWizard • ATL/WTL应用程序向导 • Support for Windows CE • Windows CE支持 • Support for Visual C++ Express • Visual C++ Express支持 • Notes • 说明 • Changes Between WTL 9.1 and 9.0 • WTL 9.1对9.0 的改变 • Changes Between WTL 9.0 and 8.0 • WTL 9.0对8.0的改变 • Changes Between WTL 8.0 and 7.5 • WTL 8.0对7.5的改变 • Changes Between WTL 7.5 and 7.1 • WTL 7.5对7.1的改变 • Changes Between WTL 7.1 and 7.0 • WTL 7.1对7.0的改变 • Changes Between WTL 7.0 and 3.1 • WTL 7.0对3.1的改变 • Changes Between WTL 3.1 and 3.0 • WTL 3.1对3.0的改变 Introduction WTL介绍 Windows Template Library, or WTL, is a set of classes that extend ATL to support more complex user interfaces for either applications or various UI components, while maintaining the big advantage of ATL - small and fast code. WTL classes were designed to be the best and the easiest way to implement rich Win32 based UI for ATL based applications, servers, components, and controls. WTL(Windows Template Library)是一种ATL扩展类库,它能为应用程序及各种控件提供更复杂的用户界面支持,同时保持ATL简洁快速的优点。WTL类库被设计为ATL实现广泛Win32用户界面的最简最优方式,支持各种应用程序、服务程序、组件和控件。 WTL provides support for implementing many user interface elements, from frame and popup windows, to MDI, standard and common controls, common dialogs, property sheets and pages, GDI objects, UI updating, scrollable windows, splitter windows, command bars, etc. The WTL classes are mostly templated and use minimal instance data and inline functions. They were not designed as a framework, so they do not force a particular application model, and can accommodate any. The classes do not use hooks or thread local storage, so they have no restrictions that those techniques impose. They also have no inter-dependencies and can be freely mixed with straight SDK code. In summary, WTL delivers very small and efficient code, very close in size and speed to SDK programs, while presenting a more logical, object oriented model to a programmer. WTL为众多用户界面元素提供支持,包括框架窗口和弹出窗口、MDI、标准和通用控件、通用对话框、属性表单和属性页、GDI对象、用户界面更新、可滚动窗口、分割窗口、命令条等等。WTL类尽量模板化,使用较少实例数据和较多内联函数。它们并非设计为一个框架,所以并不强制使用特殊应用模式,可以适应各种场合。这些类并未使用hooks(钩子程序)或线程本地存储技术,所以没有植入技术改进的限制。它们也不存在内部依赖性,可以自由地和SDK代码一起混合使用。总之,WTL提供最小最高效的代码,非常接近SDK的体积和速度,同时为程序员提供更强逻辑性和面向对象的特性。 Features and Installation 功能和安装 This is the eigth public release of WTL, after WTL 3.0, 3.1, 7.0, 7.1, 7.5, 8.0, and 9.0. This version is released under the Microsoft Public License, enabling developers from the WTL community to contribute to the library. WTL9.1是在3.0、3.1、7.0、7.1、7.5、8.0和9.0之后的第8个公开发布版本。这个版本基于微软公共授权协议,可以从WTL社区获取公共发布的WTL库进行授权开发。 WTL classes can be used with either VC++ 6.0, VC++ .NET 2002 or 2003, VC++ 2005 or 2008 or 2010 or 2012 or 2013 or 2015, or EVC++ 4.0 or 3.0. AppWizard for Visual Studio is included. WTL类库可以在下列开发环境中使用,VC++ 6.0,VC++ .NET 2002、2003,VC++ 2005、2008、2010、2012、2013、2015,以及EVC++ 3.0、4.0。WTL类库为Visual Studio提供应用程序向导组件。 The WTL classes are provided in header files located in the include directory. The only header files that must be included is atlapp.h, while others can be used when needed. The name of the file doesn't mean that you have to create an application, just that atlapp.h contains base definitions required for WTL projects. WTL类库以存放于include目录中的头文件的方式提供。只有atlapp.h是必须包含的头文件,其余头文件可按需包含引用。该文件的名称并非意味着你必须创建一个应用程序,atlapp.h只是包含了WTL所需的基本定义项目。 To install WTL, just copy the whole directory structure, or unpack the archive file, to the location of your choice. Please be sure to add the WTL\include directory to the list of include directories in VC++, so that the compiler can find them when you include them in your projects. 安装WTL,只需拷贝整个目录内容或解压所需文件到你所选定的路径。请务必在VC++环境中添加WTL的include包含目录,好让编译器能够找到你工程中的包含文件。 Setup programs for the AppWizard are provided. After executing the setup script, ATL/WTL AppWizard will appear in the list of AppWizards when you select File.New.Project in VC++ IDE. The file AppWiz\setup.js is the setup script for all supported versions of Visual Studio, while AppWizards for Windows CE have separate scripts for VS2005 and VS2008 SmartDevice projects. WTL安装包中提供了应用程序向导的安装程序。通过运行安装脚本,在VC++集成开发环境中从“文件|新建|工程”菜单新建项目时,在应用程序向导列表中将会出现ATL或WTL选项。AppWiz\setup.js文件是支持所有版本的Visual Studio的安装脚本。另外,WTL为支持Windows CE下VS2005、VS2008智能设备工程的应用程序向导,提供了单独的安装脚本。 To manually install AppWizard for VC++ .NET 2002/2003, copy all WTLAppWiz.* files from AppWiz\Files to VC++ .NET projects directory, %VC7DIR%\Vc7\vcprojects, where %VC7DIR% is the directory where VC++ .NET 2002/2003 is installed. After that, open WTLAppWiz.vsz and modify the like that contains ABSOLUTE_PATH to contain %WTLDIR%\AppWiz\Files, where %WTLDIR% is the directory where WTL files are. 要为VC++ .NET 2002/2003手工安装应用程序向导,可从AppWiz\Files目录拷贝所有WTLAppWiz.*文件到VC++ .NET工程目录%VC7DIR%\Vc7\vcprojects,%VC7DIR%是VC++ .NET 2002/2003的安装目录。然后,打开WTLAppWiz.vsz文件修改ABSOLUTE_PATH指向%WTLDIR%\AppWiz\Files,%WTLDIR%是WTL文件的存放目录。 Platform support and requirements: 支持和请求的平台: Compiler/IDE/ATL: 编译器、集成开发环境、ATL: Visual C++ 6.0 (ATL 3.0) Visual C++.NET 2002 (ATL 7.0) Visual C++.NET 2003 (ATL 7.1) Visual C++ 2005 (ATL 8.0) Visual C++ 2008 (ATL 9.0) Visual C++ 2010 (ATL 10.0) Visual C++ 2012 (ATL 11.0) Visual C++ 2013 (ATL 12.0) Visual C++ 2015 (ATL 14.0) SDK (optional): SDK(可选): Any Platform SDK from January 2000 release up to the latest Windows SDK 支持2000年1月及之后发布的所有平台下的Windows SDK。 Windows CE development: Windows CE开发: eMbedded Visual C++ 3.0 - Pocket PC, Pocket PC 2002 eMbedded Visual C++ 4.0 - STANDARDSDK_410, Pocket PC 2003, Smartphone 2003, STANDARDSDK_500, Pocket PC 2003 SE, Smartphone 2003 SE Visual C++ 2005 - Pocket PC 2003 SE, Smartphone 2003 SE, STANDARDSDK_500, Windows Mobile 5.0 (Pocket PC and Smartphone), Windows Mobile 6.0 (Standard and Professional) Visual C++ 2008 - Pocket PC 2003 SE, Smartphone 2003 SE, STANDARDSDK_500, Windows Mobile 5.0 (Pocket PC and Smartphone), Windows Mobile 6.0 (Standard and Professional)
目 录 第1篇 基础篇 第1章 数据库原理与访问. 2 1.1 数据库基本原理... 2 1.1.1 概述... 2 1.1.2 桌面数据库... 3 1.1.3 对象数据库... 3 1.1.4 关系数据库服务器... 5 1.1.5 选择适用的数据库... 5 1.2 数据库访问技术... 6 1.2.1 概述... 6 1.2.2 ODBC API 7 1.2.3 ODBC的MFC类... 7 1.2.4 DAO与RDO.. 8 1.2.5 OLE DB与ADO.. 9 1.3 数据库操纵语言SQL. 10 1.3.1 SQL命令... 10 1.3.2 SQL从句... 11 1.3.3 SQL运算符... 11 1.3.4 SQL合计函数... 11 1.4 小结... 12 第2章 COM与数据库访问. 13 2.1 COM的基本原理... 13 2.1.1 COM历史... 13 2.1.2 COM结构... 14 2.1.3 COM优势... 15 2.1.4 COM接口... 16 2.1.5 COM与数据库访问... 17 2.1.6 COM与Internet 17 2.2 ActiveX的数据库访问... 18 2.2.1 ActiveX简介... 18 2.2.2 ActiveX对数据库访问的支持... 18 2.3 ATL的数据库访问... 19 2.3.1 ATL目标... 19 2.3.2 ATL内容简介... 21 2.3.3 ATL对数据库访问的支持... 22 2.4 小结... 22 第3章 数据库开发过程. 23 3.1 阶段1:调查与分析... 23 3.2 阶段2:数据建模... 24 3.3 阶段3:功能设计... 24 3.4 阶段4:选择数据库系统... 25 3.5 阶段5:选择数据库访问技术... 25 3.6 阶段6:代码设计... 26 3.7 阶段7:测试与调试... 26 3.8 阶段8:发行产品... 26 第4章 VC++数据库开发基础. 27 4.1 VC++ 6.0工程创建向导... 27 4.2 VC++ 6.0数据库新建工具... 27 4.3 VC++ 6.0的数据库工程... 30 4.4 小结... 33 第2篇 实例篇 第5章 ODBC API编程. 35 5.1 了解ODBC API 35 5.2 ODBC API编程步骤... 36 5.2.1 步骤1:连接数据源... 36 5.2.2 步骤2:分配语句句柄... 38 5.2.3 步骤3:准备并执行SQL语句... 38 5.2.4 步骤4:获取结果集... 39 5.2.5 步骤5:提交事务... 41 5.2.6 步骤6:断开数据源连接并释放 环境句柄... 41 5.3 ODBC API编程实例... 41 5.3.1 实例概述... 41 5.3.2 实例实现过程... 42 5.3.3 编译并运行ODBCDemo1工程... 109 5.3.4 ODBCDemo1实例小结... 111 5.4 本章小结... 111 第6章 MFC ODBC编程. 112 6.1 了解MFC ODBC.. 112 6.1.1 CDatabase类... 112 6.1.2 CRecordSet类... 112 6.2 MFC ODBC数据库访问技术... 113 6.2.1 记录查询... 113 6.2.2 记录添加... 114 6.2.3 记录删除... 115 6.2.4 记录修改... 115 6.2.5 撤销数据库更新操作... 115 6.2.6 直接执行SQL语句... 115 6.2.7 MFC ODBC的数据库操作过程... 116 6.3 MFC ODBC编程实例... 116 6.3.1 实例概述... 116 6.3.2 实例实现过程... 117 6.3.3 编译并运行ODBCDemo2工程... 149 6.3.4 ODBCDemo2实例小结... 154 6.4 本章小结... 155 第7章 DAO数据库编程. 155 7.1 DAO的数据访问... 155 7.1.1 DAO对象... 155 7.1.2 MFC对DAO的支持... 156 7.1.3 DAO与ODBC的比较... 156 7.1.4 MFC的DAO类简介... 157 7.2 DAO编程实例... 160 7.2.1 实例概述... 160 7.2.2 实例实现过程... 161 7.2.3 运行DAODemo工程... 188 7.2.4 DAODemo实例小结... 193 7.3 小结... 193 第8章 OLE DB客户数据库编程. 194 8.1 OLE DB原理... 194 8.1.1 OLE DB与ODBC.. 194 8.1.2 OLE DB的结构... 194 8.1.3 OLE DB的优越性... 195 8.1.4 OLE DB对象... 195 8.1.5 OLE DB客户模板结构... 199 8.1.6 OLE DB客户模板类... 199 8.2 OLE DB客户数据库访问的两种途径.... 202 8.2.1 以MFC AppWizard(exe)为向导 建立OLE DB客户程序框架... 202 8.2.2 以ATL COM AppWizard为向导 建立OLE DB客户程序框架... 212 8.3 OLE DB客户应用程序编程实例... 217 8.3.1 实例概述... 217 8.3.2 实例实现过程... 218 8.3.3 编译并运行工程... 256 8.3.4 OLEDB_MFC实例小结... 261 8.4 小结... 261 第3篇 高级话题 第9章 ADO客户数据库编程. 262 9.1 ADO原理... 262 9.1.1 ADO与OLE DB.. 262 9.1.2 ADO的优越性... 263 9.1.3 ADO对象模型... 263 9.1.4 ADO编程... 266 9.2 ADO的数据库访问规范... 266 9.3 ADO数据库编程实例... 267 9.3.1 实例概述... 267 9.3.2 实例实现过程... 268 9.3.3 运行ADODemo工程... 299 9.3.4 ADODemo实例小结... 302 9.4 小结... 303 第10章 开发ADO数据库组件. 304 10.1 ADO组件概述... 304 10.1.1 COM组件原理... 304 10.1.2 ADO组件模型... 304 10.1.3 ADO组件同客户程序的协作... 306 10.2 ADO数据库组件开发实例... 307 10.2.1 实例概述... 307 10.2.2 实例实现过程... 307 10.2.3 编译工程... 327 10.3 编写组件的客户程序... 328 10.3.1 创建客户程序... 329 10.3.2 设计客户程序的界面... 330 10.3.3 编写测试代码... 330 10.3.4 ADOAccessor实例小结... 332 10.4 小结... 332 附录A 数据库访问的错误代码.............. 333 附录B 数据库编程资源网站........ 339 附录C 光盘内容.................. 340
2.1.1 Visual C++ 6.0 中的使用 (1) 启动Visual C++ 6.0,新建一个工程; (2) 将下载的动态链接库压缩包里VC文件夹中的动态链接库、头文件和lib文件复制到工程文件 夹中; 第 2 章 运动控制器函数库的使用 15 © 1999-2019 固高科技版权所有 (3) 选择“Project”菜单下的“Settings…”菜单项; (4) 切换到“Link”标签页,在“Object\library modules”栏中输入lib文件名,例如gts.lib; (5) 在应用程序文件中加入函数库头文件的声明,例如:#include “gts.h”; 至此,用户就可以在Visual C++中调用函数库中的任何函数,开始编写应用程序。 对于步骤(4),还有一种比较简便的方法,那就是在应用程序文件里面添加包含链接文件的声 明,例如:#pragma comment ( lib,"gts.lib" ) 。 上述关于Visual C++ 6.0调用GTS库函数的方法同样适用于使用Visual Studio平台开发。 2.1.2 Visual Basic 6.0 中的使用 (1) 启动Visual Basic,新建一个工程; (2) 将下载的动态链接库压缩包里VB6.0文件夹中的动态链接库和函数声明文件复制到工程文 件夹中; (3) 选择“工程”菜单下的“添加模块”菜单项; (4) 切换到“现存”标签页,选择函数声明文件,例如gts.bas,将其添加到工程当中; 至此,用户就可以在Visual Basic中调用函数库中的任何函数,开始编写应用程序。 2.1.3 Delphi 中的使用 (1) 启动Delphi,新建一个工程; (2) 将下载的动态链接库压缩包里Delphi文件夹中的动态链接库和函数声明文件复制到工程文 件夹中; (3) 选择“Project”菜单下的“Add to Project…”菜单项; (4) 将函数声明文件添加到工程当中; (5) 在代码编辑窗口中,切换到用户的单元文件; (6) 选择“File”菜单下的“Use Unit…”菜单项,添加对函数声明文件的引用; 至此,用户就可以在Delphi中调用函数库中的任何函数,开始编写应用程序。 2.1.4 VB.NET 中的使用 (1) 启动Visual Studio,按照“File”->"New",选择建立VB工程; (2) 将下载的动态链接库压缩包里VB.NET文件夹中的动态链接库和函数声明文件复制到工程 文件夹中,注意:gts.dll应复制到"..\bin"文件夹中的debug或者release文件夹中; (3) 选择“project”菜单下的“Add existing Item”菜单项,选择函数声明文件,如gts.vb,将其添加 到工程当中; 至此,用户就可以在Visual Studio中使用VB.NET模块调用函数库中的任何函数,开始编写应用 程序。 第 2 章 运动控制器函数库的使用 16 © 1999-2019 固高科技版权所有 2.1.5 Visual C#中的使用 (1) 启动Visual Studio,按照“File”->"New",选择建立C#工程; (2) 将下载的动态链接库压缩包里C#文件夹中的动态链接库和函数声明文件复制到工程文件夹 中,注意:gts.dll应复制到"..\bin"文件夹中的debug或者release文件夹中; (3) 选择“project”菜单下的“Add existing Item”菜单项,选择函数声明文件,如gts.cs,将其添加 到工程当中; 至此,用户就可以在Visual Studio中使用C#模块调用函数库中的任何函数,开始编写应用程序。

7,540

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 VC.NET
社区管理员
  • VC.NET社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧