ebook img

Developer's Guide. C++Builder 5 for Windows 2000 / 98 / 95 / NT PDF

1060 Pages·2000·16.093 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Developer's Guide. C++Builder 5 for Windows 2000 / 98 / 95 / NT

Developer’s Guide Borland® C++Builder 5 ™ for Windows 2000 / 98 / 95 / NT Inprise Corporation 100 Enterprise Way, Scotts Valley, CA 95066-3249 Refer to the file DEPLOY.TXT located in the root directory of your C++Builder product for a complete list of files that you can distribute in accordance with the C++Builder License Statement and Limited Warranty. Inprise may have patents and/or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. COPYRIGHT © 1983, 2000 Inprise Corporation. All rights reserved. AllInprise and Borland brands and product names are trademarks or registered trademarks of Inprise Corporation. Other product names are trademarks or registered trademarks of their respective holders. Printed in the U.S.A. CPE1350WW21001 3E2R0100 0001020304-987654321 PDF Contents Chapter 1 VCL standard components. . . . . . . . . . 2-14 Introduction 1-1 Text controls . . . . . . . . . . . . . . . . 2-15 Specialized input controls. . . . . . . . . 2-16 What’s in this manual? . . . . . . . . . . . . . . 1-1 Buttons and similar controls . . . . . . . 2-17 Manual conventions. . . . . . . . . . . . . . . . 1-2 Button controls. . . . . . . . . . . . . . . 2-17 Contacting developer support . . . . . . . . 1-3 Bitmap buttons. . . . . . . . . . . . . . . 2-18 Part I Speed buttons . . . . . . . . . . . . . . . 2-18 Programming with C++Builder Check boxes . . . . . . . . . . . . . . . . 2-18 Radio buttons . . . . . . . . . . . . . . . 2-18 Toolbars. . . . . . . . . . . . . . . . . . . 2-18 Chapter 2 Cool bars . . . . . . . . . . . . . . . . . . 2-19 Programming with C++Builder 2-1 Handling lists . . . . . . . . . . . . . . . 2-19 The integrated development environment . . . 2-1 List boxes and check-list boxes. . . . . . 2-19 Designing applications . . . . . . . . . . . . . . 2-2 Combo boxes. . . . . . . . . . . . . . . . 2-20 Understanding the VCL. . . . . . . . . . . . . . 2-2 Tree views. . . . . . . . . . . . . . . . . . 2-20 Properties . . . . . . . . . . . . . . . . . . . . 2-2 List views. . . . . . . . . . . . . . . . . . 2-21 Methods. . . . . . . . . . . . . . . . . . . . . 2-2 Date-time pickers and month Events . . . . . . . . . . . . . . . . . . . . . . 2-3 calendars . . . . . . . . . . . . . . . . . 2-21 User events . . . . . . . . . . . . . . . . . 2-3 Grouping components . . . . . . . . . . 2-21 System events . . . . . . . . . . . . . . . . 2-3 Group boxes and radio groups. . . . . . 2-21 Objects, components, and controls in Panels . . . . . . . . . . . . . . . . . . . . 2-22 the VCL . . . . . . . . . . . . . . . . . . . . . . 2-3 Scroll boxes. . . . . . . . . . . . . . . . . 2-22 The TObject branch. . . . . . . . . . . . . . . 2-4 Tab controls. . . . . . . . . . . . . . . . . 2-22 The TPersistent branch . . . . . . . . . . . . 2-5 Page controls . . . . . . . . . . . . . . . . 2-22 The TComponent branch . . . . . . . . . . . 2-5 Header controls . . . . . . . . . . . . . . 2-22 The TControl branch. . . . . . . . . . . . . . 2-6 Visual feedback . . . . . . . . . . . . . . 2-22 The TWinControl branch . . . . . . . . . . . 2-7 Labels and static-text components. . . . 2-23 Properties common to TControl . . . . . . . 2-7 Status bars . . . . . . . . . . . . . . . . . 2-23 Action properties . . . . . . . . . . . . . . 2-8 Progress bars . . . . . . . . . . . . . . . . 2-23 Position, size, and alignment Help and hint properties . . . . . . . . . 2-23 properties . . . . . . . . . . . . . . . . . 2-8 Grids . . . . . . . . . . . . . . . . . . . . 2-24 Display properties . . . . . . . . . . . . . 2-8 Draw grids . . . . . . . . . . . . . . . . . 2-24 Parent properties . . . . . . . . . . . . . . 2-9 String grids . . . . . . . . . . . . . . . . . 2-24 A navigation property . . . . . . . . . . . 2-9 Graphics display. . . . . . . . . . . . . . 2-24 Drag-and-drop properties . . . . . . . . . 2-9 Images. . . . . . . . . . . . . . . . . . . . 2-25 Drag-and-dock properties . . . . . . . . . 2-9 Shapes. . . . . . . . . . . . . . . . . . . . 2-25 Standard events common to TControl . . . .2-10 Bevels . . . . . . . . . . . . . . . . . . . . 2-25 Properties common to TWinControl . . . . .2-10 Paint boxes . . . . . . . . . . . . . . . . . 2-25 General information properties . . . . . .2-11 Animation control . . . . . . . . . . . . . 2-25 Border style display properties . . . . . .2-11 Windows common dialog boxes . . . . . 2-26 Navigation properties . . . . . . . . . . .2-11 Using windows common dialog Drag-and-dock properties . . . . . . . . .2-12 boxes. . . . . . . . . . . . . . . . . . . . 2-26 Events common to TWinControl . . . . . . .2-12 Using helper objects . . . . . . . . . . . . . . . 2-26 Creating the application user interface . . .2-12 Working with lists. . . . . . . . . . . . . . . 2-27 Using components . . . . . . . . . . . . . . .2-13 i Working with string lists . . . . . . . . . . .2-27 Distributing database applications . . . . . 3-17 Loading and saving string lists . . . . . .2-27 Using data modules and remote data Creating a new string list . . . . . . . . .2-28 modules . . . . . . . . . . . . . . . . . . . . . 3-17 Manipulating strings in a list . . . . . . .2-29 Creating and editing data modules . . . . . 3-18 Associating objects with a string list . . .2-31 Creating business rules in a data Windows registry and INI files . . . . . . . .2-31 module . . . . . . . . . . . . . . . . . . 3-18 Using TINIFile . . . . . . . . . . . . . . .2-32 Accessing a data module from a form . . . 3-19 Using TRegistry. . . . . . . . . . . . . . .2-33 Adding a remote data module to an Using TRegINIFile . . . . . . . . . . . . .2-33 application server project. . . . . . . . . . 3-19 Using TCanvas . . . . . . . . . . . . . . .2-34 Using the Object Repository. . . . . . . . . . . 3-19 Using TPrinter. . . . . . . . . . . . . . . .2-34 Sharing items within a project . . . . . . . . 3-19 Using streams. . . . . . . . . . . . . . . . . .2-35 Adding items to the Object Repository . . . 3-20 Developing applications . . . . . . . . . . . . .2-35 Sharing objects in a team environment . . . 3-20 Editing code. . . . . . . . . . . . . . . . . . .2-35 Using an Object Repository item in Debugging applications . . . . . . . . . . . .2-35 a project. . . . . . . . . . . . . . . . . . . . 3-20 Deploying applications . . . . . . . . . . . .2-36 Copying an item . . . . . . . . . . . . . . 3-20 Inheriting an item . . . . . . . . . . . . . 3-21 Chapter 3 Using an item. . . . . . . . . . . . . . . . 3-21 Building applications, components, Using project templates. . . . . . . . . . . . 3-21 and libraries 3-1 Modifying shared items . . . . . . . . . . . 3-21 Specifying a default project, new form, Creating applications . . . . . . . . . . . . . . . 3-1 and main form . . . . . . . . . . . . . . . . 3-22 Windows applications . . . . . . . . . . . . . 3-1 User interface models . . . . . . . . . . . 3-2 Chapter 4 Setting IDE, project, and compilation Developing the application options . . . . . . . . . . . . . . . . . . . 3-2 user interface 4-1 Programming templates. . . . . . . . . . . . 3-3 Console applications. . . . . . . . . . . . . . 3-3 Understanding TApplication, TScreen, Using the VCL in console applications. . 3-3 and TForm . . . . . . . . . . . . . . . . . . . . .4-1 Service applications . . . . . . . . . . . . . . 3-4 Using the main form . . . . . . . . . . . . . .4-1 Service threads . . . . . . . . . . . . . . . 3-6 Adding additional forms. . . . . . . . . . . .4-2 Service name properties . . . . . . . . . . 3-8 Linking forms . . . . . . . . . . . . . . . .4-2 Debugging services. . . . . . . . . . . . . 3-8 Hiding the main form. . . . . . . . . . . . . .4-2 Creating packages and DLLs . . . . . . . . . . . 3-9 Working at the application level. . . . . . . .4-3 When to use packages and DLLs. . . . . . . 3-9 Handling the screen. . . . . . . . . . . . . . .4-3 Using DLLs in C++Builder . . . . . . . . . . . .3-10 Managing layout . . . . . . . . . . . . . . . .4-3 Creating DLLs in C++Builder . . . . . . . . . .3-10 Working with messages . . . . . . . . . . . . . .4-4 Creating DLLs containing VCL More details on forms . . . . . . . . . . . . . . .4-5 components. . . . . . . . . . . . . . . . . . . .3-11 Controlling when forms reside in memory. .4-5 Linking DLLs. . . . . . . . . . . . . . . . . . . .3-14 Displaying an auto-created form. . . . . .4-5 Writing database applications . . . . . . . . . .3-14 Creating forms dynamically . . . . . . . .4-5 Building distributed applications . . . . . . . .3-15 Creating modeless forms such as Distributing applications using TCP/IP. . .3-15 windows . . . . . . . . . . . . . . . . . .4-6 Using sockets in applications . . . . . . .3-15 Using a local variable to create a form Creating Web server applications. . . . .3-16 instance . . . . . . . . . . . . . . . . . . .4-7 Distributing applications using COM Passing additional arguments to forms. . . .4-7 and DCOM . . . . . . . . . . . . . . . . . .3-16 Retrieving data from forms. . . . . . . . . . .4-8 COM and DCOM. . . . . . . . . . . . . .3-16 Retrieving data from modeless forms . . .4-8 MTS and COM+ . . . . . . . . . . . . . .3-17 Retrieving data from modal forms. . . . 4-10 Distributing applications using CORBA. . .3-17 ii Reusing components and groups of Setting tool button appearance and components. . . . . . . . . . . . . . . . . . . .4-12 initial conditions . . . . . . . . . . . . . 4-33 Creating and using component templates . . .4-12 Creating groups of tool buttons . . . . . 4-33 Working with frames . . . . . . . . . . . . . . .4-13 Allowing toggled tool buttons . . . . . . 4-33 Creating frames. . . . . . . . . . . . . . . . .4-13 Adding a cool bar component . . . . . . . . 4-34 Adding frames to the Component Setting the appearance of the palette . . . . . . . . . . . . . . . . . . .4-14 cool bar . . . . . . . . . . . . . . . . . . 4-34 Using and modifying frames . . . . . . . . .4-14 Responding to clicks . . . . . . . . . . . . . 4-34 Sharing frames . . . . . . . . . . . . . . . . .4-15 Assigning a menu to a tool button. . . . 4-35 Creating and managing menus. . . . . . . . . .4-15 Adding hidden toolbars . . . . . . . . . . . 4-35 Opening the Menu Designer . . . . . . . . .4-16 Hiding and showing toolbars . . . . . . . . 4-35 Building menus. . . . . . . . . . . . . . . . .4-17 Using action lists . . . . . . . . . . . . . . . . . 4-36 Naming menus . . . . . . . . . . . . . . .4-18 Action objects . . . . . . . . . . . . . . . . . 4-36 Naming the menu items . . . . . . . . . .4-18 Using Actions . . . . . . . . . . . . . . . . . 4-37 Adding, inserting, and deleting Centralizing code . . . . . . . . . . . . . 4-38 menu items . . . . . . . . . . . . . . . .4-19 Linking properties. . . . . . . . . . . . . 4-38 Creating submenus. . . . . . . . . . . . .4-20 Executing actions . . . . . . . . . . . . . 4-38 Adding images to menu items . . . . . .4-22 Updating actions. . . . . . . . . . . . . . 4-40 Viewing the menu . . . . . . . . . . . . .4-22 Pre-defined action classes . . . . . . . . . . 4-41 Editing menu items in the Object Standard edit actions . . . . . . . . . . . 4-41 Inspector. . . . . . . . . . . . . . . . . . . .4-22 Standard Window actions. . . . . . . . . 4-41 Using the Menu Designer context menu. . .4-23 Standard Help actions. . . . . . . . . . . 4-42 Commands on the context menu . . . . .4-23 DataSet actions. . . . . . . . . . . . . . . 4-42 Switching between menus at design Writing action components. . . . . . . . . . 4-43 time. . . . . . . . . . . . . . . . . . . . .4-24 How actions find their targets . . . . . . 4-43 Using menu templates. . . . . . . . . . . . .4-24 Registering actions. . . . . . . . . . . . . 4-44 Saving a menu as a template . . . . . . . . .4-25 Writing action list editors. . . . . . . . . 4-45 Naming conventions for template Chapter 5 menu items and event handlers. . . . .4-26 Manipulating menu items at runtime . . . .4-27 Working with controls 5-1 Merging menus. . . . . . . . . . . . . . . . .4-27 Implementing drag-and-drop in controls . . . .5-1 Specifying the active menu: Menu Starting a drag operation. . . . . . . . . . . .5-1 property . . . . . . . . . . . . . . . . . .4-27 Accepting dragged items. . . . . . . . . . . .5-2 Determining the order of merged Dropping items . . . . . . . . . . . . . . . . .5-2 menu items: GroupIndex property . . .4-27 Ending a drag operation . . . . . . . . . . . .5-3 Importing resource files . . . . . . . . . . . .4-28 Customizing drag and drop with a Designing toolbars and cool bars . . . . . . . .4-28 drag object . . . . . . . . . . . . . . . . . . .5-3 Adding a toolbar using a panel Changing the drag mouse pointer. . . . . . .5-4 component. . . . . . . . . . . . . . . . . . .4-29 Implementing drag-and-dock in controls . . . .5-4 Adding a speed button to a panel. . . . .4-30 Making a windowed control a docking Assigning a speed button’s glyph. . . . .4-30 site. . . . . . . . . . . . . . . . . . . . . . . .5-4 Setting the initial condition of a Making a control a dockable child. . . . . . .5-4 speed button. . . . . . . . . . . . . . . .4-30 Controlling how child controls are Creating a group of speed buttons . . . .4-31 docked . . . . . . . . . . . . . . . . . . . . .5-5 Allowing toggle buttons . . . . . . . . . .4-31 Controlling how child controls are Adding a toolbar using the toolbar undocked. . . . . . . . . . . . . . . . . . . .5-6 component. . . . . . . . . . . . . . . . . . .4-31 Controlling how child controls respond Adding a tool button. . . . . . . . . . . .4-32 to drag-and-dock operations. . . . . . . . .5-6 Assigning images to tool buttons . . . . .4-32 iii Working with text in controls. . . . . . . . . . . 5-6 Saving a picture to a file. . . . . . . . . . 6-19 Setting text alignment . . . . . . . . . . . . . 5-6 Replacing the picture . . . . . . . . . . . 6-19 Adding scroll bars at runtime. . . . . . . . . 5-7 Using the Clipboard with graphics . . . . . 6-20 Adding the Clipboard object . . . . . . . . . 5-7 Copying graphics to the Clipboard . . . 6-21 Selecting text . . . . . . . . . . . . . . . . . . 5-8 Cutting graphics to the Clipboard . . . . 6-21 Selecting all text . . . . . . . . . . . . . . . . 5-8 Pasting graphics from the Clipboard . . 6-21 Cutting, copying, and pasting text . . . . . . 5-8 Rubber banding example. . . . . . . . . . . 6-22 Deleting selected text . . . . . . . . . . . . . 5-9 Responding to the mouse. . . . . . . . . 6-22 Disabling menu items . . . . . . . . . . . . . 5-9 Adding a field to a form object to Providing a pop-up menu. . . . . . . . . . .5-10 track mouse actions . . . . . . . . . . . 6-25 Handling the OnPopup event. . . . . . . . .5-10 Refining line drawing . . . . . . . . . . . 6-26 Adding graphics to controls . . . . . . . . . . .5-11 Working with multimedia . . . . . . . . . . . . 6-28 Indicating that a control is owner-drawn . .5-11 Adding silent video clips to an Adding graphical objects to a string list . . .5-12 application . . . . . . . . . . . . . . . . . . 6-28 Adding images to an application . . . . .5-12 Example of adding silent video Adding images to a string list. . . . . . .5-12 clips . . . . . . . . . . . . . . . . . . . . 6-29 Drawing owner-drawn items . . . . . . .5-13 Adding audio and/or video clips to Sizing owner-draw items . . . . . . . . . . .5-14 an application . . . . . . . . . . . . . . . . 6-30 Drawing each owner-draw item . . . . . . .5-14 Example of adding audio and/or video clips . . . . . . . . . . . . . . . . 6-32 Chapter 6 Working with graphics and Chapter 7 Writing multi-threaded applications 7-1 multimedia 6-1 Defining thread objects. . . . . . . . . . . . . . .7-1 Overview of graphics programming. . . . . . . 6-1 Initializing the thread. . . . . . . . . . . . . .7-2 Refreshing the screen . . . . . . . . . . . . . 6-2 Assigning a default priority . . . . . . . .7-2 Types of graphic objects . . . . . . . . . . . . 6-2 Indicating when threads are freed . . . . .7-3 Common properties and methods of Writing the thread function . . . . . . . . . .7-3 Canvas. . . . . . . . . . . . . . . . . . . . . 6-3 Using the main VCL thread. . . . . . . . .7-4 Using the properties of the Canvas Using thread-local variables . . . . . . . .7-5 object . . . . . . . . . . . . . . . . . . . . . 6-4 Checking for termination by other Using pens. . . . . . . . . . . . . . . . . . 6-5 threads . . . . . . . . . . . . . . . . . . .7-5 Using brushes. . . . . . . . . . . . . . . . 6-7 Writing clean-up code. . . . . . . . . . . . . .7-6 Reading and setting pixels. . . . . . . . . 6-9 Coordinating threads. . . . . . . . . . . . . . . .7-6 Using Canvas methods to draw graphic Avoiding simultaneous access. . . . . . . . .7-6 objects . . . . . . . . . . . . . . . . . . . . . 6-9 Locking objects. . . . . . . . . . . . . . . .7-6 Drawing lines and polylines. . . . . . . . 6-9 Using critical sections . . . . . . . . . . . .7-7 Drawing shapes. . . . . . . . . . . . . . .6-10 Using the multi-read exclusive-write Handling multiple drawing objects in synchronizer . . . . . . . . . . . . . . . .7-7 your application . . . . . . . . . . . . . . .6-11 Other techniques for sharing memory. . .7-8 Keeping track of which drawing tool Waiting for other threads. . . . . . . . . . . .7-8 to use . . . . . . . . . . . . . . . . . . . .6-12 Waiting for a thread to finish Changing the tool with speed buttons . .6-12 executing . . . . . . . . . . . . . . . . . .7-8 Using drawing tools . . . . . . . . . . . .6-13 Waiting for a task to be completed. . . . .7-9 Drawing on a graphic . . . . . . . . . . . . .6-16 Executing thread objects . . . . . . . . . . . . . 7-10 Making scrollable graphics . . . . . . . .6-16 Overriding the default priority . . . . . . . 7-10 Adding an image control . . . . . . . . .6-16 Starting and stopping threads . . . . . . . . 7-11 Loading and saving graphics files . . . . . .6-18 Debugging multi-threaded applications . . . . 7-11 Loading a picture from a file . . . . . . .6-18 iv Chapter 8 Calling virtual methods in base class Exception handling 8-1 constructors . . . . . . . . . . . . . . . . . .9-6 Object Pascal model . . . . . . . . . . . . .9-6 C++ exception handling. . . . . . . . . . . . . . 8-1 C++ model . . . . . . . . . . . . . . . . . .9-7 ANSI requirements for exception C++Builder model. . . . . . . . . . . . . .9-7 handling. . . . . . . . . . . . . . . . . . . . 8-1 Example: calling virtual methods . . . . .9-7 Exception handling syntax . . . . . . . . . . 8-2 Constructor initialization of data Exception declarations. . . . . . . . . . . . . 8-2 members for virtual functions . . . . . .9-8 Throwing an exception . . . . . . . . . . . . 8-3 Object destruction. . . . . . . . . . . . . . . .9-9 Examples. . . . . . . . . . . . . . . . . . . 8-3 Exceptions thrown from constructors . . 9-10 Handling an exception. . . . . . . . . . . . . 8-6 Virtual methods called from Exception specifications . . . . . . . . . . . . 8-9 destructors . . . . . . . . . . . . . . . . 9-11 Constructors and destructors in AfterConstruction and exception handling. . . . . . . . . . . . . .8-10 BeforeDestruction . . . . . . . . . . . . . . 9-11 Unhandled exceptions. . . . . . . . . . . . .8-10 Class virtual functions . . . . . . . . . . . . 9-11 Setting exception handling options . . . . .8-11 Support for Object Pascal data types and Structured exceptions under Win32 . . . . . . .8-11 language concepts. . . . . . . . . . . . . . . . 9-11 Syntax of structured exceptions. . . . . . . .8-12 Typedefs . . . . . . . . . . . . . . . . . . . . 9-12 Handling structured exceptions . . . . . . .8-12 Classes that support the Object Pascal Exception filters . . . . . . . . . . . . . . . .8-13 language . . . . . . . . . . . . . . . . . . . 9-12 Mixing C++ with structured exceptions . . .8-15 C++ language counterparts to the C-based exceptions in C++ program Object Pascal language . . . . . . . . . . . 9-12 example . . . . . . . . . . . . . . . . . .8-16 Var parameters. . . . . . . . . . . . . . . 9-12 Defining exceptions . . . . . . . . . . . . . .8-17 Untyped parameters. . . . . . . . . . . . 9-13 Raising exceptions . . . . . . . . . . . . . . .8-17 Open arrays . . . . . . . . . . . . . . . . . . 9-13 Termination blocks. . . . . . . . . . . . . . .8-18 Calculating the number of elements. . . 9-13 VCL exception handling . . . . . . . . . . . . .8-19 Temporaries . . . . . . . . . . . . . . . . 9-14 Differences between C++ and VCL array of const. . . . . . . . . . . . . . . . 9-14 exception handling. . . . . . . . . . . . . .8-20 OPENARRAY macro . . . . . . . . . . . 9-15 Handling operating system exceptions . . .8-20 EXISTINGARRAY macro . . . . . . . . . 9-15 Handling VCL exceptions. . . . . . . . . . .8-21 C++ functions that take open array VCL exception classes . . . . . . . . . . . . .8-21 arguments. . . . . . . . . . . . . . . . . 9-15 Portability considerations . . . . . . . . . . .8-22 Types defined differently. . . . . . . . . . . 9-15 Chapter 9 Boolean data types. . . . . . . . . . . . . 9-16 C++ language support for the VCL 9-1 Char data types . . . . . . . . . . . . . . 9-16 Resource strings . . . . . . . . . . . . . . . . 9-16 C++ and Object Pascal object models . . . . . . 9-1 Default parameters . . . . . . . . . . . . . . 9-17 Object identity and instantiation . . . . . . . 9-1 Runtime type information . . . . . . . . . . 9-18 Distinguishing C++ and Object Pascal Unmapped types . . . . . . . . . . . . . . . 9-18 references . . . . . . . . . . . . . . . . . 9-2 6-byte Real types. . . . . . . . . . . . . . 9-18 Copying objects. . . . . . . . . . . . . . . 9-2 Arrays as return types of functions . . . 9-19 Objects as function arguments . . . . . . 9-3 Keyword extensions. . . . . . . . . . . . . . 9-19 Object construction for C++Builder __classid . . . . . . . . . . . . . . . . . . 9-19 VCL classes . . . . . . . . . . . . . . . . . . 9-4 __closure . . . . . . . . . . . . . . . . . . 9-19 C++ object construction . . . . . . . . . . 9-4 __property . . . . . . . . . . . . . . . . . 9-20 Object Pascal object construction . . . . . 9-4 __published. . . . . . . . . . . . . . . . . 9-21 C++Builder object construction . . . . . . 9-4 v The __declspec keyword extension. . . . . .9-21 Chapter 11 __declspec(delphiclass) . . . . . . . . . .9-21 Creating international applications 11-1 __declspec(delphireturn). . . . . . . . . .9-22 Internationalization and localization . . . . . . 11-1 __declspec(dynamic) . . . . . . . . . . . .9-22 Internationalization . . . . . . . . . . . . . . 11-1 __declspec(hidesbase) . . . . . . . . . . .9-22 Localization . . . . . . . . . . . . . . . . . . 11-1 __declspec(package) . . . . . . . . . . . .9-23 Internationalizing applications . . . . . . . . . 11-2 __declspec(pascalimplementation) . . . .9-23 Enabling application code . . . . . . . . . . 11-2 Chapter 10 Character sets . . . . . . . . . . . . . . . 11-2 OEM and ANSI character sets . . . . . . 11-2 Working with packages and Double byte character sets . . . . . . . . 11-2 components 10-1 Wide characters . . . . . . . . . . . . . . 11-3 Why use packages? . . . . . . . . . . . . . . . .10-2 Including bi-directional functionality Packages and standard DLLs . . . . . . . . .10-2 in applications . . . . . . . . . . . . . . 11-3 Runtime packages . . . . . . . . . . . . . . . . .10-2 BiDiMode property . . . . . . . . . . . . 11-5 Using packages in an application. . . . . . .10-2 Locale-specific features . . . . . . . . . . 11-7 Dynamically loading packages . . . . . . . .10-3 Designing the user interface . . . . . . . . . 11-8 Deciding which runtime packages to use . .10-3 Text . . . . . . . . . . . . . . . . . . . . . 11-8 Custom packages. . . . . . . . . . . . . . . .10-4 Graphic images . . . . . . . . . . . . . . 11-8 Design-time packages . . . . . . . . . . . . . . .10-4 Formats and sort order . . . . . . . . . . 11-8 Installing component packages. . . . . . . .10-5 Keyboard mappings. . . . . . . . . . . . 11-9 Creating and editing packages . . . . . . . . . .10-6 Isolating resources. . . . . . . . . . . . . . . 11-9 Creating a package. . . . . . . . . . . . . . .10-6 Creating resource DLLs. . . . . . . . . . . . 11-9 Editing an existing package. . . . . . . . . .10-7 Using resource DLLs . . . . . . . . . . . . .11-10 Package source files and project Dynamic switching of resource DLLs. . . .11-11 option files. . . . . . . . . . . . . . . . . . .10-7 Localizing applications. . . . . . . . . . . . . .11-12 Packaging components. . . . . . . . . . .10-8 Localizing resources. . . . . . . . . . . . . .11-12 Understanding the structure of a Chapter 12 package . . . . . . . . . . . . . . . . . . . .10-9 Naming packages. . . . . . . . . . . . . .10-9 Deploying applications 12-1 The Requires list . . . . . . . . . . . . . .10-9 Deploying general applications . . . . . . . . . 12-1 The Contains list . . . . . . . . . . . . . 10-10 Using installation programs . . . . . . . . . 12-2 Compiling packages . . . . . . . . . . . . . 10-10 Identifying application files . . . . . . . 12-2 Package-specific compiler Application files . . . . . . . . . . . . . . 12-2 directives. . . . . . . . . . . . . . . . . 10-10 Package files . . . . . . . . . . . . . . . . 12-3 Using the command-line compiler ActiveX controls . . . . . . . . . . . . . . 12-3 and linker . . . . . . . . . . . . . . . . 10-12 Helper applications . . . . . . . . . . . . 12-3 Package files created by a successful DLL locations. . . . . . . . . . . . . . . . 12-3 compilation . . . . . . . . . . . . . . . 10-12 Deploying database applications . . . . . . . . 12-4 Deploying packages . . . . . . . . . . . . . . . 10-13 Providing the database engine. . . . . . . . 12-4 Deploying applications that use Borland Database Engine . . . . . . . . . 12-4 packages. . . . . . . . . . . . . . . . . . . 10-13 Third-party database engines . . . . . . 12-5 Distributing packages to other SQL Links. . . . . . . . . . . . . . . . . . 12-5 developers. . . . . . . . . . . . . . . . . . 10-13 Package collection files . . . . . . . . . . . 10-13 vi Multi-tiered Distributed Application Chapter 14 Services (MIDAS). . . . . . . . . . . . . . .12-6 Building one- and two-tiered Deploying Web applications . . . . . . . . . . .12-6 applications 14-1 Programming for varying host environments. . . . . . . . . . . . . . . . . . .12-6 BDE-based applications . . . . . . . . . . . . . 14-2 Screen resolutions and color depths . . . . .12-7 BDE-based architecture. . . . . . . . . . . . 14-2 Considerations when not Understanding databases and dynamically resizing . . . . . . . . . . . .12-7 datasets . . . . . . . . . . . . . . . . . . 14-3 Considerations when dynamically Using sessions . . . . . . . . . . . . . . . 14-3 resizing forms and controls . . . . . . .12-7 Connecting to databases . . . . . . . . . . . 14-4 Accommodating varying color Using transactions. . . . . . . . . . . . . . . 14-5 depths . . . . . . . . . . . . . . . . . . .12-8 Explicitly controlling transactions . . . . 14-5 Fonts. . . . . . . . . . . . . . . . . . . . . . .12-9 Using a database component for Windows versions . . . . . . . . . . . . . . .12-9 transactions. . . . . . . . . . . . . . . . 14-6 Software license requirements . . . . . . . . . 12-10 Using the TransIsolation property . . . . 14-7 DEPLOY.TXT . . . . . . . . . . . . . . . . . 12-10 Using passthrough SQL. . . . . . . . . . 14-8 README.TXT . . . . . . . . . . . . . . . . 12-10 Using local transactions. . . . . . . . . . 14-8 No-nonsense license agreement . . . . . . 12-10 Caching updates. . . . . . . . . . . . . . . . 14-9 Third-party product documentation. . . . 12-10 Creating and restructuring database tables . . . . . . . . . . . . . . . . . . . . 14-10 Part II ADO-based applications. . . . . . . . . . . . 14-10 Developing database applications ADO-based architecture . . . . . . . . . . 14-10 Understanding ADO databases and datasets. . . . . . . . . . . . . . . .14-11 Chapter 13 Connecting to ADO databases. . . . . . . .14-11 Designing database applications 13-1 Retrieving data . . . . . . . . . . . . . . . 14-12 Using databases . . . . . . . . . . . . . . . . . .13-1 Creating and restructuring ADO Types of databases . . . . . . . . . . . . . . .13-2 database tables. . . . . . . . . . . . . . . 14-12 Local databases . . . . . . . . . . . . . . .13-2 Flat-file database applications. . . . . . . . . 14-13 Remote database servers. . . . . . . . . .13-2 Creating the datasets . . . . . . . . . . . . 14-14 Database security. . . . . . . . . . . . . . . .13-3 Creating a new dataset using Transactions. . . . . . . . . . . . . . . . . . .13-3 persistent fields. . . . . . . . . . . . . 14-14 Data Dictionary. . . . . . . . . . . . . . . . .13-4 Creating a dataset using field and Referential integrity, stored procedures, index definitions . . . . . . . . . . . . 14-14 and triggers . . . . . . . . . . . . . . . . . .13-5 Creating a dataset based on an Database architecture . . . . . . . . . . . . . . .13-6 existing table . . . . . . . . . . . . . . 14-15 Planning for scalability . . . . . . . . . . . .13-7 Loading and saving data . . . . . . . . . . 14-16 Single-tiered database applications . . . . .13-8 Using the briefcase model . . . . . . . . . 14-16 Two-tiered database applications. . . . . . .13-9 Scaling up to a three-tiered application . . . 14-17 Multi-tiered database applications . . . . . .13-9 Designing the user interface . . . . . . . . . . 13-11 Chapter 15 Displaying a single record. . . . . . . . . . 13-11 Creating multi-tiered applications 15-1 Displaying multiple records. . . . . . . . . 13-12 Advantages of the multi-tiered database Analyzing data . . . . . . . . . . . . . . . . 13-12 model. . . . . . . . . . . . . . . . . . . . . . . 15-2 Selecting what data to show . . . . . . . . 13-13 Understanding MIDAS technology. . . . . . . 15-2 Writing reports . . . . . . . . . . . . . . . . 13-15 Overview of a MIDAS-based multi-tiered application. . . . . . . . . . . 15-3 vii The structure of the client application . . . .15-4 Building Web applications using The structure of the application server. . . .15-4 InternetExpress . . . . . . . . . . . . . . 15-27 Using transactional data modules . . . .15-5 Building an InternetExpress Pooling remote data modules . . . . . . .15-7 application . . . . . . . . . . . . . . . 15-27 Using the IAppServer interface . . . . . .15-8 Using the javascript libraries . . . . . . 15-28 Choosing a connection protocol . . . . . . .15-9 Granting permission to access and Using DCOM connections. . . . . . . . .15-9 launch the application server. . . . . 15-29 Using Socket connections . . . . . . . . .15-9 Using an XML broker. . . . . . . . . . . . 15-30 Using Web connections. . . . . . . . . . 15-10 Fetching XML data packets. . . . . . . 15-30 Building a multi-tiered application . . . . . . 15-11 Applying updates from XML Creating the application server. . . . . . . . . 15-11 delta packets . . . . . . . . . . . . . . 15-31 Setting up the remote data module. . . . . 15-13 Creating Web pages with a MIDAS Configuring the remote data page producer . . . . . . . . . . . . . . . 15-32 module when it is not Using the Web page editor . . . . . . . 15-32 transactional. . . . . . . . . . . . . . . 15-13 Setting Web item properties . . . . . . 15-33 Configuring a transactional remote Customizing the MIDAS page data module . . . . . . . . . . . . . . . 15-14 producer template . . . . . . . . . . . 15-34 Creating a data provider for the Chapter 16 application server. . . . . . . . . . . . . . 15-15 Extending the application server’s Using provider components 16-1 interface . . . . . . . . . . . . . . . . . . . 15-15 Determining the source of data . . . . . . . . . 16-1 Adding callbacks to the application Choosing how to apply updates . . . . . . . . 16-2 server’s interface . . . . . . . . . . . . 15-16 Controlling what information is included Extending a transactional application in data packets. . . . . . . . . . . . . . . . . . 16-2 server’s interface . . . . . . . . . . . . 15-16 Specifying what fields appear in data Creating the client application . . . . . . . . . 15-16 packets . . . . . . . . . . . . . . . . . . . . 16-2 Connecting to the application server. . . . 15-17 Setting options that influence the data Specifying a connection using packets . . . . . . . . . . . . . . . . . . . . 16-3 DCOM . . . . . . . . . . . . . . . . . . 15-18 Adding custom information to data Specifying a connection using packets . . . . . . . . . . . . . . . . . . . . 16-4 sockets . . . . . . . . . . . . . . . . . . 15-18 Responding to client data requests . . . . . . . 16-5 Specifying a connection using Responding to client update requests . . . . . 16-6 HTTP. . . . . . . . . . . . . . . . . . . 15-19 Editing delta packets before updating Brokering connections . . . . . . . . . . 15-19 the database . . . . . . . . . . . . . . . . . 16-6 Managing server connections. . . . . . . . 15-20 Influencing how updates are applied. . . . 16-7 Connecting to the server. . . . . . . . . 15-20 Screening individual updates . . . . . . . . 16-9 Dropping or changing a server Resolving update errors on the provider . . 16-9 connection . . . . . . . . . . . . . . . . 15-20 Applying updates to datasets that do not Calling server interfaces. . . . . . . . . . . 15-21 represent a single table . . . . . . . . . . . 16-9 Managing transactions in multi-tiered Responding to client-generated events. . . . 16-10 applications. . . . . . . . . . . . . . . . . . . 15-21 Handling server constraints . . . . . . . . . . 16-10 Supporting master/detail relationships. . . . 15-22 Supporting state information in remote Chapter 17 data modules . . . . . . . . . . . . . . . . . . 15-23 Managing database sessions 17-1 Writing MIDAS Web applications . . . . . . . 15-24 Working with a session component. . . . . . . 17-1 Distributing a client application as an Using the default session. . . . . . . . . . . 17-2 ActiveX control . . . . . . . . . . . . . . . 15-26 Creating additional sessions . . . . . . . . . 17-3 Creating an Active Form for the Naming a session . . . . . . . . . . . . . . . 17-4 client application . . . . . . . . . . . . 15-26 Activating a session. . . . . . . . . . . . . . 17-4 viii

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.