This step of Scribble is similar to Step 6 (Adding Context-Sensitive Help) in that you’ll start by running AppWizard with an option that you didn’t originally choose. In this case, the option is full-server support. Then you’ll copy the files and resources that AppWizard generates for an OLE Server application to your Scribble project.
To set the AppWizard options for an OLE server application
The New dialog box appears.
Scribble
.You’re using the same project name (Scribble) so that you can copy code that contains class names and other identifiers into your current Scribble project files.
Scratch
as the new project directory, so that your project path is C:\[optional directory]\Scratch\Scribble
. This creates the new Scribble project under a subdirectory named Scratch.Note You must create this Scribble in a different project directory than the original Scribble.
The MFC AppWizard - Step 1 dialog box appears.
scb
.The entry in the Filter name box changes appropriately.
When you click Context-sensitive Help with the Full-server option, AppWizard creates:
You’ll copy these resources to your Scribble project later.
CScribbleView
and click CScrollView in the Base class box.CScribbleSrvrItem
and change its name to CScribbleItem
, the header filename to ScribbleItem.h, and the implementation filename to ScribbleItem.cpp. Notice that COleServerItem is the base class, which reflects your full-server choice.
Important If you are starting from the sample source code files for Step 6, rather than from a Scribble project that you have been developing step by step, you must modify the filenames and class names differently than those described in this procedure. Use the alternate filenames described in the next topic, Using Short Filenames.
For more information about using short filenames, see the topic A Note About Long Filenames in Scribble Lesson 1.
AppWizard creates the new files.
A Microsoft Visual C++ project with the same name is already registered at [old scribble pathname]. Do you want to replace this project in the registry?
This message box appears when you have already run a previous version of Scribble, from another directory, to register it with Windows.
In the next procedure you’ll incorporate files and resources from this Scratch version of Scribble, into the Scribble you’ve been developing all along.