
iii
Chapter 1
Introduction 1-1
What is C++Builder? . . . . . . . . . . . . . . . 1-1
Registering C++Builder . . . . . . . . . . . . . . 1-2
Finding information . . . . . . . . . . . . . . . . 1-3
Online Help . . . . . . . . . . . . . . . . . . . 1-3
F1 Help . . . . . . . . . . . . . . . . . . . . . 1-4
Printed documentation . . . . . . . . . . . . . . 1-6
Developer support services and
Web site . . . . . . . . . . . . . . . . . . . . . . 1-6
Typographic conventions . . . . . . . . . . . . . 1-6
Chapter 2
A tour of the environment 2-1
Starting C++Builder . . . . . . . . . . . . . . . . 2-1
The IDE . . . . . . . . . . . . . . . . . . . . . . . 2-1
The menus and toolbars. . . . . . . . . . . . . . 2-3
The Component Palette, Form Designer,
and Object Inspector . . . . . . . . . . . . . . . 2-4
The Object TreeView. . . . . . . . . . . . . . . . 2-4
The Object Repository . . . . . . . . . . . . . . . 2-5
The Code Editor . . . . . . . . . . . . . . . . . . 2-6
Code Insight . . . . . . . . . . . . . . . . . 2-6
Code Browsing . . . . . . . . . . . . . . . 2-7
The Diagram page . . . . . . . . . . . . . . . 2-7
Viewing form code . . . . . . . . . . . . . . . 2-9
The ClassExplorer . . . . . . . . . . . . . . . . . 2-9
The Project Manager . . . . . . . . . . . . . . . . 2-9
To-do lists . . . . . . . . . . . . . . . . . . . . . .2-10
Chapter 3
Programming with C++Builder 3-1
Creating a project . . . . . . . . . . . . . . . . . 3-1
Adding data modules . . . . . . . . . . . . . 3-2
Building the user interface . . . . . . . . . . . . 3-2
Placing components on a form . . . . . . . . 3-2
Setting component properties. . . . . . . . . 3-4
Writing code . . . . . . . . . . . . . . . . . . . . 3-5
Writing event handlers . . . . . . . . . . . . 3-5
Using the VCL and CLX libraries. . . . . . . 3-6
Compiling and debugging projects . . . . . . . 3-7
Deploying applications . . . . . . . . . . . . . . 3-8
Internationalizing applications . . . . . . . . . . 3-8
Types of projects . . . . . . . . . . . . . . . . . . 3-9
CLX applications . . . . . . . . . . . . . . . . 3-9
Web server applications . . . . . . . . . . . . 3-9
Database applications. . . . . . . . . . . . . 3-10
BDE Administrator . . . . . . . . . . . . 3-11
SQL Explorer (Database
Explorer) . . . . . . . . . . . . . . . . . 3-11
Database Desktop . . . . . . . . . . . . . 3-11
Data Dictionary . . . . . . . . . . . . . . 3-12
Custom components . . . . . . . . . . . . . 3-12
DLLs . . . . . . . . . . . . . . . . . . . . . . 3-12
COM and ActiveX. . . . . . . . . . . . . . . 3-12
Type libraries . . . . . . . . . . . . . . . . 3-13
Chapter 4
Creating a text editor—a tutorial 4-1
Starting a new application . . . . . . . . . . . . . 4-1
Setting property values. . . . . . . . . . . . . . . 4-2
Adding components to the form . . . . . . . . . 4-3
Adding support for a menu and
a toolbar . . . . . . . . . . . . . . . . . . . . . . 4-6
Action Manager editor and
Action List editor differences. . . . . . . . . 4-6
Adding menu and toolbar images
(Enterprise and Professional). . . . . . . . . 4-7
Adding actions to the Action Manager
(Enterprise and Professional). . . . . . . . . 4-8
Adding standard actions (Enterprise
and Professional) . . . . . . . . . . . . . . 4-11
Adding a menu (Enterprise
and Professional) . . . . . . . . . . . . . . 4-12
Adding a toolbar (Enterprise
and Professional) . . . . . . . . . . . . . . 4-13
Adding an image list and images
(Personal edition) . . . . . . . . . . . . . . 4-13
Adding actions to the action list
(Personal edition) . . . . . . . . . . . . . . 4-15
Adding standard actions to the action
list (Personal edition) . . . . . . . . . . . . 4-17
Adding a menu (Personal edition) . . . . . 4-18
Adding a toolbar (Personal edition). . . . . 4-20
Clearing the text area (all editions) . . . . . . . 4-22
Writing event handlers . . . . . . . . . . . . . . 4-22
Creating an event handler for the
New command. . . . . . . . . . . . . . . . 4-23
Creating an event handler for the
Open command . . . . . . . . . . . . . . . 4-25
Creating an event handler for the
Save command. . . . . . . . . . . . . . . . 4-27
Contents
评论2