Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

The VCF Book 0.9.8

Jim Crafton

Legal Notice
Revision History
Revision 0.6.025 March 2003JC
Initial public release
Revision 0.6.212 December 2003JC
Updates for 0-6-3, lots of new, complete, and more improved documentation (all 'cause I remembered to eat my Wheaties!).
Revision 0.6.39 August 2003JC
Updates for 0-6-2
Revision 0.6.42 April 2004JC
Updates for 0-6-4 changes. Added a few more examples
Revision 0.6.58 August 2004JC
Updates for 0-6-5 changes. Added a few more examples. Big thanks to Ed Monjay for starting to help out with the docs. This should make it big improvement in the very near future!
Revision 0.6.616 November 2004JC
Added a few more examples
Revision 0.6.8June 23 2005JC
Added further documentation
Revision 0.9.0March 4 2006JC
Added further documentation, plus new sections for the HTMLKit, InternetKit and OpenGLKit
Revision 0.9.8March 28 2007JC
Added further documentation, plus new sections for the DatabaseKit, RegExKit and JavaScriptKit
Revision 0.9.8November 26, 2007JC
Added new section for XMLKit
Revision 0.9.8April 27, 2008JC
Documentation updates in preparation for the new 0.9.8 release

Table of Contents

Introduction
1. Introduction to the Visual Component Framework
2. Why use the Visual Component Framework?
1. General
1.1. Features
1.2. Downloading the VCF
1.3. Required Tools
1.4. Installing the VCF
1.4.1. For Win32 systems
1.4.2. For Mac OSX systems
1.4.3. For Linux systems
1.4.4. Third Party Libraries
1.4.4.1. Open SSL on Win32
1.5. Building the VCF
1.5.1. VCF Tools
1.5.1.1. Microsoft Visual C++ 6
1.5.1.2. Microsoft Visual C++ 7/7.1
1.5.1.3. Microsoft Visual C++ 2005 8.0 (including Express edition)
1.5.1.4. Apple XCode 1.x
1.5.1.5. Apple XCode 2.x
1.5.2. Building the VCF Libraries
1.5.2.1. Win32
1.5.2.1.1. Microsoft Visual C++ 6
1.5.2.1.2. Microsoft Visual C++ 7.0
1.5.2.1.3. Microsoft Visual C++ 7.1
1.5.2.1.4. Microsoft Visual C++ 2005 8.0
1.5.2.1.5. Microsoft Visual C++ 6 using the Intel C/C++ compiler
1.5.2.1.6. Borland C++ Compiler
1.5.2.1.7. MinGW-GCC compiler with the Code::Blocks IDE
1.5.2.2. Building with Bakefiles
1.5.2.2.1. The Bakefile utility
1.5.2.2.2. Patching of the Bakefile utility
1.5.2.2.3. Environment Variables
1.5.2.2.4. Baked Make Files
1.5.2.2.5. Baked Project Files
1.5.2.2.6. Building Examples
1.5.2.2.7. Using bakefiles in your own project
1.5.2.2.8. Regenerating makefiles and VS6 project files
1.5.2.2.9. All-in-1 VS6 project
1.5.2.3. MacOSX
1.5.2.4. Linux
1.5.3. Library Support by Compiler
1.6. Contributing
1.6.1. Registering at SF
1.6.2. Setting up Subversion
1.6.3. Setting up CVS
1.6.4. Developing in the main VCF source tree
1.7. Standards
1.7.1. Coding and Naming Standards
1.7.2. Documentation Standards and Generation
1.8. Bugs
1.9. Mailing lists
1.10. Forums
2. Getting Started
2.1. A very simple VCF Application
2.2. Understanding the VCF directory tree
2.3. Accessing the Source Documentation
3. Core Libraries
3.1. FoundationKit
3.1.1. Uses
3.1.2. Startup and Shutdown
3.1.3. Command line parameters
3.1.4. VCF::Object - the VCF base class
3.1.5. System Toolkit
3.1.6. Reference Counting
3.1.7. Components
3.1.8. Exceptions
3.1.9. RTTI
3.1.10. Delegates and Callbacks (aka Event Handling)
3.1.11. Multithreaded programming support
3.1.11.1. Synchronization Primitives
3.1.11.1.1. SynchObjects
3.1.11.1.2. Waiting for ...
3.1.11.1.3. Mutexes
3.1.11.1.4. Semaphores
3.1.11.1.5. Conditions
3.1.11.2. Threads
3.1.11.2.1. Thread Manager
3.1.11.2.2. Run Loops
3.1.11.2.3. Threaded Functions
3.1.11.2.4. Thread Pools
3.1.11.2.5. Asynchronous Delegates
3.1.12. Strings
3.1.12.1. STL usage
3.1.12.2. Data Representation
3.1.12.3. Language Encoding
3.1.12.4. Conversion and Text Codecs
3.1.12.5. Formatting
3.1.12.6. Utilty Functions
3.1.12.6.1. Trimming
3.1.12.6.2. Number conversion
3.1.12.6.3. UUID generation
3.1.12.6.4. Type ID
3.1.12.6.5. Formatting
3.1.13. Locales
3.1.13.1. Naming
3.1.13.2. Numeric Formatting
3.1.13.3. Date Time Formatting
3.1.13.4. Collation
3.1.13.5. Translation
3.1.14. Resources
3.1.14.1. Accessing a resource
3.1.14.2. Program Information
3.1.14.3. Platform Specific
3.1.14.4. Platform Neutral
3.1.15. System Functions
3.1.15.1. String functions
3.1.15.2. Filesystem Functions
3.1.15.3. Date/Time Functions
3.1.15.4. Environment Functions
3.1.15.5. Resource functions
3.1.15.6. Locale functions
3.1.15.7. Miscellaneous functions
3.1.16. Dates and Time
3.1.16.1. Data Representation
3.1.16.2. Date Time Spans
3.1.16.3. Iterating
3.1.16.4. String Formatting
3.1.17. Streams
3.1.17.1. Base Functionality
3.1.17.2. Input Streams
3.1.17.3. Output Streams
3.1.17.4. Serializing classes
3.1.17.5. Serializing Variants
3.1.18. Files
3.1.18.1. File Searching
3.1.19. Dynamic Libraries
3.1.19.1. Init and term functions
3.1.20. Processes
3.1.20.1. Process Output
3.1.21. XML Parsing
3.1.21.1. SAX style parsing
3.1.21.2. DOM style parsing
3.2. GraphicsKit
3.2.1. The GraphicsContext
3.2.2. The GraphicsToolkit
3.2.3. Colors
3.2.4. Images
3.2.5. Fonts
3.2.6. Paths
3.2.7. Transforms
3.2.8. Strokes
3.2.8.1. Usage
3.2.8.2. Implementation
3.2.9. Fills
3.2.9.1. Usage
3.2.9.2. Implementation
3.2.10. Image Loading
3.2.11. Exceptions
3.2.12. Peer Classes
3.3. ApplicationKit
3.3.1. Introduction
3.3.2. Applications
3.3.3. UI Toolkit
3.3.3.1. Intro
3.3.3.2. UI Metrics
3.3.3.3. Event Loops
3.3.3.4. Timers
3.3.3.5. Carets
3.3.3.6. Posting Events
3.3.3.7. Default Buttons
3.3.3.8. Accelerators
3.3.3.9. Creating Peers
3.3.3.10. Miscellaneous
3.3.4. Event Loops
3.3.5. Event Types
3.3.6. Drag and Drop
3.3.7. Controls and Containers
3.3.7.1. Control Listing
3.3.8. Borders
3.3.9. Layout
3.3.9.1. Standard Container layout
3.3.9.2. Horizontal layout
3.3.10. Frames, Dialogs, and Windows
3.3.10.1. Dialog usage in VFC
3.3.10.1.1. Standard Dialogs
3.3.10.1.2. Custom Dialogs
3.3.10.2. Frame Sizing
3.3.10.3. Frame usage in the VFC
3.3.10.4. Window usage in the VFC
3.3.11. Model/View/Controller
3.3.11.1. Models
3.3.11.2. Items
3.3.11.3. Views
3.3.11.4. Controls
3.3.11.5. Document/View Architecture
3.3.12. Undo/Redo and Commands
3.3.13. Help
3.3.13.1. Implementing Help for Win32 systems
3.3.13.1.1. Creating the HTML Help project file
3.3.13.1.2. Adding HTML content
3.3.13.1.3. Adding Index/Search support
3.3.13.1.4. Adding a Table of Contents
3.3.13.1.5. Adding Context Sensitive entries
3.3.13.1.6. Adding "What's This" entries
3.3.13.1.7. Compiling the help with the HTML Help Compiler
3.3.14. Control Focus and Activation
3.3.15. Accelerator Keys ("Hot Keys")
3.3.16. Peer Classes
3.4. Component Authoring
3.4.1. Writing a Component
3.4.2. Property Editing
3.4.2.1. Creating a new property editor class
3.4.2.1.1. Attributes
3.4.2.1.2. Storing the property's value
3.4.2.1.3. Retreiving the property's value
3.4.2.1.4. Sub Properties
3.4.2.1.5. Multiple values and sorting
3.4.2.1.6. Painting the display of a property
3.4.2.2. Editing a Property
3.4.2.3. Registering Property Editors
3.4.3. Component Editing
3.4.3.1. Creating a new component editor class
3.4.3.1.1. Attributes
3.4.3.1.2. Accessing the Component Instance
3.4.3.1.3. Providing Commands
3.4.3.2. Editing a Component
3.4.3.3. Registering Component Editors
3.4.4. Saving and Loading Component State
3.4.5. Registering Components
3.4.5.1. Component Info
3.4.5.2. Component Manager
3.4.6. Distributing your Components and Editors
3.4.6.1. VPL Exported Functions
3.4.6.2. VPL Initialization
3.4.6.3. VPL Termination
4. Additional Libraries (usage is optional)
4.1. XML Kit
4.2. HTML Kit
4.3. Internet Kit
4.4. OpenGL Kit
4.5. NetworkKit
4.6. Database Kit
4.7. JavaScript Kit
4.8. RegEx Kit
4.8.1. Usage
4.9. RemoteObjectKit
4.10. ImageFormats
5. Tutorials
5.1. FoundationKit
5.1.1. Strings and characters
5.1.1.1. Strings
5.1.1.1.1. Concatenating Strings
5.1.1.1.2. Finding substrings
5.1.1.1.3. Extracting substrings
5.1.1.1.4. Formatting with the Format class
5.1.1.1.5. Strings and other types
5.1.1.1.6. Extracting type names
5.1.1.1.7. Changing case
5.1.1.1.8. Converting types to a String
5.1.1.1.9. Trimming a String
5.1.2. Dates and times
5.1.2.1. DatesAndTime
5.1.3. Reflection and RTTI
5.1.3.1. Reflection
5.1.4. Events
5.1.4.1. Event Basics
5.1.5. File System handling
5.1.5.1. Files and Directories
5.1.6. Streams
5.1.7. Enumerators
5.1.7.1. Working With Enumerators
5.1.8. Dictionaries
5.1.8.1. Dictionaries
5.1.9. Dynamic Library Loading
5.1.9.1. SharedLibraries
5.1.10. Threads
5.1.10.1. ThreadBasics
5.1.10.2. ThreadsInGUI
5.1.10.3. Conditions
5.1.11. Processes
5.1.12. Internationalization and Unicode
5.1.12.1. Localization
5.1.13. Resource Loading
5.2. GraphicsKit
5.2.1. GraphicsContext
5.2.1.1. GraphicsBasics
5.2.2. Text and Fonts
5.2.2.1. TextLayout
5.2.3. Images
5.2.3.1. ImageBasics
5.2.4. Advanced Graphics and Anti-Aliased support
5.2.4.1. StrokesAndFills
5.2.4.2. GraphicsAndMouseMoves
5.2.5. Affine Transformations
5.2.5.1. Transformations
5.2.6. Printing
5.2.6.1. Printing
5.3. ApplicationKit
5.3.1. Hello World
5.3.1.1. A Hello World application
5.3.1.2. Hello World Part 2
5.3.1.3. HelloWorld3
5.3.2. Heavyweight vs. Lightweight Controls
5.3.2.1. HeavyAndLight
5.3.3. Alignment, Anchors, and Layouts
5.3.3.1. Alignment
5.3.3.2. AdvancedAlignment
5.3.3.3. Anchors
5.3.4. MVC Basics
5.3.4.1. MVC Basics
5.3.5. Actions
5.3.5.1. Actions
5.3.6. Clipboard
5.3.6.1. Copy And Paste and the VCF Clipboard
5.3.7. Drag and drop
5.3.7.1. DragAndDrop
5.3.8. Cursor handling
5.3.9. Scrolling
5.3.9.1. Scrolling
5.3.10. Image viewer
5.3.10.1. ImageViewer
5.3.11. Lists and combos
5.3.12. Tree view control
5.3.13. Tree list control
5.3.14. Table control
5.3.15. List view control
5.3.16. Dialog Usage
5.3.16.1. Dialogs
5.3.17. Common dialogs (open, browse dir, select color, select font)
5.3.18. Window handling
5.3.19. Labels
5.3.19.1. Labels
5.3.20. Text fields
5.3.21. Progress bar
5.3.21.1. ProgressBars
5.3.22. Menus
5.3.23. Toolbars
5.3.23.1. Toolbars
5.3.24. Table Control
5.3.24.1. Tables
5.3.25. Splitter controls
5.3.25.1. Splitters
5.3.26. Slider
5.3.26.1. Sliders
5.3.27. Application and Window icons
5.3.27.1. ApplicationIcons
5.3.28. Dates and Times UI
5.3.28.1. DateTimeUI
5.3.29. Visual Form Files
5.3.29.1. VisualFormFiles
5.3.30. Advanced User Interface
5.3.30.1. AdvancedUI
5.3.31. Basic Document/View techniques
5.3.31.1. DocViewBasics
5.3.32. Advanced Document/View
5.3.32.1. DocViewAdvanced
5.3.33. System Tray
5.3.33.1. SysTray
5.4. NetworkKit
5.4.1. Basic TCP server
5.4.2. Basic TCP client
5.4.3. UDP
5.5. RemoteObjectKit
6. FAQ
6.1. General
6.2. Installation/Building the VCF
6.3. Contributing
6.4. Libraries
6.5. Miscellaneous
6.6. FoundationKit
6.7. GraphicsKit
6.8. ApplicationKit
6.8.1. MVC
6.9. Component Authoring
6.10. OpenGLKit
6.11. HTMLKit
6.12. InternetKit
6.13. NetworkKit
6.14. RemoteObjectKit
7. Tools
7.1. XMake
7.2. VCF Builder
8. Credits
8.1.

List of Tables

1.1.
1.2.
3.1.
3.2.
3.3.
3.4.
3.5.

List of Examples

5.1. Resources Example Code
   Comments or Suggestions?    License Information