Sams borland c plus plus builder 6 developers guide 2nd edition dec 2002 ISBN 0672324806 pdf

1.1K 203 0
Sams borland c plus plus builder 6 developers guide 2nd edition dec 2002 ISBN 0672324806 pdf

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Bob Swart, Mark Cashman, Paul Gustavson, and Jarrod Hollingworth Borland C++Builder Developer’s Guide 201 West 103rd Street, Indianapolis, Indiana 46290 Borland C++Builder Developer’s Guide Copyright © 2003 by Sams Publishing All rights reserved No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher No patent liability is assumed with respect to the use of the information contained herein Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions Nor is any liability assumed for damages resulting from the use of the information contained herein Associate Publisher Michael Stephens Acquisitions Editor Carol Ackerman Development Editor Songlin Qiu Managing Editor Charlotte Clapp Project Editor Matthew Purcell International Standard Book Number: 0-672-32480-6 Library of Congress Catalog Card Number: 2002109779 Printed in the United States of America First Printing: December 2002 05 04 03 02 Copy Editor Chip Gardner Indexer Erika Millen Proofreaders Leslie Joseph Trademarks Suzanne Thomas All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized Sams Publishing cannot attest to the accuracy of this information Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark Technical Editor Warning and Disclaimer Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied The information provided is on an “as is” basis The authors and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or from the use of the CD or programs accompanying it Paul Qualls Team Coordinator Lynne Williams Multimedia Developer Dan Scherf Interior Designer Gary Adair Cover Designer Alan Clements Page Layout Juli Cook Graphics Steve Adams Tammy Graham Oliver Jackson Laura Robbins Contents at a Glance Introduction Part I C++Builder Essentials Introduction to C++Builder C++Builder Projects and More on the IDE Programming in C++Builder 81 Creating Custom Components Creating Property and Component Editors Part II 33 185 291 Database Programming 373 Borland Database Component Architecture 375 Database Programming 383 The Borland Database Engine 397 Client Datasets and Client Dataset Enhancements 409 10 Interbase Express Component Overview 417 11 ADO Express Components for C++Builder 435 12 Data Access with dbExpress 453 13 XML Document Programming and XML Mapper 467 Part III Windows Programming 489 14 Win 32 API Functional Areas 491 15 Graphics and Multimedia Techniques 579 16 DLLs 17 COM Programming Part IV 627 667 Distributed Computing 713 18 DCOM: Going Distributed 715 19 SOAP and Web Services with BizSnap 749 20 Distributed Applications with DataSnap 775 21 DataSnap Multitier Connections 811 22 Web Server Programming with WebSnap 835 Part V 23 Part VI Open Tools API 875 The Tools API: Extending the Borland IDE 877 Appendixes 929 A C++Builder Example Applications 931 B C++ Mobile Application Development 945 C Information Resources 973 D Enabling TXMLDocument for C++Builder Professional 993 Index 1009 Table of Contents Introduction Who Should Read This Book? How This Book Is Organized The Companion CD-ROM C++Builder System Requirements Conventions Used in This Book Part I C++Builder Essentials Introduction to C++Builder C++ Language ANSI Compliance Microsoft Compatibility 10 Recommended Language References 11 Borland Language Extensions and Standard Objects 11 try/finally 14 The VCL, Forms, and Components 14 The Form 15 The Component Palette 15 Events and Event Handlers 15 Testing the Program 18 Creating Your First Real Program 18 Commonly Asked Questions 24 What’s New in C++Builder 6? 25 Compatibility with Previous Releases—Projects 26 Compatibility with Previous Releases—Standard C++ Library 26 Compatibility with Previous Releases—Database Program Changes 27 Compatibility with Previous Releases—DsgnIntf Renamed and Split Up 27 Other New Features 27 Linux, Kylix, CLX, EJB, and C++Builder 28 CLX Overview 28 Cross-Platform Help System Integration 29 Simplified IDL, IIOP, and EJB 29 vi Borland C++Builder Developer’s Guide The C++ Standard Library 30 Containers 30 Memory Management 32 Summary 32 C++Builder Projects and More on the IDE 33 C++Builder IDE Features 33 Main Window and Toolbars 33 Project Manager 34 Arranging Windows in the IDE 34 Object Inspector 36 Property Categories in the Object Inspector 37 The Object Tree View 39 Source Code Editor 39 Forms—Save As Text 43 Understanding C++Builder Projects 44 Files Used in C++Builder Projects 45 Project Manager 48 Different Builds for Different Files 49 Custom Build Tools 50 Drag and Drop within Tree to Reorder Compilation 52 Understanding and Using Packages 53 Considerations When Using Packages 57 Using the C++Builder Interactive Debugger 58 Multithreaded Application Debugging 58 Advanced Breakpoints 60 Advanced Breakpoint Features 63 C++Builder Debugging Views 63 Watches, Evaluating, and Modifying 68 The Debug Inspector 69 Advanced Debugging 70 Locating the Source of Access Violations 71 Attaching to a Running Process 72 Using Just-In-Time Debugging 73 Remote Debugging 73 Debugging DLLs 75 Speeding Up Compile Times 76 Precompiled Headers 76 Other Techniques for Speeding Up Compile Times 78 Summary 79 Contents Programming in C++Builder vii 81 Better Programming Practices in C++Builder 82 Use a String Class Instead of char* 82 Understand References and Use Them Where Appropriate 83 Avoid Using Global Variables 86 Understand and Use const in Your Code 92 Be Familiar with the Principles of Exceptions 95 Use new and delete to Manage Memory 100 Understand and Use C++-Style Casts 105 Know When to Use the Preprocessor 106 Learn About and Use the C++ Standard Library 110 VCL Overview 110 It All Starts at TObject 111 Building on Existing Objects 112 Using the VCL 113 The C++ Extensions 116 VCL and CLX 123 Review of the Component Palette 123 Creating User Interfaces 126 Component Templates and Frames 126 Frames 128 Coping with Different Screen Conditions 137 Coping with Complexity in the Implementation of the User Interface 141 Enhancing Usability by Allowing Customization of the User Interface 147 Working with Drag and Drop 154 The Solution 154 The Code 154 How Does It Work? 157 Wrapping Up Drag and Drop 158 Nonvisual Components and Programming 159 Creating Multithreaded Applications 159 Understanding Multitasking 159 Understanding Multithreading 160 Creating a Thread Using API Calls 160 Understanding the TThread Object 164 viii Borland C++Builder Developer’s Guide Understanding the Main VCL Thread 170 Establishing Priorities 173 Timing Threads 175 Synchronizing Threads 178 Summary 183 Creating Custom Components 185 Creating, Compiling, and Installing Packages 185 Packaging Components 186 Compiling and Installing Packages 190 Creating Custom Components 191 Understanding Component Writing 191 Writing Nonvisual Components 195 Writing Visual Components 224 Creating Custom Data-Aware Components 255 Registering Components 266 The Streaming Mechanism 269 Advanced Streaming Requirements 270 Streaming Unpublished Properties 271 Distributing Components 276 Where Distributed Files Should Be Placed 276 Naming Packages and Package Units 279 Naming Components 280 Distributing Only a Design Time-Only Package 281 Distributing Components for Different Versions of C++Builder 283 Creating Component Palette Bitmaps 287 Using Guidelines in the Design of Components for Distribution 288 Taking a Look at Other Distribution Issues 288 Summary 289 Creating Property and Component Editors 291 Creating Custom Property Editors 294 The GetAttributes() Method 306 The GetValue() Method 306 The SetValue() Method 308 The Edit() Method 309 The GetValues() Method 313 Using the TPropertyEditor Properties 314 Contents Considerations When Choosing a Suitable Property Editor 314 Properties and Exceptions 316 Registering Custom Property Editors 317 Obtaining a TTypeInfo* (PTypeInfo) from an Existing Property and Class for a Non-VCL Type 319 Obtaining a TTypeInfo* (PTypeInfo) for a Non-VCL Type by Manual Creation 328 How to Obtain a TTypeInfo* for a Non-VCL Type 330 Rules for Overriding Property Editors 330 Using Images in Property Editors 331 The ListMeasureWidth() Method 336 The ListMeasureHeight() Method 337 The ListDrawValue() Method 338 The PropDrawValue() Method 344 The PropDrawName() Method 345 Creating Custom Component Editors 348 The Edit() Method 354 The EditProperty() Method 358 The GetVerbCount() Method 360 The GetVerb() Method 360 The PrepareItem() Method 361 The ExecuteVerb() Method 368 The Copy() Method 369 Registering Component Editors 371 Summary 372 Part II Database Programming 373 Borland Database Component Architecture 375 Borland Database Component Types Overview 375 Component Sets 375 The Borland Database Engine 377 BDE Single-Tier and dbGo 379 BDE/SQL Links, IBExpress, dbExpress, and dbGo (Two-Tier) 379 DataSnap Distributed Databases (Multitier) 379 Summary 381 ix x Borland C++Builder Developer’s Guide Database Programming 383 What Are Data Modules? 383 Why Use a Data Module? 384 How to Use a Data Module in Applications, DLLs, and Distributed Objects 385 What Goes in a Data Module? 387 How to Add Properties to a Data Module? 387 How to Use the Data Module Designer 388 The Object Tree View and the Data Module Designer 388 The Data Diagram Editor 389 Advanced Concepts in Data Module Usage 391 Form Inheritance with Data Modules 391 Handling Uneven Form Inheritance with Data Modules 392 How to Avoid Dependence on Specific User Interfaces 393 How to Work with Application-Specific and Framework Components in Data Modules 393 Data Modules in Packages 396 Summary 396 The Borland Database Engine 397 Introduction to the Borland Database Engine (BDE) 397 Single-Tier 398 BDE/SQL Links (Client/Server) 399 ODBC Using the BDE 399 Component Overview 400 Component Architecture 401 Connection Components 401 TTable—Non-SQL Dataset 402 TQuery—SQL Dataset 403 Summary 407 Client Datasets and Client Dataset Enhancements 409 Introduction to Client Dataset Concepts 409 Using Basic Client Datasets in the Client/Server Environment 411 Improving Performance with Client Datasets 412 Using Client Datasets in a Multitier Environment 413 Specialized Types of Client Datasets 414 Summary 415 1084 system services GetWinHandle_Specific() function, 542 File Mapping, 516 Files, 516 sample code listing, 519, 521-525 LookForWindowHandle() function, 541 Handles and Objects, 516 ScreenSize() function, 527 Help Support, 517 SetComputerName() function, 528 sample code listing, 538, 540 Atoms, 516 Clipboard, 516 Large Integer Operations, 517 Mailslots, 517 Console Support, 516 memory information, displaying, 529-530 DDE (Dynamic Data Exchange), 516 Memory Management, 517 Debugging, 516 DLL (Dynamic Link Library), 516 drive information, displaying SystemParametersInfo() function, 527 WindowsVersion() function, 525-526 System Messages, 518 System Shutdown, 518 PE (Portable Execution), 517 Tape Backup, 518 Pipes, 517 Time, 518 Power Management, 517 Windows Stations and Desktops, 518 Process and Thread, 517 GetDiskFreeSpace() function, 533 Registry, 517 WinSysUtil application, 519 Security, 517 system shutdown, 518, 576-577 GetDriveType() function, 533 Services, 517 System Shutdown service, 518 String Manipulation, 518 SystemParametersInfo() function, 527 GetVolumeInformation() function, 533 sample code listing, 530-533 SetVolumeLabel() function, 534 Error Message, 516 Event Logging, 516 file information, displaying CloseHandle() function, 537 CreateFile() function, 536-537 GetFileInformationBy Handle() function, 537 GetFileSize() function, 538 GetFileType() function, 537 LPBY_HANDLE_FILE_ INFORMATION structure, 537 sample code listing, 534-536 Structured Exception Handling, 518 Synchronization, 518 System Information, 518 system information, displaying T tab actions, 146 ButtonSystemInfoClick() function, 526 Tab Controls control, 556 ExitWindowsEx() function, 528 tables GetComputerName() function, 525 Tab folder, 937 closing, 402 master/detail tables, 403 GetSystemInfo() function, 526 nested tables, 798-800 GetSystemMetrics() function, 527 records, 402 GetTempPath() function, 527 GetUseName() function, 525 GetVersionEx() function, 525 ProcessorInfo() function, 526 opening, 402 TADOTable component, 438 adding/editing records, 442 data-source and dataaware controls, 442 database connections, 441 filters, 442-443 finding records in, 442 TCustomObjectBroker component 1085 iterating through, 442 filters, 442-443 properties, 412-413 opening, 442 finding records in, 442 write-through cache, 409 table names, 441 iterating through, 442 TColor component, 591-592 opening, 442 TColorProperty component, 296 table names, 441 TCOMConnection component TIBTable component, 428-429 transactions committing, 403 TAliasComboBox header file, 210 rolling back, 403 TAliasComboBox source file, 210 Connected, 783-784 starting, 402 Tape Backup service, 518 ProviderName, 784 TTable component adding records to, 402 editing records in, 402 master/detail tables, 403 transactions, 402-403 vtables, 675 TActionMainMenuBar component, 143 TActionToolBar component, 143-144 TAdapter component, 850 actions, 861-863 fields, 860 TAdapterPageProducer component, 852, 860-861 TADOCommand component, 438, 444-445 TADOConnection component, 438-439, 445-446 TADOCustomDataSet component, 446-447 TADODataSet component, 438, 445 TADOQuery component, 438, 443 TApplicationAdapter component, 851 TBDEClientDataSet component, 414 TBitmap component, 594-595 See also bitmaps TBrowseURL action, 147 TBrush component DataSnap clients, 783-784 properties RemoteServer, 784 TComponent component, 112, 216 TComponentEditor component definition code, 351-352 mouse responses, 349-350 virtual functions, 350-351 assigning to form canvases, 589-590 TComponentProperty component, 297 properties, 588 TConnectionBroker component, 825-826 TButton component, 480-481 TCanvas component, 581-582 DataSnap BDE servers, 826-827 filled shapes, 584-585 DataSnap clients, 827-828 lines and curves, 582-584 switching connections, 828-829 polygon shapes, 584 properties, 581-582 text, 585-586 TCaptionProperty component, 296 TCharProperty component, 296 TControl component, 112, 231-232 TCP/IP (Transmission Control Protocol/Internet Protocol), 816-818 TClassProperty component, 296 TCriticalThread component, 178-179 TClientDataSet component, 458, 822 TCursorProperty component, 297 client/server environments, 410-412 TCustomControl, 191 multitier environments, 410, 413-414 TCustomFrame component, 129 adding/editing records, 442 PacketRecords property, 801 data-source and data-aware controls, 442 TCustomizeActionBars action, 147 performance optimization, 412-413 TADOStoredProc component, 438, 443-444 TADOTable component, 438 database connections, 441 TCustomer component, 701-702 TCustomObjectBroker component, 819 How can we make this index more useful? Email us at indexes@samspublishing.com 1086 TDatabase component TDatabase component, 401, 463 TerminateThread() function, 170 TdataLink class, 260 terminating threads, 170 THelpContextAction component, 145 TDataSetAdapter component, 841-842, 850, 864-865 testing applications, 18 thin-client database model, 380 TDataSetProvider component, 822-823 TDataSource component, 823 TDBCtrlGrid component, 265-266 TDBMaskEdit control, 257-258, 262-263 TDCOMConnection component, 811-812 TDefaultEditor component definition code, 352-353 Bug Tracker sample application, 434 This User accounts (DCOM), 722 mobile applications, 949, 953 THREAD_PRIORITY_ABOVE_ NORMAL priority level, 173 XML transformations, 485 THREAD_PRIORITY_BELOW_ NORMAL priority level, 173 TExampleButton ExampleButton.cpp source file, 234-239 THREAD_PRIORITY_HIGHEST priority level, 173 ExampleButton.h header file, 232-234 THREAD_PRIORITY_IDLE priority level, 173 text drawing, 585-586 virtual functions, 350-351 saving forms as, 43-44 TDriveComboBox component, 218 Teechart folder, 933 Teixeira, Steve, 926 Tempest Software–Open Tools API, 926 Thinking in C++, Vol 1, 988 MemStatusWizard, 890 mouse responses, 349-350 TDownLoadURL action, 147 Theivendran, Ramesh, 454 TFont component, 590-591 TextData folder, 940 TextEdit folder, 941 TextExtent() function, 586 TextOut() function, 585 THREAD_PRIORITY_LOWEST priority level, 173 THREAD_PRIORITY_NORMAL priority level, 173 THREAD_PRIORITY_TIME_ CRITICAL priority level, 173 ThreadFormUnit.cpp file, 162-163, 179-180 ThreadFunc() function, 161, 164 TextRectv() function, 585 ThreadID property (TThread), 167 TfieldDataLink class, 256-257 threading models, 694-695, 779 auto_ptr class template, 91-92 TFileExit action, 146 threads component templates, 127-128 TFileOpen action, 145 creating with CreateThread() function, 160-164 TFilePrintSetup action, 145 main VCL threads, 170-172 STL (standard template library), 26 TFileRun action, 146 multithreading, 160 TEndUserAdapter component, 851-852 TFileSaveAs action, 145 priorities, 173-175 TFloatProperty component, 297 synchronizing, 170 TEndUserSessionAdapter component, 852 TFont component, 590-591 critical sections, 178-181 TFontProperty component, 297 mutexes, 182 TEnumProperty component, 297 TFrame component, 128 templates terminate() function, 98, 167, 170, 915 Terminated property (TThread), 167 TfileListBox class, 243 decendant classes, 131 inheritance, 135 TGraphicControl component, 112, 192, 230 TCriticalThread component, 178-179 terminating, 170 ThreadFormUnit.cpp, 162-163, 179-180 tools 1087 threading models, 694-695, 779 TimerProc() function, 554 custom build tools, 50-52 timers, 551-554 timing, 175-177 timeSetEvent() function, 552, 554 Data Diagram Editor, 389-390 TLabelThread component, 171-173 timing threads, 175-177 TPriorityThread component, 174-175 TIntegerProperty component, 297 TRandomThread component, 166-170 titles, 25 TThread component TJPEGImage component, 602 See also JPEG images Data Module Designer, 388-389 DCOMCnfg Applications tab, 717 Default Properties tab, 717-718 Default Protocols tab, 719 class definition, 164-166 TLabel, 192 Default Security tab, 719 methods, 167 TLabelThread component, 171-173 global security settings, 717-720 Threads folder, 937 tlb file extension, 675 Threads view (debugger), 66 TLE (Type Library Editor), 724 per-server security settings, 720-722 throw keyword, 97-98 TLocalConnection component, 820-821 properties, 166-167 throwing exceptions, 212 THTTPRIO component, 763-765 THTTPSoapCppInvoker component, 751 THTTPSoapDispatcher component, 751 TIBDataSet component, 429 versions, 717 debugger ApplyUpdates() function, 824-825 Attach to Process feature, 72 BDE legacy applications, 821-822 AVs (access violations), 71-72 preparing to upgrade, 822-824 breakpoints, 60-63 Debug Inspector, 69-70 TIBEvents component, 429-430 TLoginFormAdapter component, 851 TIBQuery component, 429 TMetaClass* open array, 268 TIBSQL component, 429 TIBStoredProc component, 429 TMethodProperty component, 297 TIBTable component, 428-429 TMS Software Web site, 981 TIBUpdateSQL component, 427-428 TMsgLog class, 223-224 TObject, 259 multithreaded application debugging, 58-59 TIDBClientDataSet component, 414 TObject component, 111-112 remote debugging, 73-75 ToDp.xtr file, 485 views, 63-68 Toggle command (View menu), 37 watches, 68 tiling bitmaps, 589-590 TImage component, 20 toolbars, 33, 556 time formats, 612-613 Toolbars control, 556 DLL LIB Util, 493 Time service, 518 tools See also Tools API Image Editor, 24 TileWindows() function, 496 DLLs (dynamic link libraries), 75 Evaluate/Modify dialog box, 68-69 JIT (just-in-time) debugging, 73 Windows environments, 70-71 timeKillEvent() function, 552 actions, 147 impdef, 493, 663-664 timerevent() event handler, 701-702 COFF2OMF, 661-662 Implib.exe, 662 compiler, 76-79 WSDL Importer, 758-763 How can we make this index more useful? Email us at indexes@samspublishing.com 1088 tools XML Mapping Tool loading documents into, 482 transformations, 483-488 Tools API, 877-879 creators custom Creator class, 916-919 ProcessMessages() function, 896 TPropertyEditor component, 294-297, 314 SetupMessageViewAccess () function, 896-897 TProvider component, 413 Show() function, 901-902 creating queries, 405 ToolsAPI.hpp file, 879 wizards, creating, 880 TQuery component, 403, 464 master/detail relationships, 404 class registration, 889 parameters, 404 Execute() function, 920-921 custom wizard classes, 886-889 Trackbars control, 557 File class, 919 interfaces, 881 interfaces, 915-916 testing, 890 TRandomThread component, 166-170 TNotifierObject class, 881-885 transactional objects (COM+), 670 Delphi, 885 DLLs (dynamic link libraries), 923-925 Tools API Source Code, 926 editors, 922 Tools menu commands tracking mouse, 597-598 transactions IDE extensions, debugging, 922-923 Build Tools, 50 ADO (ActiveX Database Objects), 440 Environment Options, 44 committing, 403 naming conventions, 879 Image Editor, 24 IEBExpress (InterBase Express), 427 notifiers custom DebugNotifier class, 904-915 defined, 903 Toolsapi folder, 933 ToolsAPI.hpp file, 879 Tooltip Controls, 557 managing with ADO (ActiveX Database Objects), 445 TOrdinalProperty component, 297 rolling back, 403 OTA (Open Tools API), 878 Torry’s Delphi Pages Web site, 981 transactional objects (COM+), 670 recommended reading, 926 ToXml.xtr file, 485 services, 890-891 TPagedAdapter component, 850 accessing, 892 TPageProducer component, 852 CreateProcess() function, 900 TPaintBox, 226-227 interfaces, 903-904 NTA (Native Tools API), 878 Execute() function, 893-895 FindCurrentProject() function, 897-899 FindMenuItemCaption() function, 900-901 HandleMessage() function, 902 interfaces, 891-892 TPen component crop regions, 587-588 properties, 586 TPersistent component, 112, 270 TPopupFrame component, 131-133 TPriorityThread component, 174-175 TPropertyAttributes Set values, 299-301 starting, 402 transformations transforming XML documents into data packets, 483-488 XML Mapping Tool, 483-485 creating, 485-486 example, 486-488 testing, 485 TXMLTransform component, 486 TXMLTransformClient component, 486 TXMLTransformProvider component, 486 TXMLTransformProvider component 1089 TransparentStretchBlt function, 595 TSQLConnection component, 455-456 trapping messages, 214 TrayIcon folder, 937 TSQLDataSet component, 456-457 TRDSConnection component, 438 TSQLMonitor component, 460-463 TWebAppDataModule component, 847 Tree View Controls, 557 TSQLQuery component, 456 TreeView1Change() function, 503 TSQLStoredProcedure component, 456 TWebAppPageModule component, 847 triggers, 421-422 TSQLTable component, 456 troubleshooting See debugging try keyword, 96 try/finally blocks, 14 TStaticListAction action, 146 TStoredProcedure component, 464 TScrollBox component, 141 TStringProperty component, 297 TScrollingWinControl component, 128 TStyleLabel component, 192 TSendMail action, 147 TTable components, 402-403, 464 TSession component, 401 TTableProducer component, 852 TSessionsService component, 859, 863 TThread component TSetElementProperty component, 297 methods, 167 TSetProperty component, 297 class definition, 164-166 properties, 166-167 TShellFileListItem class, 245 TTimer component, 551 TSHFileListBox TTypeInfo structure SHFileListBox.cpp source file, 248-255 creating manually, 328-330 SHFileListBox.h header file, 247-248 obtaining from existing property and class, 319-328 declaring, 319 tutorials, BITS C++Builder Information and Tutorials Web site, 979 TVirtualListAction action, 146 TWebConnection component, 812-814 TWinControl component, 112, 191 TWinHelpViewer interface, 29 two-dimensional arrays, 104 two-tier database architecture, 379 TwoForms folder, 937 TWSDLHTMLPublish component, 751 TXMLDocument component, 467, 993-994 accessing, 1006 di_IDOMDocument interface, 469 di_IXMLDocument interface, 470 IXMLDocument interface, 470 package assembly, 1005 properties, 468-469 TSimpleObjectBroker component, 819-820 non-VCL property types in single class, 322-323 reading XML documents, 470-471 TSOAPConnection component, 829-830 NonVCLTypeInfo.cpp, 324-327 registering, 994-1004 Enterprise SOAP clients, 832-834 Enterprise SOAP servers, 830-832 NonVCLTypeInfo.h, 323-324 TTypeKind structure, 319 writing XML documents, 471-472 xmlcomponent.pas package source, 994-1004 tuning performance See performance optimization TXMLTransform component, 486 TSplitter component, 139-141 TUpdateSQL component, 405-406 TXMLTransformClient component, 486 TSQLClientDataSet component, 414, 459-460 TurboPower Software Company Web site, 981 TXMLTransformProvider component, 486 TSocketConnection component, 816-818 How can we make this index more useful? Email us at indexes@samspublishing.com 1090 TxxxConnection component TxxxConnection component, 822 updating databases ApplyUpdates() function, 789-790 type libraries, 670, 674-675 header file declarations, 676-677 cached updates, 432 data-aware components, 263-265 importing, 685-686 Type Library Editor, 676 viewing, 675 upgrades, preparing for, 822-824 Type Library command (View menu), 724 URL property (TWebConnection component), 813 Type Library Editor, 676, 724 Use CLX option (DLL Wizard), 629 types variables BorlandIDEServices, 892 DLL shared variables declaring and initializing, 658 identifying, 657-658 global variables avoiding, 86-89 global form pointer variables, 89-92 member variables, 11 private variables, 195-196 HDC, 226 Use VCL option (DLL Wizard), 629 VarLock folder, 941 RGBTRIPLE, 600 Usenet newsgroups, 985-986 VarToInt folder, 941 user customization of GUIs, 147 VC++ Style DLL option (DLL Wizard), 630 docking, 148 U OnDockDrop event, 152 OnDockOver event, 151 Unable to connect to remote host (error message), 75 unavailable database (error message), 456 Unbind() function, 728 unexpected exceptions, 98 unhandled exceptions, 98 Unicode, 572 unidirectional cursors (dbExpress), 458-459 Units menu commands (View menu), 47 Unlock() function, 168 unpublished properties, 195-198, 271-275 building objects with, 112-113 OnGetSiteInfo event handler, 150-151 C++ extensions, 116 hiding/displaying controls, 153 Understanding COM+, 711 unexpected() function, 98 OnEndDock event, 149-150 form backgrounds, 153 underscore (_), 14, 639 system colors, 147-148 user interfaces See GUIs (graphical user interfaces) User_Name property (TSQLConnection component), 456 UserName property (TWebConnection component), 814 utilities See tools UpdateData() function, 263 UpdateRegistry() function, 781-782, 814-816 _automated, 116 _classid, 117 _closure, 117-118 _declspec, 118-122 _fastcall, 122 _property, 122 _published, 122-123 compared to C++ classes, 113-116 main VCL thread, 170-172 nonpersistent data, 111 persistent data, 111 wrappers, 111 Up-Down Controls, 557 UpdateAppInfo() function, 503 VCL (Visual Component Library), 14-15, 110-113, 190, 194-195 See also components V ValidCtrCheck() function, 135, 266, 285 VarArray folder, 941 VCL_MESSAGE_HANDLER template, 690 VCM (Video Compression Manager), 549 vector containers, 30 Web server programming version property, 200 versions of C++Builder, 283-287 Video Compression Manager (VCM), 549 Visual Component Library See VCL visual components 1091 waveOutClose() function, 622 waveOutOpen() function, 622 graphics, 227-230 waveOutPrepareHeader() function, 622 All, 37 mouse messages, responding to, 230-232 waveOutWrite() function, 622, 625 Debug Windows, 60 parent classes, 225 None, 37 TCanvas object, 225-227 wavGetStreamInfo() function, 621 Object Inspector, 24 windowed components, 240-255 wavOutUnprepareHeader() function, 622 writing, 224, 232-240 wavPlayOpen() function, 625 View menu commands Project Manager, 24 Toggle, 37 VMTs (Virtual Method Tables), 675 weak packages, 57 Type Library, 724 Units, 47 vprintf() function, 82 Web modules viewing vtables, 675 cpp files, 47 source code, 24 type libraries, 675 views creating, 840-841 SOAP (Simple Object Access Protocol), 751-752 h files, 47 property categories, 37 Web action items, 836, 847 TWebAppDataModule component, 847 W W3C (World Wide Web Consortium) Web site, 982 WaitFor() function, 167 Web server programming (WebSnap), 835 adapters Data Module Designer, 388-389 WaitForSingleObject() function, 182-183 Adapter Actions, 850 debugger views watches, 68 custom adapters, 852 wavCalculateBufferSize function, 621 TAdapter, 850, 860-863 Call Stack view, 65-66 CPU view, 64-65 FPU (Floating-Point Unit) view, 67-68 Modules view, 67 Threads view, 66 Object Tree view, 39 virtual functions, 301-303, 350-351 Virtual Method Tables (VMTs), 675 virtual protected functions, 209 VirtualListView folder, 933 visibility of controls, 153 VisibleChanging() function, 134 Waveform Audio Interface, 549 audio files, 617-618 audio output devices audio playback, 622-625 closing, 622 opening, 622 audio streams reading, 619-621 Adapter Fields, 849-850 TApplicationAdapter, 851 TDataSetAdapter, 841-842, 850, 864-865 TEndUserAdapter, 851-852 TEndUserSessionAdapter, 852 TLoginFormAdapter, 851 TPagedAdapter, 850 retrieving pointers to, 618-619 compared to WebBroker, 848 writing to, 620-621 master-detail relationships, 864-865 WAVEFORMATEX structure, 622 data modules, 841, 848 WAVEHDR structure, 622 How can we make this index more useful? Email us at indexes@samspublishing.com 1092 Web server programming page modules, 847-848 Web modules SOAP (Simple Object Access Protocol) servers creating, 842-843 creating, 840-841 TWebAppPageModule component, 847 SOAP (Simple Object Access Protocol), 751-752 activation model, 752-753 TWebAppDataModule component, 847 Web module, 751-752 WebAppDebugger, 835-836 Web service interfaces, 754-755 producers TAdapterPageProducer, 852, 860-861 TPageProducer, 852 TTableProducer, 852 sample application, 839 data module, 841, 852 DataSetAdapter, 841-842 debugging, 845-846 deployment, 843-844, 872-873 EndUserSessionAdapter, 858 incorrect login, 857 linked pages, 868-871 login form, 856 login page, 855 LoginFormAdapter, 856 page modules, 842-843, 854, 865-868, 872 running, 836-838 Web action items, 836 wizards New WebSnap Application Wizard, 839 deploying, 755-757 Invokable Registry, 753 SOAP server applications, 750-751 Web sites, 981-982 Web sites, 973 Amazon.com, 11 WebSnap Application Wizard, 847 ANSI (American National Standards Institute), WebSnap Page Module Wizard, 842 BCB CAQ, 979 Web Services, 749 CmInch, 752 BCB–An Intro to Cultural Simulation and Visualization, 979 Cm2Inch function, 754-755 BCBDEV, 77 CmInchFactory function, 753 BITS C++Builder Information and Tutorials, 979 consuming, 763-765 Borland BCBDev.COM, 979 starting, 853 ICmInch interface, 756-757 BDN (Borland Developer Network), 973-976 Web module, 840 import unit, 758-763 WebUserList, 854 Inch2Cm function, 754-755 BorCon (Borland Developers Conference), 990 server-side scripting, 848-849 sessions, 858 TAdapter actions, 861-863 TAdapter fields, 860 TAdapterPageProducer component, 860-861 TSessionsService component, 859, 863 Web action items, 836, 847 IWSDLPublish interface, 756 consuming, 757 GetICmInch function, 765 Code Central, 1005 CodeCentral, 976-977 dbExpress, 454 home page, 973-974 QualityCentral, 977-978 THTTPRIO component, 763-765 C++.org, 980 WSDL Importer, 758-763 C++Builder, 7, 26 Google Web Service, 765 Google searches, 766-772 Google Web APIs, 766 Search Key, 766 C++Builder Developer’s Journal, 989 C/C++ Users Journal, 989 COM (Component Object Model) resources, 711-712 WebSnap dbExpress third-party drivers, 454 Woll2Woll, 981 XMethods, 982 1093 sample application, 839 data module, 841, 852 Delphi Informant, 989 WebActionItem object, 836 DataSetAdapter, 841-842 Delphi Super Page, 980 WebAppDebugger, 835-836 debugging, 845-846 Dr Bob’s C++Builder Gate, 979 Eagle Software, 981 Getting started with C++ on the Nokia 9200 Series Communicator (white paper), 969 GIF (Graphics Interchange Format), 605 Google Groups, 986 Indy (Internet Direct) Components, 981 running, 836-838 Web action items, 836 WebBroker, 848 WebServ folder, 933 WebServices folder, 934 WebServices page (Component Palette), 126 incorrect login, 857 linked pages, 868-871 login form, 856 login page, 855 WebSnap, 835 LoginFormAdapter, 856 adapters page modules, 842-843, 854, 865-868, 872 Adapter Actions, 850 InterBase Objects, 418 Adapter Fields, 849-850 JPEG, 602 custom adapters, 852 Microsoft TAdapter, 850, 860-863 COM Technologies, 982 TApplicationAdapter, 851 DCOM95 download site, 716 TDataSetAdapter, 841-842, 850, 864-865 MSDN (Microsoft Developer Network), 982-983 TEndUserAdapter, 851-852 mobile application resources, 971 EndUserSessionAdapter, 858 WebServices.org Web site, 982 InformIT, 987 MJFSecurity, 117 deployment, 843-844, 872-873 TEndUserSessionAdapter, 852 TLoginFormAdapter, 851 TPagedAdapter, 850 starting, 853 Web module, 840 WebUserList, 854 server-side scripting, 848-849 sessions, 858 TAdapter actions, 861-863 TAdapter fields, 860 TAdapterPageProducer component, 860-861 TSessionsService component, 859, 863 Web action items, 847 Web modules Nokia 9200 Series SDK, 969 compared to WebBroker, 848 PNGDIB conversion library, 606 data modules, 841, 848 creating, 840-841 QaDRAM.Delphi, 981 master-detail relationships, 864-865 Raize Software, 981 SOAP (Simple Object Access Protocol), 751-752 page modules, 847-848 Thinking in C++, Vol 1, 988 creating, 842-843 TMS Software, 981 TWebAppPageModule component, 847 Torry’s Delphi Pages, 981 TurboPower Software Company, 981 W3C (World Wide Web Consortium), 982 WebServices.org, 982 producers TAdapterPageProducer, 852, 860-861 TWebAppDataModule component, 847 WebAppDebugger, 835-836 running, 836-838 Web action items, 836 WebSnap folder, 934 TPageProducer, 852 TTableProducer, 852 How can we make this index more useful? Email us at indexes@samspublishing.com 1094 WebSnap wizards New WebSnap Application Wizard, 839 common dialogs, 558-562 example, 559, 561 VCL equivalents, 558 multimedia services ACM (Audio Compression Manager), 548 WebSnap Application Wizard, 847 DLLs (dynamic link libraries), 492 Audio Mixers, 548 WebSnap Page Module Wizard, 842 GDI (graphical device interface), 542-543 AVIFile, 548 Wharton, Jason, 418 Width property (TPen component), 586 Win32 API, 491-494 See also functions; GDI (graphical device interface) common controls CombineRgn() function, 545-547 CreateEllipticRgn() function, 544-545 CreatePolygonRgn() function, 547 Animation, 555 CreateRoundRectRgn() function, 543-544 ControlBoxEx, 555 device contexts, 542 Date and Time Picker, 555 objects, 542 regions, 543 AVICap, 548 DrawDib, 548 Joysticks, 548 MCI (Media Control Interface), 548 MCIWnd Window, 548 MIDI, 549 Multimedia File, 549 multimedia file playback, 549-551 Multimedia Timers, 549-554 Drag List Box, 555 international features, 572 example, 557-558 VCM (Video Compression Manager), 549 MCI (Media Control Interface), 609 Waveform Audio, 549 Flat Scroll Bar, 555 Header Controls, 555 closing devices, 613-614 Hot-Key Controls, 555 device status, 614-615 Image List, 556 IP Address, 556 device time formats, 612-613 List View, 556 errors, 610-611 Monthly Calendar, 556 fast-forwarding devices, 613-614 Page Scroller, 556 Progress Bars, 556 Property Sheets, 556 Rebar, 556 Status Bar, 556 Tab Controls, 556 messages, 610-616 notifications, 615-616 opening devices, 611-612 playing devices, 613-614 polling devices, 615-616 Toolbars, 556 rewinding devices, 613-614 Tooltip Controls, 557 stopping devices, 613-614 Trackbars, 557 supported file types, 616-617 Tree View Controls, 557 Up-Down Controls, 557 VCL equivalents, 555-557 messages, 495 network services, 572 NetBIOS interface, 573 Network DDE, 573 network information, returning, 573-576 NT Workstation locking, 576 ported LAN Manager functions, 573 RAS (Remote Access Service), 573 SNMP (Simple Network Management Protocol), 573 system shutdown, 576-577 WinSock, 573 WNet, 573 regions combining, 545-547 defined, 543 windows oval regions, 544-545 1095 polygon regions, 547 Memory Management, 517 responding to messages, 514-515 rectangular regions, 543-544 PE (Portable Execution), 517 window management functions, 494-496 Pipes, 517 WinManUtil sample project, 496-497 drag and drop, 562 Power Management, 517 Process and Thread, 517 Windows kernel library, 515 file association, 562 file backups, 565-569 Registry, 517 file deletion, 570-572 Security, 517 icons, 563 Services, 517 windowed components, 112, 191, 240-255 ShellExecute() function, 563-564 String Manipulation, 518 windows shell features ShellExecuteEx() function, 564-565 system services, 515 Structured Exception Handling, 518 Synchronization, 518 System Information, 518 applications, launching, 538-542 system information, displaying, 519, 521-528 Atoms, 516 System Messages, 518 Clipboard, 516 System Shutdown, 518 Console Support, 516 Tape Backup, 518 DDE (Dynamic Data Exchange), 516 Time, 518 Debugging, 516 Windows Stations and Desktops, 518 DLL (Dynamic Link Library), 516 WinSysUtil application, 519 drive information, displaying, 530-534 Error Message, 516 Event Logging, 516 file information, displaying, 534-538 Waveform Audio Interface docking, 34-36 enumerating, 497-504 ButtonEnumWindows Click() function, 502 EnumWindows() function, 502 GetClassName() function, 503-504 GetWindowLong() function, 503-504 GetWindowRect() function, 504 GetWindowText() function, 503-504 GetWindowTextLength() function, 504 audio output devices, 622-625 GetWindowThreadProcess ID() function, 503-504 audio streams, 618-621 GetWinHandleAll() function, 502 windows animation, 512-513 Files, 516 enumerating, 497-504 Handles and Objects, 516 external window control, 504-507 Large Integer Operations, 517 flashing, 510-512 Mailslots, 517 message handling, 507-510 memory information, displaying, 529-530 animation, 512-513 audio files, 617-618 File Mapping, 516 Help Support, 517 window management functions, 494-496 handles, 495 message identifiers, 513-514 ProcessHandleInformatio n() function, 503 sample code listing, 497-502 SetWindowText() function, 504 TreeView1Change() function, 503 UpdateAppInfo() function, 503 How can we make this index more useful? Email us at indexes@samspublishing.com 1096 windows external window control ButtonBringToFocus Click() function, 506 ButtonChangeTitleClick() function, 505 message identifiers, 513-514 WinTools folder, 934 modal SDI (single document interface) windows, 652-653 wizards Object Inspector, 36-37 creating with Tools API, 880 class registration, 889 ButtonHideClick() function, 507 Object Tree view, 39 custom wizard classes, 886-889 property categories, 37-39 ButtonMaximizeClick() function, 507 interfaces, 881 pop-up windows, 131-135 testing, 890 Project Manager, 34 TNotifierObject class, 881-885 PostMessage() function, 506 sample code listing, 504505 SendMessage() function, 506 SetForegroundWindow() function, 506 SetWindowText() function, 505 flashing FlashWindow() function, 510-512 FlashWindowEx() function, 510-511 handles, 495 main window, 33 MDI (multiple document interface) child windows, 653-655 message handling ButtonMoveRightMouse Down() function, 509 ButtonMoveRightMouse Up() function, 510 MoveWindow() function, 509 MyWndProc() function, 509 PostMessage() function, 509 RegisterWindowMessage() function, 509 sample code listing, 507-508 responding to messages, 514-515 Source Code Editor, 39-40 Code Insight, 42 Diagram tab, 40-42 window layout, 137-138 DLL Wizard DLLEntryPoint function, 628 DLLMain function, 628-631 alignment, 138-139 header files, 632-633 anchors, 139 opening, 629 TScrollBox component, 141 options, 629-630 TSplitter component, 139-141 skeleton applications, 630 window management functions, 494-496 WinManUtil sample project, 496-497 Windows 32-bit API See Win32 API sample methods, 631-632 source types, 629 MemStat Wizard, 880 class registration, 889 CreateProcess() function, 900 Windows kernel library, 515 Execute() function, 893-895, 910-914, 920-921 Windows Networking (WNet), 573 FindCurrentProject() function, 897-899 Windows operating system, 982-983 See also Win32 API FindMenuItemCaption() function, 900-901 Windows Stations and Desktops service, 518 HandleMessage() function, 902 WindowsVersion() function, 525-526 interfaces, 881 WinMain() function, 496 MemStatusWizard class, 886-889, 896 WinManUtil sample project, 496-497 ProcessMessages() function, 896 WinSock, 573 WinSysUtil application, 519 public declarations, 905-906 ZeroMemory() function SetProcessActive() function, 909 events, 205-208, 221-224 SetupMessageView Access() function, 896-897 keywords, 203-204, 213-214 exceptions, 211-212 Show() function, 901-902 SpeedButtonStartClick() function, 902 testing, 890 WebSnap New WebSnap Application Wizard, 839 WebSnap Application Wizard, 847 di_IXMLDocument interface, 470 methods, 208-211 IXMLDocument interface, 470 package assembly, 1005 properties, 468-469 registering, 994-1004 visual components, 224, 232-240 xmlcomponent.pas package source, 994-1004 graphics, 227-230 writing, 471-472 mouse messages, responding to, 230-232 XML Mapping Tool parent classes, 225 TCanvas object, 225-227 WMDropFiles event handler, 156-157 WM_DROPFILES messages, 215 messages, responding to, 214-216 RegisterComponents() function, 268 XML Data Binding Wizard, 473-475 wmMoveAWindow() function, 509 accessing, 1006 linking, 218-221 properties, 195-203 WebSnap Page Module Wizard, 842 WmDropFiles() function, 215 TXMLDocument component, 467, 993-994 di_IDOMDocument interface, 469 order of creation, 204-205 TNotifierObject class, 881-885 1097 windowed components, modifying, 240-255 XML documents, 471-472 loading documents into, 482 transformations, 483-488 XML Data Binding Wizard, 473-475 XML Mapping Tool WSAStarup() function, 575 loading documents into, 482 WSDL Importer, 758-763 transformations, 483-485 creating, 485-486 WNet, 573 example, 486-488 Woll2Woll Web site, 981 testing, 485 Workstations, locking, 576 X-Z Wpm folder, 937 XMethods Web site, 982 wrappers, 111 XML (Extensible Markup Language) documents, 467 See also Web Services write access, 257-258 write() function, 202, 239 write_dib_to_png function, 606 BizSnap.xml example, 467-468 write-through cache, 409 data binding writing BizSnap example, 476-482 to audio streams, 620-621 components, 191-192 non-visual components default keyword, 203 designtime versus runtime, 216-218 XML Data Binding Wizard, 473-475 reading, 470-471 TXMLTransform component, 486 TXMLTransformClient component, 486 TXMLTransformProvider component, 486 XML property (TXMLDocument component), 468 xmlcomponent.pas package source, 994-1004 ZeroMemory() function, 570 transforming into data packets, 483-488 How can we make this index more useful? Email us at indexes@samspublishing.com JBuilder™ Developer’s Guide Michael Landy, Saleem Siddiqui, Jeff Swisher, with Erik Nickelson and Todd Story 067232427x $59.99US/$89.95CAN JBuilder™ Developer’s Guide provides comprehensive coverage of the award-winning JBuilder from the practitioner’s viewpoint The authors develop a consolidated application throughout the chapters, allowing conceptual cohesion and illustrating the use of JBuilder to build ‘real world’ applications The examples can be compiled and run under JBuilder Personal edition, a free edition of JBuilder JBuilder™ Developer’s Guide is not version specific but explains the latest JBuilder and features such as enterprise J2EE application development, CORBA, SOAP, XML tools, Enterprise JavaBeans™, JavaServer Pages/Servlets, and JavaBeans® technology JBuilder repeatedly wins “developer’s choice” awards as the best visual tool for developing Java applications Delphi™ Developer’s Guide Xavier Pacheco and Steve Teixeira 0672321157 $64.99US/$96.95CAN Xavier Pacheco and Steve Teixeira offer the best techniques and tricks for Delphi Learn to apply real-world applications, solutions, and projects to your own programs to become a more efficient and better Delphi developer Included in this edition is the latest information on CLX™, DataSnap™, Web Services/BizSnap™, wireless application development, and more! Kylix™ Developer’s Guide Charlie & Margie Calvert, John Kaster, Bob Swart 0672320606 $59.99US/$89.95CAN The Kylix™ Developer’s Guide introduces programmers to the new Borland® Delphi compiler for Linux The book provides comprehendsive coverage of CLS, a VCL-like visual programming library that runs on both Windows and Linux You’ll learn the Linux system environment, development of databases with CLX, and Web development with Kylix ... and practical reference on C+ +Builder to date Building on the success of C+ +Builder Developer’s Guide, we have concentrated on the essential elements and capabilities of C+ +Builder, including... Louise Delphine (6 years) Mark Cashman Mark Cashman is a Senior Architect for Hartford Technology Services Company, from which he provides consulting on strategic and tactical architecture for a variety... Creating an Interface in C+ +Builder 67 6 Implementing an Interface in C+ +Builder 67 8 Accessing a COM Object

Ngày đăng: 20/03/2019, 11:56

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan