ebook img

Programming Industrial Strength Windows: Shrink-Wrap Your App! PDF

1016 Pages·2000·4.36 MB·English
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 Programming Industrial Strength Windows: Shrink-Wrap Your App!

title: author: publisher: isbn10 | asin: print isbn13: ebook isbn13: language: subject publication date: lcc: ddc: subject: Page i Programming Industrial Strength Windows Shrink-Wrap Your App! Petter Hesselberg Page ii Disclaimer: This netLibrary eBook does not include the ancillary media that was packaged with the original printed version of the book. R&D Books CMP Media, Inc. 1601 W. 23rd Street, Suite 200 Lawrence, KS 66046 USA Designations used by companies to distinguish their products are often claimed as trademarks. In all instances where R&D is aware of a trademark claim, the product name appears in initial capital letters, in all capital letters, or in accordance with the vendor's capitalization preference. Readers should contact the appropriate companies for more complete information on trademarks and trademark registrations. All trademarks and registered trademarks in this book are the property of their respective holders. Copyright © 2000 by Petter Hesselberg, except where noted otherwise. Published by R&D Books, CMP Media, Inc. All rights reserved. Printed in the United States of America. No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher; with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication. The programs in this book are presented for instructional value. The programs have been carefully tested, but are not guaranteed for any particular purpose. The publisher does not offer any warranties and does not guarantee the accuracy, adequacy, or completeness of any information herein and is not responsible for any errors or omissions. The publisher assumes no liability for damages resulting from the use of the information in this book or for any infringement of the intellectual property rights of third parties that would result from the use of this information. Cover art created by Robert Ward. Distributed in the U.S. and Canada by: Publishers Group West 1700 Fourth Street Berkeley, CA 94710 1-800-788-3123 ISBN: 0-87930-605-X Page iii TABLE OF CONTENTS List of Listings ix Introduction xiii Who Should Read This Book? xv The Source Code xv Acknowledgments xvi Legal Matters xvii Section I 1 Background Chapter 1 3 The Road Ahead Destination: The Application 3 Roadbed: The Target Platform 4 Vehicle: The Programming Language 5 Chapter 2 9 Designing for Users Polite Applications 10 Robustness 11 Focused Design 12 The Windows Logo Program 12 Page iv Usability Testing 12 The Unified File Model 14 Chapter 3 17 Designing for Programmers Programming Guiding Principles 17 Getting Your Priorities Straight 19 Global Variables Considered Harmful 21 Assert Your Sanity 21 Constantly on Guard 22 Use Destruction Constructively 23 Programming Defensively 31 Is Windows Object-Oriented? 31 Chapter 4 35 The Mechanics of Subclassing Subclassing Defined 35 Instance Subclassing 36 Global Subclassing 39 Class Cloning 41 General Mechanism for Global Subclassing 43 General Mechanism for Instance Subclassing 46 The Window Class: Wrapping the HWND 54 Section II 63 Foreground Chapter 5 65 The Bare Bones The Major Organs 66 The Heart 70 The Editor Class 71 The Document Class 76 The AbstractEditWnd Class 82 Of Strings and PATHNAMEs 86 Chapter 6 93 Exceptions Return Codes 94 Exceptions 95 Two-Stage Construction 95 Global Object Constructor Exceptions 96 The TextEdit Exception Classes 96 Converting Allocation Failures to Exceptions 106 Recovering from Errors 106 Structured Exception Handling and C++ Exceptions 107 Page v Chapter 7 111 Off the Launch Pad Click, Drag, and Drop 111 Shell Integration 117 GUI Summary 118 The Console Connection 118 File Not Found 124 Read-Only 125 Other Anomalies 125 Command-Line Piping 127 Drag and Drop Revisited 128 Additional Switches 129 Accessing the Command Line 130 Chapter 8 147 Child Windows Window Creation 148 The Toolbar 148 The Status Bar 166 Chapter 9 179 The Main Window Handling WM_COMMAND Messages 179 The Clipboard User Interface 180 Persistence in the Main Window 182 Drag and Drop 182 Menu Management 183 Communication between TextEdit Instances 188 Changing User Settings 189 Notifications 189 The Editor Connection 189 Chapter 10 223 Customization and Persistence Customizing Windows 223 Retrieving the Font 225 Customizing TextEdit 231 Long-Term Memory 232 The Registry Interface 234 MRU 248 RunOnce 255 Food for Persistent Thought 260 Chapter 11 263 Wait a Moment Changing the Cursor Image 265

Description:
Take an exploratory trip through the nooks and crannies of the Windows API -- and pick up 20,000 lines of source code along the way Develop production-quality applications capable of running on any 32-bit version of Windows -- including Win 2000 WARNING-- Error handling has been included (to show ho
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.