home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / visbuild / doodle / readme.txt < prev    next >
Encoding:
Text File  |  1996-02-22  |  8.8 KB  |  200 lines

  1. **********************************************************************
  2. * DISCLAIMER OF WARRANTIES:                                          *
  3. *                                                                    *
  4. * The following enclosed code is sample code created by IBM          *
  5. * Corporation.  This sample code is not part of any standard IBM     *
  6. * product and is provided to you solely for the purpose of assisting *
  7. * you in the development of your applications.  The code is provided *
  8. * "AS IS", without warranty of any kind.  IBM shall not be liable    *
  9. * for any damages arising out of your use of the sample code, even   *
  10. * if they have been advised of the possibility of such damages.      *
  11. *                                                                    *
  12. **********************************************************************
  13.  
  14. DOODLE
  15.  
  16.   DESCRIPTION:
  17.        The DOODLE is a simple 2-D draw application that
  18.        is one of many applications that are being used to
  19.        test the C++ Visual Builder.  It is included in
  20.        the product as a sample for viewing, execution, and
  21.        building purposes.
  22.  
  23.        DOODLE consists of a set of visual parts,
  24.        non-visual parts, and a resource DLL
  25.        (CPPWV53R) that contains some bitmaps and
  26.        pointers.
  27.  
  28.        The visual parts (with exception of the
  29.        DrawingArea) were built using the C++ Visual
  30.        Builder Tool.  The application was created by
  31.        connecting non-visual parts with the existing
  32.        visual parts using the C++ Visual Builder.  The
  33.        DrawingArea was written in standard C++ to
  34.        show how to connect parts created with the
  35.        C++ Visual Builder to parts that were not
  36.        created with the C++ Visual Builder.  An
  37.        interface file (DAREA.VBE) enables the C++
  38.        Visual Builder to surface the Drawing Area class
  39.        as a non-visual part in the builder.
  40.  
  41.   CONCEPT/FEATURE:
  42.        DOODLE shows examples of:
  43.  
  44.            How to use a Visual Builder "factory"
  45.            How to use a Visual Builder "variable"
  46.            How to connect to a window
  47.            How to create a modal window
  48.            How to pass in data to a window
  49.            How to return data from a window
  50.            How to validate range checking
  51.            How to handle a "Cancel" button
  52.            How to handle a "Set" button
  53.            How to reuse a modal window
  54.            How to use String, Long, Unsigned Long,
  55.             Short, and Unsigned Short parts from
  56.             VBSAMPLE.VBB
  57.            How to use toolbars
  58.            How to use toolbar buttons
  59.            How to use auto-latching toolbar buttons
  60.            How to use radio buttons
  61.            How to use push buttons
  62.            How to use a numeric spinbutton
  63.            How to use sliders
  64.            How to use text-entry fields
  65.            How to use static text
  66.            How to use colors
  67.            How to connect non-builder generated code
  68.             with builder generated code
  69.  
  70.   HOW TO RUN THE SAMPLE:
  71.  
  72.        From within the WorkFrame environment:
  73.                  1. Open the VisualAge for C++ product object.
  74.                  2. Open the Guide to Samples notebook.
  75.                  3. Select "Visual Builder Samples" from the
  76.                     Component drop down list.
  77.                  4. Select "Doodle" from the List of Samples.
  78.                  5. Click the "Open Project" button to open the
  79.                     project view.
  80.                  6. Click on the RUN button of the project's toolbar.
  81.  
  82.        From the command line:
  83.                  1. Set the current drive as the drive where you
  84.                     installed the VisualAge C++ samples.
  85.                  2. Set the directory path for the this sample
  86.                     as follows:
  87.                        cd ibmcppw\samples\visbuild\doodle
  88.                  3. Set the path environment variable as follows:
  89.                        set path=.;%path%
  90.                  4. Type the name of the .EXE file, DOODLE.
  91.  
  92.  
  93.   HOW TO BUILD THE SAMPLE PROJECT YOURSELF:
  94.  
  95.       Please Note: Do not generate source from DAREA.VBB,
  96.                    the "DrawingArea" part.  The "DrawingArea" 
  97.                    part is already built into an object library 
  98.                    in the DAREA subdirectory.
  99.  
  100.        From within the WorkFrame environment:
  101.                  Open the sample project view as described
  102.                  above. In the project window you will see
  103.                  the icons of the files associated with the sample.
  104.  
  105.                  1. From the project view of this sample, select
  106.                     "Visual" from the Project pulldown.
  107.                  2. Select all the parts in the "Visual Parts" 
  108.                     list EXCEPT the "DrawingArea" part. 
  109.                  3. Select "Part->Generate->Part source"
  110.                     from the Menubar.
  111.                  4. Select only the " Doodle" part in
  112.                     the "Visual Parts" list and then
  113.                     select "Part->Generate->main() for
  114.                     part" from the Menubar.
  115.                  5. Now invoke a Project Build Action.
  116.  
  117.                  To run the sample project, see How to
  118.                  run the sample project above.
  119.  
  120.        From the command line:
  121.                  1. Set the current drive as the drive where you
  122.                     installed the VisualAge C++ samples.
  123.                  2. Set the directory path for this sample
  124.                     as follows:
  125.                        cd ibmcppw\samples\visbuild\doodle
  126.                     This will allow Visual Builder to automatically
  127.                     load all the Visual Builder "class files"
  128.                     this samples uses.  These files are listed
  129.                     in the file VBLOAD.DAT in this directory.
  130.                  3. Start the Visual Builder Tool by typing the
  131.                     following from the command line:
  132.                        ivb
  133.                  4. Select all the parts in the "Visual Parts" 
  134.                     list EXCEPT the "DrawingArea" part. 
  135.                  5. Select "Part->Generate->Part source"
  136.                     from the Menubar.
  137.                  6. Select only the "Doodle" part in
  138.                     the "Visual Parts" list and then
  139.                     select "Part->Generate->main() for
  140.                     part" from the Menubar.
  141.                  7. From the command line, make this
  142.                     sample's directory the current directory
  143.                     as described above.
  144.                  8. Set the environment variables as follows:
  145.                        set include=.\darea;%include%
  146.                        set lib=.\darea;%lib%
  147.                  9. Build the EXE by executing the MAKE as follows:
  148.                        nmake doodle.mak
  149.                 10. You may optionally build the LIB, DAREA.LIB, which
  150.                     contains the code support for the non-visual
  151.                     DrawingArea part used in this sample as follows:
  152.                        cd darea
  153.                        nmake makefile.mak
  154.  
  155.  
  156.   HOW TO INSPECT THE VISUAL PARTS USING THE VISUAL BUILDER
  157.  
  158.             There are six "class files" that make up the
  159.             application, DOODLE.VBB, CLRDLG.VBB,
  160.             STYLDLG.VBB, TTLDLG.VBB, WDTHDLOG.VBB,
  161.             and DAREA.VBB.
  162.  
  163.               1. Start the Visual Builder Tool --
  164.                  from the command line:
  165.                  - Set the current drive as the drive where you
  166.                    installed the VisualAge C++ samples.
  167.                  - Set the directory path for this sample
  168.                    as follows:
  169.                       cd ibmcppw\samples\visbuild\doodle
  170.                  - Type:
  171.                       ivb
  172.  
  173.                  or from the project view of the
  174.                  sample, select Visual from the Project
  175.                  pulldown.
  176.               2. When the Visual Builder Window appears,
  177.                  you may select any of the parts
  178.                  from the "Visual Parts" list and then
  179.                  select "Part->Open" from the Menubar
  180.                  to open these parts for viewing and/or
  181.                  editting.  (If you get a series of
  182.                  "beeps" while the part is opening,
  183.                  make sure that the resource DLL,
  184.                  CPPOV53R, is in your PATH.)
  185.  
  186.             To inspect the DrawingArea part, you need
  187.             to edit the DAREA.HPP and DAREA.CPP
  188.             source files found in the DAREA
  189.             subdirectory of this sample.
  190.  
  191.  
  192.   ADDITIONAL INFORMATION:
  193.        For additional information on this and other samples shipped
  194.        with the VisualAge for C++ product, please see the Guide to Samples
  195.        notebook.
  196.  
  197.        To access the notebook from Program Manager, open the
  198.        VisualAge for C++ product object, then open the Guide to Samples
  199.        notebook.
  200.