This book will concentrate on C++ and some C# techniques that will benefit Visual Basic programmers. The author's approach is to cover things that "feel good" in each language and where the languages can enhance each other, then the basics of C++, from a VB programmer's perspective, and finally COM and ActiveX programming in depth. This book should be more practical than most; much of the code shown will be shipping commercially and have a demonstrated application. There will be a great deal of source code, and will include controls and COM objects that can be directly adopted by the reader.
Sprache
Verlagsort
Verlagsgruppe
Zielgruppe
Für höhere Schule und Studium
Maße
Breite: 231 mm
Dicke: 23 mm
Gewicht
ISBN-13
978-0-672-32218-1 (9780672322181)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Klassifikation
Bill Locke is a consultant with Oakwood Systems Group, a leading consulting firm based in St Louis, MO. Bill has been involved in the development of tools and add-ons for Visual Basic for as many years as Visual Basic has existed. The original author of VBTools, one of the first custom control packages for Visual Basic, he has developed Visual Basic tools in C and C++ for the past nine years. During most of those years, Bill worked as lead developer at MicroHelp Inc., once a leading tools vendor. He is currently a partner in BeCubed Inc., also a producer of add-on tools. During his tenure at MicroHelp, Bill headed up a development team for two releases of MicroHelp's UnInstaller for Windows (R), a successful utility in the retail market. During this time, he has spoken at VBITS and other conferences around the U.S. and the world about the complexities and virtues of using the C++ language and techniques to enhance Visual Basic programming.
0672322188AB03282002
Introduction.
1. How Did We Get We Here?
A History of Visual Basic and C++.
16 Bit.
32 Bit.
.NET.
Visual Basic's Contribution.
Strengths of Visual Basic.
Weaknesses of Visual Basic.
C++'s Contribution.
Strengths of C++.
Weaknesses of C++.
C#.
2. C Basics.
Tokens and Elements.
Keywords.
Identifiers.
Constants.
Literals.
Predefined Constants and Macros.
Structure.
Directives.
Code Structure.
Lifetime.
Scope and Visibility.
Functions.
Prototypes.
Definitions.
Invoking Functions.
main, wmain, DllMain.
Function Pointers.
Summary.
3. C Programming.
Variables and Data.
Type Specifiers and Qualifiers.
Variables and Declarators.
Initialization.
Expressions.
Operators and Precedence.
Precedence.
Conversions and Type Casts.
Statements.
Assignment.
Control and Flow.
Looping.
Summary.
4. C++ Basics.
Tokens and Elements.
C++ Keywords.
Identifiers.
Constants and Literals.
Structure.
Directives.
Scope, Visibility, and Lifetime.
Linkage.
Functions.
Prototype.
Variable Number of Parameters.
Overloading.
Variables and Data.
Runtime Type Information.
C++ Definitions and Declarations.
Variables and Declarators.
Namespace.
Expressions.
Operators.
Casting.
Statements.
Error Handling.
C++ Exception Handling.
Structured Exception Handling.
Summary.
5. C++ Classes.
Classes.
OOP Concepts.
Basics of Classes.
Names.
Class Members.
Member Variables.
Member Functions.
Member Access Control.
friend Functions.
Derived Classes.
Basics.
Multiple Base Classes.
Using Declaration.
Abstract Classes.
Summary.
6. C++ and Windows.
How the Windows System Works.
Processes and Threads.
Message Subsystem.
How a Windows Program Works.
Window Class.
Creating a Main Window.
Base Services.
GDI.
Summary.
7. C DLLs.
Tutorial for Creating a Simple C DLL.
Using Visual C++ to Create the DLL.
Exporting the Function from C.
Prototyping the Function.
Writing the Function.
Starting Visual Basic from the C++ Environment.
Declaring and Using a Function from Visual Basic.
Debugging the C++ Code.
Tutorial Summary.
Passing Numeric Variables.
Four-Byte Integers (Longs).
Two-Byte Integers (Integer).
Four-byte Real (Single).
Eight-Byte Real (Double).
Boolean.
Currency.
Using Strings.
Passing C Strings (ByVal).
Handling a BSTR.
Passing Byte Arrays.
Passing and Use Structures (UDTs).
Passing and Using Variants.
Pass and Using Arrays.
Unicode and ANSI 198Conclusion.
8. C DLL Practical Examples.
Type Libraries and DLLs.
Tutorial for Creating a DLL Including Type Library Information.
Some Finer Points of the IDL File.
Adding Resources to a DLL.
Samples of C DLLs.
Subclassing.
Support of InstallShield.
Extended Stored Procedures.
Callbacks, Hooks, and Other Nasty Things.
Summary.
9. Components and Controls.
Basics of Components.
Components and Inheritance.
Inheritance Defined.
Abstraction.
Encapsulation.
Polymorphism.
Inheritance.
Delegation.
Aggregation.
COM.
Interfaces.
Custom Controls.
Methods Used to Build Controls.
Visual Basic 5 and 6.
MFC.
Visual Studio.NET.
ATL Controls in Detail.
Creating the Control Project.
Adding Properties.
Adding Methods.
Implementing Events.
Windows Message Maps.
Handling the Mouse.
Handling the Keyboard.
Property Pages.
Proper Property Persistence.
Enumerated Properties.
Categorizing Properties.
Returning Errors .
Safe for Initialization and Scripting.
Licensing.
IsimpleFrame.
Basing a Control on a Windows Control.
Composite Controls.
10. C# Basics.
The C# Type System.
Value Types in Action.
Reference Types.
Boxing and Unboxing.
Programming Concepts.
Namespaces.
Statements.
Operators.
Arrays.
struct.
Classes.
Object.
Methods.
Properties.
Operators.
Inheritance.
Interfaces.
Delegates.
Summary.
11. Applying C#.
C# WinForm Controls.
Creating the Control Project.
Coding the Control.
Control Elements.
NameSpaces.
Properties and Methods.
Events.
Design Time Support.
Drawing.
Summary.
A. Definition of Terms.
B. Character Code Tables.
C. C/C++ Keywords.
Index. 0672322188T03282002