Installing the Sample Files

The completed sample source code for each tutorial step is included with Visual C++ so you can examine and compare this code to your own tutorial code. You do not need these files to complete the tutorial; they are provided for your convenience and information. To examine source code for Scribble, or any other tutorial sample, install the sample files that are included on your product CD.

Note   There are also many samples included on the CD that are not covered in the tutorials. You can easily install the files needed to build these sample programs as well. See the for a list of these samples.

To install sample files

  1. From the MSDN Library browser, expand the following nodes:

    Visual C++ 6.0 \ Samples \ MFC Samples \ Tutorial Samples

    (Nontutorial samples are also located under the Samples \ MFC Samples category, organized according to topic.)

  2. Double-click the page icon for the application you are interested in, for example, Scribble.

  3. Click the tutorial step you want installed locally.

  4. In the Sample Application dialog box, click the Copy All button to install all files needed to build and run the sample application or tutorial step.

    You can also select and copy one or more individual files, or use the View button to examine a file before copying it.

  5. Specify the directory for the sample files, and click OK.

    When the sample files have been copied, you are returned to the Sample Application dialog box.

  6. Click Close.

A Note About Long Filenames

The names of the source code files on the distribution CD (and therefore in the online documentation) comply with ISO standards, which specify an 8.3 filename configuration. When you follow the instructions in any of the Visual C++ tutorials to generate your tutorial project files, AppWizard generates long filenames by default. If you use the project files from the distribution CD or from the online documentation (the sample source files) as your starting point to develop a particular tutorial step, watch for discrepancies between the filenames.

Scribble Step 7

For Scribble Step 7 (Creating an OLE Server), do not start from the sample source files; use your own Step 6 files as the starting point for Scribble Step 7, so your project filenames will remain compatible across these two steps.

If you do choose to use the sample source files, when the tutorial steps instruct you to change a filename, substitute the short filename in order to avoid naming conflicts. For instance, #include statements may refer to the short filename rather than the long filename AppWizard generates. For more information, refer to Using Short Filenames in the OLE Server tutorial.