home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
VISBUILD
/
DOODLE
/
README
< prev
next >
Wrap
Text File
|
1995-06-08
|
10KB
|
262 lines
NAME: DOODLE
DESCRIPTION:
The DOODLE application is one of many
applications that are being used to test the C++
Visual Builder. It is included in this driver of 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
(CPPOV53R) 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.
TASK:
Build a simple Object Oriented 2-D Graphics Draw
Application.
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
PROJECT LOCATION:
Inside the VisBuild Sample folder (inside the
VisualAge C++ Samples folder).
SOURCE FILE LOCATION:
X:\ibmcpp\samples\visbuild\doodle
where X: is the drive you installed the samples
and document component of VisualAge C++.
Select Source Files for a list of the source files
in this directory.
HOW TO RUN THE SAMPLE:
Note: Before running this sample, you must add
\ibmcpp\samples\visbuild\doodle to the
LIBPATH in your CONFIG.SYS so the sample can
find the CPPOV53R.DLL.
From within the WorkFrame environment:
To run the prebuilt project, open the
Samples folder on your OS/2 desktop
then double-click on the project's icon
to open the project view of the
sample. Click on the RUN button of
the project's toolbar.
From the command line:
Simply type the name of the .EXE file,
that is:
DOODLE
HOW TO BUILD THE SAMPLE PROJECT YOURSELF:
Please Note Do not generate source from
DAREA.VBB. This may overlay the prepared source
code and will result in compile errors.
From within the WorkFrame environment:
Open the Samples folder on your OS/2
desktop then double-click on the
project's icon to open the project view
of the sample. In the upper half of the
project window you will see the icons
of the files associated with the sample.
Start the Visual Builder component of
VisualAge C++ by selecting Visual from
the Project pulldown. From the main
Visual Builder Window:
1. Select all the parts in the "Visual
Parts" list and then select
"Part->Generate->Part source"
from the Menubar.
2. Select only the " Doodle" part in
the "Visual Parts" list and then
select "Part->Generate->main() for
part" from the Menubar.
3. Now invoke a Project Build Action.
To run the sample project, see How to
run the sample project above.
From the command line:
Start the Visual Builder component of
VisualAge C++ by typing:
icsvb
From the main Visual Builder Window:
1. Select all the parts in the "Visual
Parts" list and then select
"Part->Generate->Part source"
from the Menubar.
2. Select only the "Doodle" part in
the "Visual Parts" list and then
select "Part->Generate->main() for
part" from the Menubar.
3. From an OS/2 command line, make
this sample's directory the current
directory and invoke the BUILD.CMD
program by typing:
BUILD
HOW TO INSPECT THE VISUAL PARTS USING THE VISUAL BUILDER
1. There are six "class files" that make up the
application, DOODLE.VBB, CLRDLG.VBB,
STYLDLG.VBB, TTLDLG.VBB, WDTHDLOG.VBB,
and DAREA.VBB.
a. Start the Visual Builder Tool -- from
the command line, type:
icsvb
or from the project view of the
sample:select Visual from the Project
pulldown.
b. When the Visual Builder Window
appears, select from the Menubar the
"File->Load" option. On the Load Files
dialog page, set the dialog to the drive
and subdirectory that contain the
DOODLE application. Select from the list
the files DOODLE.VBB, CLRDLG.VBB,
STYLDLG.VBB, TTLDLG.VBB, and
WDTHDLOG.VBB and press the "OK"
button.
c. In a similar manner to the previous
step, load DAREA.VBB from the
\ibmcpp\samples\visbuild\doodle\darea
directory, and VBSAMPLE.VBB from the
\ibmcpp\dde4vb directory.
d. Now that you have loaded the
necessary files, from the "Loaded Part
Files" list in the Visual Builder Window
select DOODLE.VBB, CLRDLG.VBB,
STYLDLG.VBB, TTLDLG.VBB, and
WDTHDLOG.VBB. This will cause
"Doodle", "IColorDialog", "IStyleDialog",
"ITitleD ialog", and "IWidthDialog" to
be displayed in the "Visuals" list of this
Window.,
e. You may now select any of these 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 LIBPATH.)
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.
SOFTWARE/HARDWARE PREREQUISITES:
IBM VisualAge C++
OS/2 2.1 or Warp
DB2/2 1.2
IBM or compatible 486 and up.
ADDITIONAL INFORMATION:
For more information on the creation and
use of projects in the WorkFrame
environment, see the VisualAge C++ for
OS/2 User's Guide.
For more information on the the Visual
Builder, see the VisualAge C++ for OS/2
Visual Builder User's Guide.
Both books can be found online. To access an
online book, simply open the main VisualAge
C++ desktop folder, then open the Information
Folder inside. To view a book, double-click on
that book's icon.
REQUIRED FILES:
\ibmcpp\samples\visbuild\doodles directory
AVLTDOO1 SPC High level specification of the calculator
application.
README Description and instructions for sample.
BUILD CMD
DOODLE EXE The executable application.
CPPOV53R DLL DLL for the calculator application non-visual
parts.
DAREA RCV
DAREA_LI DOODLE MAK
CLRDLG VBB
DOODLE VBB
STYDLG VBB
TTLDLG VBB
WDTHDLOG VBB Visual Builder "class files" for
the calculator application.
\ibmcpp\samples\visbuild\doodles\darea directory
DAREA CPP C++ code files for the calculator non-visual parts.
DAREA H
DAREA HPP C++ header files for the calculator non-visual
parts.
DAREA LIB
DAREA MAK
DAREA VBB Visual Builder "class files" for the doodles
application.
DAREA VBE Non-visual Part Interface Definition Import file.