Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 529 trang
THÔNG TIN TÀI LIỆU
Cấu trúc
@Team LiB
C++Builder 6 Developer's Guide
Cover
Dedication and Acknowledgments
Contents
Introduction
Chapter Overview
Part I Windows and Database Development
Chapter 1 Introduction to C++Builder 6
Introduction
C++ Builder 6 Overview
The Main Window and Toolbars
Component Palette
Object Inspector
Object TreeView
To- Do List
Alignment Palette
New Features
Technology Additions
WebSnap and Enhancements to Internet Development
BizSnap
Enhancements
Enhancement to DataSnap
New Database Support
STLPort Standard Template Library
New Components and Wizards
Working with Projects
What Constitutes a C++ Builder 6 Project?
Setting Project Options
Borland Packages and Components
Installing Third- Party Vendor Components
Types of Projects That C++ Builder 6 Supports
Building User Interfaces
Your First Windows Application
Summary
Chapter 2 C++ Advanced Concepts
Introduction
Language Overview
C++ Features That are Often Ignored
Templates
What are Templates?
When to Use Templates
Namespaces
Casting in C++
dynamic_cast
static_cast
const_cast
reinterpret_cast
Exception Handling
A Word about Pointers
References
Virtual Methods
C++ Language and C++ Builder
Overview
Keyword Extensions
__classid
__closure
__property
__published
__declspec
__interface
Object Construction Sequence in C++ Builder
Summary
Chapter 3 The VCL Explored
Brief Introduction to VCL Architecture
VCL Objects
AnsiString
What is TObject?
Persistence of Objects-TPersistent Class
Basic VCL Component-TComponent Class
Non- Visual Components
Visual Components-TControl and TWinControl Classes and Their Descendants
The Application-Global TApplication Instance
Other Global Variables-TScreen, TMouse, and TClipboard Instances
Getting the RTTI
Is a Specific Property Published for the Object?
What is the Property Type?
Is a Specific Property in an Object of a Specific Type?
What is the Type of a Specific Property in an Object?
Is the Property Stored in the DFM File?
Getting and Setting Property Values for an Object
A Closer Look at Forms
Creating Forms in a DLL
What are a Form's Characteristics?
Frames in the VCL
Using Frames in a Project
The Value List Editor
Summary
Chapter 4 Advanced VCL Features
Introduction
Actions and ActionLists
Action Clients
Action Objects and TAction Class
Types of Action Objects
Action Targets
ActionList Object
Using the Standard Action Objects
How Does the Application Find the Action Target for an Action Object?
Using the Custom Action Objects
How Does VCL Identify the Appropriate Action Handler for an Action?
Visual Components That Render Action Objects
Windows Common Dialogs
Windows Drag and Drop
Properties and Methods of the Source Object
BeginDrag() Method
OnMouseDown() Event
Event Handlers for the Drop Target
Custom Drag Objects
Drag and Drop Across Modules in an Application
Date/ Time Management
TDateTime Class
What is DOS File Timestamp?
Win32 Core Date- Time Management
Formatting Date- Time Strings
Constants Defined in SYSUTILS
Directory and File Management
Working with Directories
Working with Files
Functions That Work with File Existence and Search
WIN32_FIND_DATA Structure
File Attributes
Setting the Advanced Attributes
Filename Manipulation Functions
File Content Management
Summary
Chapter 5 Simple Database Development
Introduction to Database Development
Two-tier, Three-tier, and Multi-tier Applications
VCL Architecture for Database Development
Database Connection Components
Database Connection Frameworks Supported in VCL
How Do You Connect to a Database?
What is TDataSet?
Dataset States
Synchronous and Asynchronous Modes
Properties, Methods, and Events
Data- aware Controls and DataSource
Data Module-The Non-visual Container
Borland Database Engine (BDE) Framework
BDE Components
Setting Up a BDE Alias for InterBase SQL Links Driver
Setting Up a BDE Alias for MS Access ODBC Driver
Sample Application Using BDE Framework
Creating BDE Components Programmatically
ActiveX Data Objects (ADO) Framework— dbGo
Microsoft ADO Components
Simplified Borland ADO Components
How Do We Make a Database Connection?
Obtaining Metadata from the Database
What Dataset Objects are Available in the ADO Framework?
The TADOCommand Component
Sample Application Using ADO Components
Summary
Chapter 6 Advanced Database Development
Introduction
Data Access Components
What is TClientDataSet?
TClientDataSet as an In- memory Table
Creating a ClientDataSet on a Form
Programmatically Creating a ClientDataSet
TDataSetProvider in Advanced Database Development
The TDataSetProvider- TClientDataSet Duo
Properties, Methods, and Events of TClientDataSet
Properties and Events of TDataSetProvider
Methods Supported by IProviderSupport Interface
The TDataSource Component
XML- based Data Access Components
Borland dbExpress Architecture
Overview
dbExpress Components
Configuring a dbExpress Connection
Using Unidirectional Datasets with Data-aware Controls
Through TSQLClientDataSet
Through TClientDataSet and TDataSetProvider
Using Unidirectional Datasets without Data Controls
Borland InterBase Express for InterBase
Overview
IBX Components
TIBDatabase, TIBDatabaseInfo, and TIBTransaction
A Word about Transaction Isolation Levels
Datasets in the IBX Family
Executing Stored Procedures That
Return a Result Set
Updating a Read- only Dataset
TIBClientDataSet at a Glance
Summary
Part II Advanced and Distributed Application Development
Chapter 7 Building WebBroker Applications
Introduction
Uniform Resource Identifiers (URIs)
Overview
Parts of a URL
The HTTP Protocol
The HTTP Methods
The HTTP Request
The HTTP Response
The HTTP Response Status Codes
Web Development in C++ Builder 6
Overview
A Typical Web Application
Web Dispatcher in Action
Sample Web Applications
Overview
CGI Application
Convert the CGI Application to ISAPI DLL
Apache Application
Producer Components
Overview
PageProducer Components
TableProducer Components
Summary
Chapter 8 Building WebSnap Applications
Introduction
WebSnap Components at a Glance
Overview
Web Page Modules
Web Data Modules
Adapter Components
What are Adapters?
Types of Adapters
Content Producers
The IPageDispatcher Interface
Server- side Scripting
Overview of the Scripting Language
VCL Script Objects
The Page Object
The Module Object
Other Objects
Building WebSnap Applications
WebSnap Application Wizards
A Simple WebSnap Application
An Improved Way to Save the State Information
A WebSnap Application Connecting to a
DataSource
Summary
Chapter 9 Developing DataSnap Applications
Introduction
DataSnap Applications
Connecting to the Remote Application Server
What is Contained in the DataSnap Server
Module?
The IAppServer Interface
The Threading Model of Server Objects
DataSnap Application Logic Flow
Sample DataSnap Application
Connecting to the Server through DCOM
Applying Updates and Reconciling Errors
Web Client to a DataSnap Server
TXMLBroker Component
TInetXPageProducer Component
A Word on the XML- based Provider
Summary
Chapter 10 Developing Distributed Applications (CORBA and TCP/IP)
Introduction
CORBA Overview
The CORBA Object Model
The Interface Definition Language
IDL to CPP Translation
The Stub File Classes
The Skeleton Classes
The CORBA Server Application
The CORBA Client Application
The Portable Object Adapter
The Interface Repository
The Object Activation Daemon (OAD)
The Naming Service
Simple TCP/ IP Applications
Simple TCP/ IP Protocol
Blocking and Non- blocking Connections
How Do Clients Establish a Connection with the Server?
Custom App Server Model
A Simple FTP Client
Summary
Chapter 11 Building BizSnap Applications (XML and Web Services)
Introduction
XML Overview
XML Documents
The Document Object Model
XML Namespaces
XML Schemas
What is TXMLDocument?
SOAP Overview
Web Services
Building and Using Web Services in C++ Builder 6
Building SOAP Server Applications
Building SOAP Client Applications
SOAP- based Multi- tier Distributed Applications
Building the Server Module
Summary
Chapter 12 Miscellaneous and Advanced Topics
Introduction
The Cross- platform Component Library
What does BaseCLX Contain?
INI Files and Windows Registry
Non- visual Containers
TStrings and TStringList
TList and TObjectList
Streams and Streaming
Graphics at a Glance
TCanvas
Visual Container Components (in VisualCLX)
TListBox
TListView
Custom Component Development
Implementing Component Properties and Methods
Implementing Component Events
Overriding Default Event Behavior
Registering the Components
Miscellaneous Programming Features
Variant and OleVariant
Using Office 2000 Automation Objects
The TOleContainer Component
Summary
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
R
S
T
U
V
W
X
About the CD
CD/Source Code Usage License Agreement
Nội dung
[...]... Automation Objects The TOleContainer Component Summary 461 461 461 464 464 468 468 471 472 475 4 76 477 477 477 478 480 482 484 4 86 487 487 492 493 497 Index 499 xii Introduction Introduction My desire to write a book about C++Builder... 350 354 357 359 361 368 x 275 2 76 282 285 290 290 290 292 303 Applying Updates and Reconciling Errors Web Client to a DataSnap Server TXMLBroker Component TInetXPageProducer Component A Word on the XML-based Provider Summary 369 372 372 374 378 382 Chapter... Using Web Services in C++Builder 6 Building SOAP Server Applications Building SOAP Client Applications SOAP-based Multi-tier Distributed Applications 429 429 430 431 432 435 4 36 4 36 440 442 442 443 451 454 xi Contents Building the Server Module 455 Summary 460 Chapter 12 Miscellaneous and... WebSnap Application Connecting to a DataSource Summary 305 305 3 06 3 06 307 309 309 309 312 314 314 315 319 321 3 26 327 327 328 328 332 338 339 3 46 Chapter 9 Developing DataSnap Applications Introduction DataSnap Applications Connecting to the... which are beyond the scope of this book 15 Part 1 Introduction to C++Builder 6 16 Chapter 1 Components form the major part of the C++Builder 6 development environment Components are reusable objects (classes with specific features that enable them to be accessed through the Component Palette) With each edition of C++Builder 6, Borland provides a set of components You may also buy components built and... Chapters 6 and 9, while its SOAP extension is discussed in Chapter 11 New Database Support C++Builder 6 includes support for dbExpress, the new data access technology introduced by Borland The concept of unidirectional datasets is implemented in this technology, improving the data access speeds with the use of unidirectional cursors Use of this technology requires new database drivers C++Builder 6 comes... vendors and Borland itself Chapter 6 discusses features of this technology in detail with sample applications STLPort Standard Template Library The new STLPort standard template library has become popular due to its enhanced compliance with ANSI C++ and multi-platform support C++Builder 6 includes this library as part of the product 11 Part 1 Introduction to C++Builder 6 12 Chapter 1 New Components and... C++Builder 6, which enables porting your Windows-based applications to Linux without pain It includes BaseCLX, which is common mostly across VCL and CLX frameworks I also present custom component development concepts and OLE objects and OLE containers xvi Part I Windows and Database Development Chapter 1 Introduction to C++Builder 6 Introduction As I mentioned in the introduction to this book, C++Builder 6. .. aligned automatically New Features C++Builder 6 provides many new features and enhancements to the existing features of the product In this section, we will go through some of these new features by different categories It is not possible to discuss all the new features here Technology Additions WebSnap and Enhancements to Internet Development With C++Builder 6, you can continue to use the WebBroker architecture... familiarize you with the contents of the book Chapter 1 serves as an introduction to programming in C++Builder 6 and an introduction to Windows programming with this tool You will find topics on familiarizing yourself (and navigating) with the tool, new features added to the current release (C++Builder 6) compared to the previous release, creating projects, types of applications that can be created with the . index.
ISBN 1-5 562 2- 960 -7 (paperback)
1. Computer software—Development. 2. Delphi (Computer file).
3. Telecommunication
systems. I. Title.
QA 76. 76. D47 M 665 2002
005.1. Class 65
Basic VCL Component—TComponent Class 65
Non-Visual Components 66
Visual Components—TControl and TWinControl
Classes and Their Descendants 66
The