Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Fast Track Visual C++ 6.0 Programming
(Publisher: John Wiley & Sons, Inc.)
Author(s): Steve Holzner
ISBN: 0471312908
Publication Date: 09/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Introduction

Welcome to our book on Visual C++. This is the book you read after you’ve read the introductory books on Visual C++ and want to know where to go next.

The chief aim of this book is to show you how to write professional programs with Visual C++.

Introductory books are fine, but of course they only take you so far. With an immense programming package such as Visual C++, it’s really a shame not to go farther, because to get to 90 percent of what’s interesting in Visual C++, it takes some digging. In this book, we go on a guided tour of what’s in Visual C++ and use it the way it was meant to be used.

We cover topics all the way from intermediate to the truly advanced: from working with the Windows registry to registering your program’s file types with Windows; from doing the right thing when your program loses the focus to determining whether your application is already running. It’s all in this book.

That doesn’t mean that our trip through Visual C++ is a difficult or arduous one—at least, no more than it needs to be. We do everything we can to make things clear and understandable, and you can reuse what we do immediately and practically in your own code. This is a book for programmers.

What’s in This Book

We begin our guided tour of Visual C++ with a quick review to get us up to speed. Our Visual C++ review provides the foundation for the rest of the book, and we take care to provide the required tools and resources.

Then we launch into Visual C++ and put it to work. Here are some of the Visual C++ topics we cover in this book as we work progressively to more polished programs:

  Writing dialog-based programs
  Making an MDI program smart
  Coordinating MDI views
  Implementing scrolling of documents
  Using multiple views types in the same MDI program
  Creating HTML views, Tree views, Rich Edit views, and Form views
  Making splitter windows
  Installing full-power menus
  Using toolbars and status bars
  Changing menu items on the fly
  Creating bitmapped menu items
  Installing a combo box in a toolbar
  Using popup menus and tooltips
  Serializing your own objects
  Changing the default cursor in a view
  Registering files types and extensions
  Using the clipboard for cut, copy, and paste
  Printing, printing page headers, and printing numbered pages
  Using advanced screen graphics and screen capture
  Writing bitmaps to the clipboard
  Drawing anywhere on the screen
  Using metafiles for easy window refreshes
  Capturing the mouse
  Understanding memory
  Allocating and using virtual memory
  Sharing memory between running processes
  Scanning memory to see what programs are where
  Creating Visual C++ Internet sessions
  Using the HTTP, FTP, and Gopher protocols on the Internet
  Writing a complete Web browser
  Using multitasking threads
  Executing tasks in the background
  Coordinating multiple threads in a program
  Building Dynamic Link Libraries
  Sharing memory between DLLs
  Using Windows hooks to intercept Windows events
  Writing a “hotkey” program that pops up the Windows calculator
  Using journal hooks to record and play back keystrokes
  Understanding COM
  Creating an OLE container
  Creating an OLE server
  Writing ActiveX controls
  Subclassing ActiveX control on existing Windows controls
  Implementing professionalism in Windows programming
  Writing to and reading from the Windows Registry
  Using a program’s version resource

In addition to all the above topics (and more—there’s not room here to list all the details), we cram this book full of helpful tips.


This Is a Tip

In the tips, we give you insider information behind the scenes, including undocumented Visual C++ information.


You should also know about the code arrows we use throughout this book. As we develop our example programs, we add more and more code cumulatively until the program is finished. When we add a new line of code, we indicate that new line with an arrow to make it easy to know what’s going on. Notice also the vertical dots, indicating there’s more code to follow but that the following code was omitted for brevity. The following is an example of a code sample with an arrow:

#ifndef __AFXWIN_H__

    #error include 'stdafx.h' before including this file for PCH
#endif

#include “resource.h”        // main symbols

#define DLLexport    __declspec( dllexport )                ⇐
    .
    .
    .

This book is the culmination of years of working with Visual C++. In it, we’ve placed the most powerful parts of that package. Without question, Visual C++ is the premier Windows programming package today. If you want to do it in Windows, you can do it in Visual C++. We believe we’ve done Visual C++ justice in our selection of topics for this book.

Who Should Read This Book

If you’ve read an introductory book on Visual C++ or have worked with Visual C++ and want to go farther, this book is for you. It can be very hard to know what’s available in Visual C++ simply because it’s such a huge package. This book will show us what’s available and how to use it.

If you’ve read an introductory book on Visual C++, you’re standing on the threshold. The rest of the package—and that’s a huge programming vista—is spread out before you. But unless you have about a year to ferret out all the details, you will benefit from our guided tour in this book.

You do need some familiarity with Visual C++ before working with this book. If you have trouble with the first chapter—our review of Visual C++—you might want to check out an introductory book before pressing ahead.

What You Will Need

To use this book, you need only Visual C++ 98. Although we occasionally use other programs, such as Microsoft Word, Microsoft Excel, the Windows notepad, or the Microsoft Windows Registry Editor, we use those programs for demonstration purposes only. The real action takes place in Visual C++. Visual C++ includes all the Wizards, tools, and editors we need.

Some of the tools and Wizards we see include the AppWizard, the ActiveX ControlWizard, the DLL AppWizard, the OLE Test Container tool, the Menu Editor, the Version Resource Editor, the Dialog Editor, the Controls and Components Gallery,and much more. All these items are part of Visual C++—a package so large that everything we need in this book is included in it.

The companion Web site includes the code from the programs in the book—nearly 40 complete Visual C++ projects, ready to run. Just load them in, build them, and you’re set. You’ll find the companion Web site at www.wiley.com/compbooks/holzner.

Another resource you should know about is the Microsoft Visual C++ page. The URL for this page is www.microsoft.com/visualc, and you can often find a great deal of news there, covering what’s going on with Visual C++ and featuring many links. You might also want to check out Usenet groups like microsoft.public.vc.language and microsoft.public.vc.mfc.

Ready to Go

We’re ready to start our guided tour of Visual C++ beyond the basics and into the real meat. To begin our exploration of Visual C++, we need a good foundation. Chapter 1, “Up to Speed in Visual C++,” reviews the fundamentals. If you already feel confident about your abilities in the basics of Visual C++, you can move directly to Chapter 2, “Multiple Documents, Multiple Views.”


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.