home *** CD-ROM | disk | FTP | other *** search
- **********************************************************************
- * DISCLAIMER OF WARRANTIES: *
- * *
- * The following enclosed code is sample code created by IBM *
- * Corporation. This sample code is not part of any standard IBM *
- * product and is provided to you solely for the purpose of assisting *
- * you in the development of your applications. The code is provided *
- * "AS IS", without warranty of any kind. IBM shall not be liable *
- * for any damages arising out of your use of the sample code, even *
- * if they have been advised of the possibility of such damages. *
- * *
- **********************************************************************
-
- DOODLE
-
- DESCRIPTION:
- The DOODLE is a simple 2-D draw application that
- is one of many applications that are being used to
- test the C++ Visual Builder. It is included in
- the product as a sample for viewing, execution, and
- building purposes.
-
- DOODLE consists of a set of visual parts,
- non-visual parts, and a resource DLL
- (CPPWV53R) that contains some bitmaps and
- pointers.
-
- The visual parts (with exception of the
- DrawingArea) were built using the C++ Visual
- Builder Tool. The application was created by
- connecting non-visual parts with the existing
- visual parts using the C++ Visual Builder. The
- DrawingArea was written in standard C++ to
- show how to connect parts created with the
- C++ Visual Builder to parts that were not
- created with the C++ Visual Builder. An
- interface file (DAREA.VBE) enables the C++
- Visual Builder to surface the Drawing Area class
- as a non-visual part in the builder.
-
- CONCEPT/FEATURE:
- DOODLE shows examples of:
-
- How to use a Visual Builder "factory"
- How to use a Visual Builder "variable"
- How to connect to a window
- How to create a modal window
- How to pass in data to a window
- How to return data from a window
- How to validate range checking
- How to handle a "Cancel" button
- How to handle a "Set" button
- How to reuse a modal window
- How to use String, Long, Unsigned Long,
- Short, and Unsigned Short parts from
- VBSAMPLE.VBB
- How to use toolbars
- How to use toolbar buttons
- How to use auto-latching toolbar buttons
- How to use radio buttons
- How to use push buttons
- How to use a numeric spinbutton
- How to use sliders
- How to use text-entry fields
- How to use static text
- How to use colors
- How to connect non-builder generated code
- with builder generated code
-
- HOW TO RUN THE SAMPLE:
-
- From within the WorkFrame environment:
- 1. Open the VisualAge for C++ product object.
- 2. Open the Guide to Samples notebook.
- 3. Select "Visual Builder Samples" from the
- Component drop down list.
- 4. Select "Doodle" from the List of Samples.
- 5. Click the "Open Project" button to open the
- project view.
- 6. Click on the RUN button of the project's toolbar.
-
- From the command line:
- 1. Set the current drive as the drive where you
- installed the VisualAge C++ samples.
- 2. Set the directory path for the this sample
- as follows:
- cd ibmcppw\samples\visbuild\doodle
- 3. Set the path environment variable as follows:
- set path=.;%path%
- 4. Type the name of the .EXE file, DOODLE.
-
-
- HOW TO BUILD THE SAMPLE PROJECT YOURSELF:
-
- Please Note: Do not generate source from DAREA.VBB,
- the "DrawingArea" part. The "DrawingArea"
- part is already built into an object library
- in the DAREA subdirectory.
-
- From within the WorkFrame environment:
- Open the sample project view as described
- above. In the project window you will see
- the icons of the files associated with the sample.
-
- 1. From the project view of this sample, select
- "Visual" from the Project pulldown.
- 2. Select all the parts in the "Visual Parts"
- list EXCEPT the "DrawingArea" part.
- 3. Select "Part->Generate->Part source"
- from the Menubar.
- 4. Select only the " Doodle" part in
- the "Visual Parts" list and then
- select "Part->Generate->main() for
- part" from the Menubar.
- 5. Now invoke a Project Build Action.
-
- To run the sample project, see How to
- run the sample project above.
-
- From the command line:
- 1. Set the current drive as the drive where you
- installed the VisualAge C++ samples.
- 2. Set the directory path for this sample
- as follows:
- cd ibmcppw\samples\visbuild\doodle
- This will allow Visual Builder to automatically
- load all the Visual Builder "class files"
- this samples uses. These files are listed
- in the file VBLOAD.DAT in this directory.
- 3. Start the Visual Builder Tool by typing the
- following from the command line:
- ivb
- 4. Select all the parts in the "Visual Parts"
- list EXCEPT the "DrawingArea" part.
- 5. Select "Part->Generate->Part source"
- from the Menubar.
- 6. Select only the "Doodle" part in
- the "Visual Parts" list and then
- select "Part->Generate->main() for
- part" from the Menubar.
- 7. From the command line, make this
- sample's directory the current directory
- as described above.
- 8. Set the environment variables as follows:
- set include=.\darea;%include%
- set lib=.\darea;%lib%
- 9. Build the EXE by executing the MAKE as follows:
- nmake doodle.mak
- 10. You may optionally build the LIB, DAREA.LIB, which
- contains the code support for the non-visual
- DrawingArea part used in this sample as follows:
- cd darea
- nmake makefile.mak
-
-
- HOW TO INSPECT THE VISUAL PARTS USING THE VISUAL BUILDER
-
- There are six "class files" that make up the
- application, DOODLE.VBB, CLRDLG.VBB,
- STYLDLG.VBB, TTLDLG.VBB, WDTHDLOG.VBB,
- and DAREA.VBB.
-
- 1. Start the Visual Builder Tool --
- from the command line:
- - Set the current drive as the drive where you
- installed the VisualAge C++ samples.
- - Set the directory path for this sample
- as follows:
- cd ibmcppw\samples\visbuild\doodle
- - Type:
- ivb
-
- or from the project view of the
- sample, select Visual from the Project
- pulldown.
- 2. When the Visual Builder Window appears,
- you may select any of the parts
- from the "Visual Parts" list and then
- select "Part->Open" from the Menubar
- to open these parts for viewing and/or
- editting. (If you get a series of
- "beeps" while the part is opening,
- make sure that the resource DLL,
- CPPOV53R, is in your PATH.)
-
- To inspect the DrawingArea part, you need
- to edit the DAREA.HPP and DAREA.CPP
- source files found in the DAREA
- subdirectory of this sample.
-
-
- ADDITIONAL INFORMATION:
- For additional information on this and other samples shipped
- with the VisualAge for C++ product, please see the Guide to Samples
- notebook.
-
- To access the notebook from Program Manager, open the
- VisualAge for C++ product object, then open the Guide to Samples
- notebook.