preface xv
about this book xix
acknowledgments xxvi
WinMain 4, The message loop 6, WndProc 7
OwlMain 9, TOWLHelloApp 9, TOWLHelloWindow 9, What HELLO.CPP provides without asking 10
The wonders of encapsulation 11, The power of inheritance 13
TWindow 15, TFrameWindow 15, TDialog 16, TApplication and TModule 16
OBSOLETE 21, Containers 21, Iterator objects versus iteration methods 33, BIDS Iterators 36, Allocators 37, Containers, in conclusion 38, Date and time 38, TFileName 40, Some flaws with TFileName 44, TFileNameIterator 45, TFile 47, Smart pointers 49, TPointer 50, TAPointer 51, TEnvelope 52, TAEnvelope 53, TVoidPointer 53, Why on Earth should I use TPointer<T> or TAPointer<T> instead of T*? 54, When do TEnvelope and TAEnvelope make sense? 56, Shortcomings of smart pointers 58, TCmdLine 60, TFixedPoint 64, THeapSelector 65
Registry and Profile support 70, GUI geometry 73, Color and color support 75, System support 76, TUIMetric 77, TResId 78, TDropInfo and TFileDroplet 78, TProcInstance 78, TResource 79, Strings 79, BIDS and the STL/Std C++ Library 81, Other libs--VDBT and OCF 81
TEventHandler 91, TRecentFiles 92, TSerializeReceiver 96, TClipboardViewer 103
TPictDecorator 106
Why help the user? 114, Ways to help the user before a Help file 115
The Help Project (.HPJ) file 119, The content (.RTF) files 121, Topics 122, Context strings and topic titles 122, Hyperlinks 123, INDEX/CONTENTS 124, Browse sequences 125, Help keywords 126, Bitmaps and hotspot bitmaps 128, WinHelp macros 130, Creating a help file--newer ways 132
The WinHelp API call 132, Loading the WinHelp file 133, Calling a macro from an application 134, Look up a topic based on a keyword 134, Closing the WinHelp file 135
Usage 135
Why threads? 144, Why not threads? 145
The Win32 Thread API 148
TThread API overview 157
Win32 synchronization objects and their BIDS equivalents 163, Mutual exclusion objects/TMutex 164, Critical sections/TCriticalSection 168, Semaphores/TCountedSemaphore 170, Events/TEventSemaphore 172, Other BIDS synchronization objects 174, Thread-local storage (TLS) 177, Win32 atomic methods 183
The menubar--a quick recap 190, One step beyond the basics 191
TMenu 193, TSystemMenu 197, TPopupMenu 198
Bitmaps in menus 199, Owner-drawn menus 201, Dialogs with menubars 202, Windows 4.0 shell enhancements 202
Manipulating a menu's contents, the hard way 204, Manipulating a menu's contents, the easier way (TMenuDescr) 205
Basic usage 216, Who's got the clipboard? 218, The implications of owning the clipboard 220, Clipboard formats 221, Same data, different formats 222, Delayed rendering 225, Owner-display format 226, Reading from the clipboard 228, Clipboard viewer windows 229, TClipboard API 231, The clipboard as an IPC mechanism 233
Basic usage 235
TUIBorder 237, TUIFace 241, TUIHandle 244, TUIPart 245, Other UI classes 247
Doc/View == MDI? 254, Doc/View from orbit 255
Data-access methods: Open, Close, Commit, Revert, and the rest 260, Streams 264, Parent and child documents 269, Views and view management 270, Document templates and the document manager 273, Everything that's left--miscellaneous TDocument methods 273, Examples of TDocument in OWL 5.0: TFileDocument 274, Examples of TDocument in OWL 5.0: TStorageDocument 275, Examples of TDocument in OWL 5.0: TOleDocument 276
TView IDs and TView ID management 279, Doc/View events and event-handling 279, Interaction in the OWL window system 281, Examples of TView in OWL 5.0: TEditView 281, Examples of TView in OWL 5.0: TListView 281, Examples of TView in OWL 5.0: TWindowView 282, Ideas for derived TView objects 282
TDocManager 283, TDocTemplate and TDocTemplateT 296
Starting the application 315, Opening a document 318, Saving the document 324
Ye olde MessageBox trick (formerly ye olde printf trick) 334, Ye olde MessageBeep trick 337, Logging to controls and windows 338, Logging to a file 339, Logging to OutputDebugString 340, Logging to more than one place at a time: tee streams 342, In summary 343
OWL.INI 349, Guidelines for using the trace mechanism effectively 350, The other diagnostic macros: CHECK and PRECONDITION 352
Why do I need a post-mortem tool? 354, How to read Dr. Watson's Win32 autopsy report 354, But I don't have Dr. Watson32 358
C++ exception handling mechanics 362, ANSI C++'s Exceptions 364, Borland's exceptions 370, OWL's exceptions 372, Exceptions in your code 394, Tips and suggestions 395
The nature of an error 397, 16-bit fault trapping (TOOLHELP.DLL) 398, 32-bit Fault Trapping (SEH) 402
Variable type mappings and calling conventions 414, Calling functions in a DLL 415, Linking C++ code into a Delphi .EXE 415, Linking Delphi code into a C++ .EXE 417, Using a C++ class in Delphi from a .DLL 418, Using a Delphi class in C++ from a .DLL 421, Using a C++ class in Delphi (or vice versa) from a .OBJ 423, Calling into COM objects 423, Conclusion and summary remarks 424
Calling into a DLL 425, Calling into COM objects 425
The basics of COM 432
What happened to BC5\INCLUDE? 436, How do I use precompiled headers? 437, How can I speed up my Win32 and/or Win16 builds? 441, What are OWLCORE.H, DEFS.H, PCH.H, and OWLALL.H for? 442, What is _OWLCLASS, and what is it doing in all the OWL class declarations? 444, What is _CALLCNVN? 447, What are public_data and protected_data? 449, Why does OWL\DEFS.H #undef MessageBox? 450, How can I develop for the latest Win32 SDK with Borland C++? 453, How can I export a template from a DLL? 454, Why doesn't Visual C++ have a TargetExpert? 458
What does Doc/View do for me? 460, When should I think about using Doc/View? 461, Can I combine Doc/View windows with non-Doc/View windows? 461