home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
vpceval.zip
/
README.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1995-10-26
|
105KB
|
1,352 lines
ΓòÉΓòÉΓòÉ 1. VisPro/C Version 3.0 ΓòÉΓòÉΓòÉ
Get Serious OS/2 Development Power With VisPro/C!
VisPro/C is a full-featured visual programming tool for the a wide variety of
OS/2 compilers. It gives you the power to build 32-bit OS/2 applications in
record time.
VisPro/C gives you the robust features you have come to expect from solutions
costing much more. These tools leverage all of the important features of OS/2
including full integration with the Workplace Shell. And they come from
HockWare, the pioneer in value-priced visual programming products dedicated to
OS/2, including VisPro/REXX and VisPro/C++.
An abundance of CUA '91 objects, multiple development views,
entity-relationship database designer and an integrated environment are just
some of the productive features you can count on for powerful development.
With all of this, no other tool matches the functionality and productivity of
VisPro's environment--or its price.
Easy-to-use drag and drop programming
Quickly develop robust OS/2 GUI and Client/server applications with ease
using drag and drop programming. The C code automatically appears for each
event.
Objects, objects, objects
From simple buttons and boxes to 3-D business graphics and everything
in-between, VisPro/C provides the most CUA '91 objects. Not only does it
support all of the objects in OS/2, they have extra add-on objects.
Also available is VisPro/Objects, a SOM based object builder that allows
you to quickly develop your own custom objects.
The best of OS/2
VisPro/C gives you the best of OS/2 with complete Workplace Shell
enablement. Drag and drop programming, multiple development views including
Layout, List, Event Tree and Settings views, and the ability to get pop-up
menus on the objects are some Workplace Shell features that give you
maximum leverage of OS/2.
C code just like you'd expect and more
VisPro/C generates well-structured code. The result is non-proprietary,
royalty-free code that is easy to read and maintain. And it also supports
code regeneration for ease of use.
Lightning fast database design
For client/server programming, VisPro/C has a visual database designer for
ODBC-enabled databases. It provides an entity/relationship diagramming tool
and SQL builder that lets you quickly create applications or
reverse-engineer existing databases.
VisPro/C Features
Drag and drop programming
Workplace-Shell enabled drag and drop programming that automatically
generates the code for you. It also allows you to drag items to the printer
shredder and Workplace Shell folders.
CUA '91 objects
Comprehensive set of CUA '91 programming objects including: push button,
radio button, check box, list box, combo box, group box, entry field, MLE,
text, bitmap object, value set, icon object, spin button, frame, slider,
notebook, and container.
Extra objects
3-D business graphics - displays data in bar, stacked bar, pie, line
and area charts.
Formatted entry field - allows users to display and edit specific
formats of data.
Spreadsheet - allows users to enter and display data in typical
spreadsheet format.
Clock - allows users to veiw time in analog, digital and military
format.
Calendar - allows users to view and interact with a traditional
monthly calendar.
Code generation
Well-structured code generation gives you high quality code that is easy to
read and maintain. The non-proprietary, royalty-free code can be used
outside of the VisPro development environment. VisPro supports code
regeneration which allows you to incorporate changes you have made to
events and code sections outside of the VisPro environment.
VisPro/C automatically generates object and object event-handler code so
you don't have to worry about the details.
Integrated development environment
Manage bitmap, icon, RC include, font, codepage, and string resources
Visually set compiler and linker options
Monitor compiler progress
Click on compiler errors to find corresponding location in VisPro
editor or any external editor
Transparently log changes and develop projects as a team with the
VisPro Team Administrator
Multiple views
Four development views allow you to efficiently create, change or customize
your program. Views include Settings, Layout, Event Tree and List. The
layout view provides a WYSIWYG design canvas and a floating tool palette.
Visual Database Designer
Visual method for developing database applications or reverse-engineering
existing database structures from ODBC-enabled databases into diagrams.
Using the entity-relationship diagramming tool, you drag and drop multiple
tables and relationship links in to a layout area. The point-and-click SQL
builder allows you to easily build syntax error-free SQL statements.
VisPro/Objects
SOM-based interface that allows you to create and add custom controls to
the VisPro tool bar. It allows you to specify behavior, styles and methods
and generates most of the source code needed to bring the object into all
VisPro environments - C, C++ an REXX.
VisPro Code Templates
Allows you to add your own frequently used code sections for easy drag/drop
access to your VisPro projects.
Other features
User interface resource compatibility - allows you to build an
application with VisPro/REXX and import the interface resources to
VisPro/C and and vice versa. User interface resources include:
bitmaps, icons, panel definitions, menus and accelerator key
definitions.
Accelerator key - allows you to type a couple of characters in the
event editor to automatically generate a construct of the code for
commonly used logic structure.
Form styles - provides full support of all forms including plain,
sizable, scrollable, window list, dialog and title bar.
Drag/drop support - enables you to add drag and drop functionality to
your VisPro program.
OS/2-style help - allows you to provide OS/2-style (IPF) help to your
program which users can access your program's help file just like help
for other OS/2 applications. VisPro/C ships with the VisPro Help
Editor; an editor which simplifies the writing of IPF format files.
VisPro/Paint allows you to create bitmap files for use in your
applications. This program also reads and writes TIF, PCX, TGA, and
GIF file formats.
System Requirements: OS/2 2.x or OS/2 Warp, 5Mb memory and 3 Mb hard disk
space; IBM VisualAge, CSet, CSet++, CSet++ FirstStep, MetaWare HighC/C++,
Borland C, or Watcom C/C++. The OS/2 Toolkit should also be installed on your
system.
Suggested Retail Price: $299
ΓòÉΓòÉΓòÉ 2. Getting Started ΓòÉΓòÉΓòÉ
Once you install your Evaluation version of VisPro/C, you can use the online
help to get information about how to use the product. Instructions for
installing the Evaluation version, opening a project, and using the online help
are provided in the following sections.
Installing the Evaluation Version
Creating a VisPro/C Project
Opening the Main form
Using the VisPro/C Online Help
ΓòÉΓòÉΓòÉ 2.1. Installing the Evaluation Version ΓòÉΓòÉΓòÉ
Before you use VisPro/C, ensure the following:
1. OS/2 2.0 or any later version must be installed on your system.
2. An ODBC-enabled database must be installed to use the VisPro/C ODBC
Database Designer.
3. Your hard disk should have approximately 3 megabytes of free disk space.
4. The IBM VisualAge or CSET, MetaWare HighC/C++, Borland C or Watcom C/C++
compiler must be installed on your system for you to compile source code
created by VisPro/C.
5. The OS/2 Toolkit is also required for you to create OS/2 applications
(included in VisualAge).
NOTE: No version of VisPro/C should be running when you install the Evaluation
version. If this occurs, close all VisPro/C windows, reboot and then start the
installation over.
To install the VisPro/C Evaluation version, complete the following steps:
1. Place the Evaluation diskette in the drive you wish to install from.
2. Press the right mouse button to get a pop-up menu on the diskette drive
you are using.
3. Select the arrow on the Open menu item.
4. Select Icon View.
5. Double-click on the SETUP.EXE program, which has the VisPro/C icon.
6. Select the drive where you want to install the Evaluation version beside
Install on drive.
7. If you want to change the path you are installing on, type the path name
in the Install path field.
8. Select Install.
9. When the installation is complete, the Installation Complete window
appears. It will prompt you for additional input if modifications to your
CONFIG.SYS file are necessary.
By default, the installation program will modify your CONFIG.SYS and
display this README information book. If you do not wish the installation
program to modify your CONFIG.SYS, select the 'Exit push button and you
will be given instructions on the changes needed. If you do not wish to
view the README book, deselect the appropriate check box.
10. Select Continue to allow the installation program to modify your
CONFIG.SYS.
The changes are made to your CONFIG.SYS file. Your original CONFIG.SYS
will be named CONFIG.VP.
11. Since VisPro/C requires a path to its files, you must shutdown and reboot
before using the product.
After Rebooting, double click on the VisPro/C Evaluation Version 3.0 icon
in the Workplace Shell.
You will see the VisPro/C Icon View window appear. This window contains
the following:
VisPro/C Code Templates: Allows you to drag and drop your own code
sections into your projects. See the online help for the Code
Templates program on how to extend your list of available code
sections.
Read Me: This Read Me File.
Projects folder: Where you will create new projects.
Font palette: Allows you to change the font on your form.
Mixed Color palette: Allows you to change colors on your form.
Samples folder: Contains the Data entry sample.
ΓòÉΓòÉΓòÉ 2.2. Creating a VisPro/C Project ΓòÉΓòÉΓòÉ
When you open the VisPro/C folder you created during installation, you see a
template called Project. You can drag a new folder off the Project template and
use it as your new project, which will become your application.
To open your new project, complete the following steps:
1. Open the VisPro/C icon on your desktop. To do so, double-click the
folder.
2. Open the Projects folder in the VisPro/C folders Icon View window. To do
so, double-click the Projects folder.
3. Create a new Project folder. To do so, press the right mouse button and
drag a folder off the Project template in the Projects - Icon View
window.
A Project folder appears.
4. Rename your Project folder. To do so, select the Project folder and press
Alt while you click the left mouse button. Type the name you want to
assign to your new application.
Click outside of the folder. This 'sets' the name for the Project folder.
5. Open your Project folder. To do so, double-click the folder icon.
The icon view for your new application appears. You will see a Main icon.
The Main icon is the form you use to begin designing your application.
After your application is complete, do not delete, move, or rename the
Main form.
The next section details the ways in which a form may be accessed.
ΓòÉΓòÉΓòÉ 2.3. Opening the Main Form ΓòÉΓòÉΓòÉ
To begin creating your application, you can open the Main form in one of two
ways:
METHOD A:
Double-click on the Main icon. The form appears in the Layout view,
presenting the tool bar and the canvas. This view allows you to easily
design your form.
METHOD B:
Select the Main icon, and then click the right mouse button to get the
pop-up menu for the Main icon. Select Open. A cascading menu appears,
allowing you to select the view you want to begin working with. The
Layout view is recommended for designing the layout of your form.
You may also generate source code and start a compilation from the pop-up
menu, without having to open your project.
ΓòÉΓòÉΓòÉ 2.4. Using VisPro/C's Online Help ΓòÉΓòÉΓòÉ
VisPro/C includes an extensive online help system that you can use if you have
questions while you are working. To get information about how the online help
works, select the Help menu. A cascading menu appears, presenting the following
menu items
Help Index....
General Help....
Using Help....
Product information....
You can select any of these items. To find out what information each of these
items provides, highlight the item (use the arrow keys), and then press F1.
Note: You can browse the help using the online help Contents. To use the
Contents, select the OPTIONS menu from within any help window, and then select
CONTENTS.
ΓòÉΓòÉΓòÉ 3. Sample Project ΓòÉΓòÉΓòÉ
This section describes the steps you follow to create a simple data entry
application using a variety of standard objects. Your final application should
look something like this:
To use the application, a user types text into the entry field at the top of
the project. Selecting the Add push button or pressing the Enter key adds the
item in the entry field to the end of the list box in ascending or descending
order, depending on the state of the Sort order radio buttons.
If the user selects Clear, the contents of the list box and entry field are
deleted, and the text insertion cursor is placed in the entry field for further
processing.
To create the data entry application, complete the steps in each of the
following sections.
1. Start the Application
2. Add the Objects
3. Size and Align Objects
4. Provide Behavior
5. Changing the Order of the Objects
6. Compile and Execute the Application
ΓòÉΓòÉΓòÉ 3.1. Start the Application ΓòÉΓòÉΓòÉ
To start the application and name it, complete the following steps:
1. Double-click the VisPro/C icon in the Workplace Shell.
2. Double-click the PROJECTS icon folder in the VisPro/C Icon View window.
The Projects - Icon View window appears.
3. Drag a new project off the Project template (hold down the right mouse
button and drag to an empty space in the Projects folder, then release).
4. Use direct editing to name the new project Data (press the Alt key and
click the left mouse button at the same time). Type Data over the
existing name.
5. Double-click the Data project icon.
The Data - Icon View window appears. You will see the following icons:
Main form, which is the form you use to begin designing your
application. After your application is complete, do not delete,
move, or rename the Main form.
Form template, which allows you to drag off additional forms if you
want your application to have more than one window.
SubProcs folder, which allows you to incorporate existing C code
into your application or to group commonly used code segments so
they can be called anywhere in your program.
Source folder, which contains all of the source code for your
project. The source code is created by selecting either Generate
source or Generate and compile from the project's Form menu.
OPTIONS.MKC, is a file which contains the build options for your
application. It is invoked by double-clicking the OPTIONS.MKC icon.
RESOURCE.VPC, is a file which contains external resources for your
application, such as bitmaps or pointers. You can start the VisPro
Resource editor by double-clicking on the RESOURCE.VPC file.
6. Double-click on the Main icon.
The Layout view for the application appears.
The Form Layout view is the environment in which you design the window
that your user will perform tasks with. For each window your user works
with, you create a form. This application will consist of a single form.
The form consists of two main parts: the Tool Bar/Palette and Canvas.
ΓòÉΓòÉΓòÉ 3.1.1. The Tool Bar/Palette ΓòÉΓòÉΓòÉ
_________________________________________
The VisPro/C Tool palette. An * denotes objects that are not
included in the Evaluation version
About the Tool Bar
The tool bar and tool palette consist of a series of icons. Each icon
represents a tool. Each tool is used to place a certain kind of object on the
canvas. For example, the push button tool places a push button object on the
canvas.
An object is a graphical item that can be used to perform tasks. Radio buttons
and list boxes are examples of objects.
The difference between a tool and an object is that a tool is a graphical
representation of something that can be added to the canvas. Once added, it
becomes an object that can be used to perform tasks.
You can turn off the tool bar by selecting Open and then Settings from the Form
menu. Select the Options page and deselect Show tool bar. You can also use the
Options page to select the tool palette. If you select Save defaults, all the
defaults you have set for the form are saved, including fonts, grid spacing,
etc.
Saving defaults affects the defaults for every other project you create. If you
do not select Save defaults, your changes will affect only the project the
change was made in.
ΓòÉΓòÉΓòÉ 3.1.2. The Canvas ΓòÉΓòÉΓòÉ
_________________________________________
The VisPro/C Layout view, showing the tool bar and tool palette
About the Canvas
The canvas is the open, gridded area below the tool bar. This is the area in
which you will design (or lay out) your form. You select the tools you need
from the tool bar or tool palette and add them to the canvas. Once objects are
added to the canvas, you can customize their appearance and provide behavior
for them.
You can turn off the grid in the canvas by selecting Open and then Settings
from the Form menu. Select the Options page and deselect Show grid. If you
select Save defaults, all the defaults you have set for the form are saved,
including fonts, grid spacing, etc. Saving defaults affects the defaults for
every other project you create. If you do not select Save defaults, your
changes will affect only the project the change was made in.
Note: Snap to grid forces the object to align with the nearest grid line. If
you do not want to use this feature, deselect it.
ΓòÉΓòÉΓòÉ 3.2. The VisPro Team Administrator ΓòÉΓòÉΓòÉ
With the new releases, all products (except VisPro/REXX Bronze) feature the
VisPro Team Administrator, which takes the error-prone guesswork out of team
development.
The Team Administrator allows programmers to clearly and easily compare change
levels and project versions, to rollback changes, and monitor development
progress. All changes are automatically logged and forms can be locked to
ensure that only one programmer makes changes at a time. Other features include
read-only viewing and the ability to create a form shadow for easy
accessibility in a distributed system environment.
All changes to your forms are saved to the VPBACKUP folder inside your Project
directory. These backups are logged to a file called LOG.VPL, which is created
after the first change to a form. Double-clicking on the LOG.VPL file invokes
the VisPro Team Administrator.
As part of team development, VisPro introduces Form Shadows.
Form shadows are similar to OS/2 Workplace Shell shadow objects. They allow you
to include a VisPro form in a project that actually exists in another project
folder. The source project folder can be on the local machine or remotely on a
server. This allows you to share commonly-used forms in several projects.
Form Shadows are created the same way as a Workplace Shell shadow. You can
either drag a form from a source project folder to the target while holding the
CTRL and SHIFT keys, or you can get a pop-up menu on a form icon and select
Create Shadow.
VisPro form shadows differ from OS/2 Workplace Shell shadows in a very
fundamental way. OS/2 Workplace Shell shadows are not visible on your hard
drive because they actually exist in the OS/2 INI configuration files. VisPro
form shadows are actual directories within a project. A file named !!LINK
exists inside the directory that contains the fully-qualified path of the
original form's location.
This prevents the loss of project structure due to changes in the OS/2 system
files and improves reliability over OS/2 shadow implementation.
Note: Shadows are created as read-only objects by default. To override this
attribute, select Read only from a form's pop-up menu.
ΓòÉΓòÉΓòÉ 3.3. Add the Objects ΓòÉΓòÉΓòÉ
In this section, you add the objects from the toolbar to the Layout view of
your application. You will then specify characteristics, such as a unique name,
for those objects. You specify these characteristics using the Settings view
for the objects.
The application consists of a text object, two push buttons, two radio buttons,
a list box, and an entry field.
Complete the steps in the following sections to add the objects and define
settings for them.
ΓòÉΓòÉΓòÉ 3.3.1. ADD Push Button ΓòÉΓòÉΓòÉ
In this section, you add a push button to the canvas. You then use the Settings
view of the push button to specify that it will be named ADD. In addition, you
use the Settings view to provide a descriptive name (known as a symbol) for the
push button. This descriptive name makes it easy to identify the object when
you begin programming.
1. Select the Push button tool from the tool bar.
2. Click inside the canvas to place a push button approximately where you
see it in the figure of the application (the bottom left corner of your
form).
3. Double-click the push button.
The Settings view notebook for the push button appears, displaying the
Style page.
4. Select the Default check box. This causes the ADD push button to be
selected whenever the Enter key is pressed.
5. Select the General tab on the Settings notebook.
6. Select the Text field, and type ~Add. This causes the push button to
appear with the label Add on the Layout view, and when the application is
run. The tilde (~) character in front of the A places an underscore
beneath the A character, allowing the user to select the ADD push button
by pressing the Alt-A combination.
Note: An alternative method for specifying the name of the object is to
use direct editing. The General page is recommended here for convenience
because you will be specifying other settings for the object.
7. Select the Symbol field, and type ADD. Do not change the default ID.
Note: Symbol is a unique name you supply that identifies an object. The
ID is a unique integer used to identify an object. The Symbol is
optional, but you include it because a symbol with a descriptive name is
easier to refer to.
8. Select Close from the title bar icon menu (the symbol at the top
left-hand corner of the Settings view window).
ΓòÉΓòÉΓòÉ 3.3.2. CLEAR Push Button ΓòÉΓòÉΓòÉ
In this section, you add another push button to the canvas. You then use the
Settings view of the push button to specify that it will be named CLEAR. In
addition, you use the Settings view to provide a descriptive name (known as a
symbol) for the push button. This descriptive name makes it easy to identify
the object when you begin programming.
1. Select the Push button tool from the tool bar.
2. Click inside the canvas to place a push button approximately where you
see it in the figure of the application (to the right of the ADD button).
3. Double-click the push button.
The Settings view notebook for the push button appears, displaying the
Style page. The defaults are used for the Style page.
4. Select the General tab on the notebook. Select the Text field, and type
~Clear. This causes the push button to appear with the label Clear when
the application it run. The tilde (~) character in front of the C places
an underscore beneath the C character, allowing the user to select the
CLEAR push button by pressing the Alt-C combination.
Note: An alternative method for specifying the name of the object is to
use direct editing. The General page is recommended here for convenience
because you will be specifying other settings for the object.
5. Select the Symbol field, and type CLEAR. Do not change the default ID.
Note: Symbol is a unique name you supply that identifies an object. The
ID is a unique integer used to identify an object. The Symbol is
optional, but you include it because a symbol with a descriptive name is
easier to refer to.
6. Select Close from the title bar icon menu (the symbol at the top
left-hand corner of the Settings view window).
ΓòÉΓòÉΓòÉ 3.3.3. ITEMS List Box ΓòÉΓòÉΓòÉ
To add and define settings for the ITEMS list box, complete the following
steps:
1. Select the List box tool from the tool bar.
2. Click inside the canvas to place the list box above the CLEAR and ADD
push buttons.
3. Double-click the list box.
The Settings view notebook for the list box appears.
4. Select the General tab on the notebook.
5. Select the Symbol field, and type ITEMS. Do not change the default ID.
6. Select Close from the title bar icon menu.
ΓòÉΓòÉΓòÉ 3.3.4. Sort Order Radio Buttons ΓòÉΓòÉΓòÉ
Two radio buttons, Ascending and Descending, will now be added to your project.
Radio buttons represent a mutually exclusive choice that the user of your
project must make. That is, only one of these buttons can be highlighted at a
time. Radio buttons (and check boxes) are generally used only to show a
selection state in your applications.
To add the Ascending and Descending radio buttons to your project, complete the
following steps:
1. To accomodate the next several objects, increase the size of your form by
positioning the mouse pointer over the top border of your form window.
2. Right click and drag the form window up about an inch, then release the
mouse to set the new form position.
3. Select the Radio button tool from the tool bar.
4. Click inside the canvas to place two radio buttons, one over the other,
above the Items list box.
5. Double-click the top radio button.
The Settings view notebook for the radio button appears.
6. Select the Group check box on the Style page. This provides a mutually
exclusive behavior for the two radio buttons (you should only select the
Group check box for the first radio button in a group).
7. Select the General tab on the notebook.
8. Select the Text field, and type Ascending.
9. Select the Symbol field, and type ASCENDING. Do not change the default
ID.
10. Select Close from the title bar icon menu.
11. Double-click the lower radio button.
The Settings view notebook for the radio button appears.
12. Select the General tab on the notebook.
13. Select the Text field, and type Descending.
14. Select the Symbol field, and type DESCENDING. Do not change the default
ID.
15. Select Close from the title bar icon menu.
ΓòÉΓòÉΓòÉ 3.3.5. Sort Order Text Object ΓòÉΓòÉΓòÉ
To add and define settings for the Sort order text object, complete the
following steps:
1. Select the Text object from the tool bar.
2. Click inside the canvas to place the text object above the Ascending
radio button.
3. Double-click the text object.
The Settings view notebook for the text object appears.
4. Select the General tab on the notebook.
5. Select the Text field, and type Sort order.
6. Select Close from the title bar icon menu.
ΓòÉΓòÉΓòÉ 3.3.6. DATA Entry Field ΓòÉΓòÉΓòÉ
To add and define settings for the Data entry field, complete the following
steps:
1. Select the Entry field tool from the tool bar.
2. Click inside the canvas to place an entry field tool on the canvas, above
the Sort order text object.
3. Double-click the entry field.
The Settings view notebook for the entry field appears.
4. Select the General tab on the notebook.
5. Select the Symbol field and type DATA. Do not change the default ID.
6. Select Close from the title bar icon menu.
ΓòÉΓòÉΓòÉ 3.3.7. Size and Align the Objects ΓòÉΓòÉΓòÉ
To adjust the text so it fits inside each object, complete the following steps:
1. Select the Pointer tool from the Tool bar/palette.
2. Select the objects that contain text (the text object and radio buttons).
An easy way to select multiple objects is to use drag selection. Place
the mouse pointer over the first object and press the left mouse button.
Hold it down as you move the mouse to select the other objects. Then
release the mouse button.
The selected objects are highlighted.
3. From the Selected menu, select Arrange, and then select Fit to Text.
The objects you selected change size to accommodate the text inside.
Note: You did not fit the text for the entry field because the text in
the entry field changes when the field is used, depending upon the total.
You did not change the push buttons because they need to be equal sizes.
ΓòÉΓòÉΓòÉ 3.4. Provide Behavior for the Application ΓòÉΓòÉΓòÉ
You will now program the application so that it works as described at the
beginning of this section.
You can provide behavior for the application from the Layout view. However, we
will use the Event tree view because it allows you to easily see both the
objects and the C statements for the behavior you specify.
To switch to the Event tree view, select Event tree view from the View
menu.
The objects you added to your application appear on the left. The Event
window appears on the right.
In the following sections, you will provide behavior for the When opened
event, the ADD push button, and the CLEAR push button.
ΓòÉΓòÉΓòÉ 3.4.1. When Opened Event ΓòÉΓòÉΓòÉ
When the user starts this project, one of the two radio buttons should be
highlighted (since they are mutually exclusive, and one or the other must
always be highlighted). The When opened event is where all form initialization
takes place: such as loading list boxes with data and setting the display
styles for objects.
To select the Ascending radio button from the Form When opened event, complete
the following steps:
1. From the Form menu, select When, and then Opened(WM_INITDLG).
The Event Opened window appears. The top of the Event window displays the
following statement for Event opened:
/* Event Opened - Form DATA\Main */
CHAR aTextValue[255]="text";
LONG anIntegerValue=0;
ULONG anUnsignedValue=0;
We will be dragging objects to the Event Opened window from the Event
tree view.
2. Position the Event Opened window so that the left side of the window is
visible beneath the Event tree view of your project.
Select the title bar of the Event tree view window to make it active.
3. Move the mouse pointer over the ASCENDING radio button icon (on the left
side of the Event tree view), and hold down the right mouse button as you
drag from the ASCENDING radio button icon on the Event tree view to the
Event Opened window.
4. Release the mouse when you reach a point below the existing code on the
Event Opened window.
The Create Link window appears.
5. Select Check the item from the Create Link window, then select OK.
SHORTCUT METHOD: Double-click Select a button.
The following C statement appears:
/* Check the item ASCENDING Radio Button */
WinCheckButton(hwndDlg, ASCENDING, 1);
The code in the Event Opened window should look like this when your are
finished:
/* Event Opened - Form DATA\Main */
CHAR aTextValue[255]="text";
LONG anIntegerValue=0;
ULONG anUnsignedValue=0;
/* Check the item ASCENDING Radio Button */
WinCheckButton(hwndDlg, ASCENDING, 1);
ΓòÉΓòÉΓòÉ 3.4.2. ADD Push Button ΓòÉΓòÉΓòÉ
The ADD push button takes the value found in the entry field and adds it to the
list box.
To provide this behavior, complete the following steps:
1. From the Event tree view, select the ADD push button.
2. From the Selected menu, select When, and then Clicked/Selected.
The following C statements appear in the top of the Event window.
/* Event ~Add ADD , Clicked/Selected */
CHAR aTextValue[255]="text";
LONG anIntegerValue=0;
ULONG anUnsignedValue=0;
3. Make sure the Add push button Clicked/selected event is highlighted. Then
drag the Data entry field into the Event window, below the existing C
statements, and then release the mouse button.
The Create Link window appears.
4. Select Get item text, and then select OK.
The following C statement appears:
/* Get item text DATA Entry Field */
WinQueryDlgItemText(hwndDlg, DATA, sizeof(aTextValue), aTextValue);
5. Move the mouse pointer over the Ascending radio button icon. Then drag
the ASCENDING radio button into the Event window, below the existing C
statements, and release the mouse button.
The Create Link window appears.
6. Select Is button selected, then select OK.
The following C statement appears:
/* Is button selected? Ascending Radio Button */
anUnsignedValue=(ULONG)WinQueryButtonCheckState(hwndDlg,ASCENDING);
7. On a new line below this statement, type the word if (followed by a
space). The following code template will be added:
if ()
{
} else {
} /* end if */
8. In the parenthesis, type
anUnsignedValue == 1
.
9. Move the cursor down one line and to the right of the bracket ({), and
press Enter to insert a blank line in your code template.
This provides space to insert the code for the next step.
10. Make sure the ADD push button Clicked/selected event is highlighted. Then
drag the ITEMS list box into the Event window, into the blank line
created by the previous step.
The Create Link window appears.
11. Select Add item sorted ascending, and then select OK.
The following C statement appears:
/* Add item sorted ascending ITEMS List Box */
anIntegerValue=(LONG)WinSendDlgItemMsg(hwndDlg, ITEMS,
LM_INSERTITEM,
MPFROMSHORT(LIT_SORTASCENDING),
MPFROMP(aTextValue)); /* Text for new item */
12. Insert a blank line between the lines containing the words else and end
if.
13. Make sure the ADD push button Clicked/selected event is highlighted. Then
drag the ITEMS list box into the Event window, and into the blank line
created by the previous step.
The Create Link window appears.
14. Select Add item sorted descending, and then select OK.
The following C statement appears:
/* Add item sorted descending ITEMS List Box */
anIntegerValue=(LONG)WinSendDlgItemMsg(hwndDlg, ITEMS,
LM_INSERTITEM,
MPFROMSHORT(LIT_SORTDESCENDING),
MPFROMP(aTextValue)); /* Text for new item */
Now that the text has been added to the list box, we will place the
cursor back into the entry field, and highlight its contents.
This allows the user to either press the Enter key to add a new instance
of the value to the list box, or begin typing a new value without having
to delete the previous value.
15. Make sure the Add push button Clicked/selected event is highlighted. Then
drag the Data entry field into the Event window, below the existing
statements.
The Create Link window appears.
16. Select Get item text length, and then select OK.
The following C statement appears:
/* Get item text length DATA Entry Field */
anIntegerValue=(LONG)WinQueryDlgItemTextLength(hwndDlg, DATA);
17. Once more, we will drag the Data entry field into the Event window, below
the existing statements.
The Create Link window appears.
18. Select Set selection, and then select OK.
The following C statement appears:
/* Set selection DATA Entry Field */
anUnsignedValue = (ULONG)WinSendDlgItemMsg(hwndDlg, DATA,
EM_SETSEL,
MPFROM2SHORT(0, /* First char in selection */
5), /* Last char in selection */
0)
19. Change the number 5 to anIntegerValue.
The preceding two statements highlight existing text in the DATA entry
field by selecting all characters within this object.
20. Drag the DATA entry field into the event window, releasing the mouse
below the existing statements in the event window:
The Create Link window appears.
21. Select Give focus to window, and then select OK.
The following C statement appears:
/* Give focus to window DATA Entry Field */
WinSetFocus(HWND_DESKTOP,WinWindowFromID(hwndDlg, DATA));
22. Select Save from the Event menu.
When you are finished with the ADD push button, your code will look like this:
/* Event ~Add ADD, Clicked/selected */
CHAR aTextValue[255]="text";
LONG anIntegerValue=0;
ULONG anUnsignedValue=0;
/* Get item text DATA Entry Field */
WinQueryDlgItemText(hwndDlg, DATA, sizeof(aTextValue), aTextValue);
/* Is button selected? ASCENDING Radio Button */
anUnsignedValue=(ULONG)WinQueryButtonCheckstate(hwndDlg,ASCENDING);
if (anUnsignedValue == 1)
{
/* Add item sorted ascending ITEMS List Box */
anIntegerValue=(LONG)WinSendDlgItemMsg(hwndDlg, ITEMS,
LM_INSERTITEM,
MPFROMSHORT(LIT_SORTASCENDING),
MPFROMP(aTextValue)); /* Text for new item */
} else {
/* Add item sorted descending ITEMS List Box */
anIntegerValue=(LONG)WinSendDlgItemMsg(hwndDlg, ITEMS,
LM_INSERTITEM,
MPFROMSHORT(LIT_SORTDESCENDING),
MPFROMP(aTextValue)); /* Text for new item */
} /* end if */
/* Get item text length DATA Entry Field */
anIntegerValue=(LONG)WinQueryDlgItemTextLength(hwndDlg, DATA);
/* Set selection DATA Entry Field */
anUnsignedValue = (ULONG)WinSendDlgItemMsg(hwndDlg, DATA,
EM_SETSEL,
MPFROM2SHORT(0, /* First char in selection */
anIntegerValue), /* Last char in selection */
0);
/* Give focus to window DATA Entry Field */
WinSetFocus(HWND_DESKTOP,WinWindowFromID(hwndDlg, DATA));
ΓòÉΓòÉΓòÉ 3.4.3. CLEAR Push Button ΓòÉΓòÉΓòÉ
The CLEAR push button deletes everything in the Items list box and the DATA
entry field, then places the cursor in the DATA entry field to allow further
input.
To provide this behavior, complete the following steps:
1. From the Event tree view, select the CLEAR push button.
2. From the Selected menu, select When, and then Clicked/Selected.
The following C statements appear in the Event window.
/* Event ~Clear CLEAR, Clicked/selected */
CHAR aTextValue[255]="text";
LONG anIntegerValue=0;
ULONG anUnsignedValue=0;
3. Make sure the CLEAR push button Clicked/selected event is highlighted.
Then drag the ITEMS list box into the Event window, below the existing C
statement, and then release the mouse button.
The Create Link window appears.
4. Select Delete all items, and then select OK.
The following C statement appears:
/* Delete all items ITEMS List Box */
WinSendDlgItemMsg(hwndDlg, ITEMS,
LM_DELETEALL, 0, 0);
5. Next, drag the Data entry field into the event window, below the existing
C statements, and then release the mouse button.
The Create Link window appears.
6. Select Clear all and then select OK.
The following C statement appears.
/* Clear all DATA Entry Field */
WinSetDlgItemText(hwndDlg,DATA,"");
7. Drag the DATA entry field into the event window, below the existing C
statements, and then release the mouse button.
The Create Link window appears.
8. Select Give focus to window, and then select OK.
The following C statement appears:
/* Give item focus DATA Entry Field */
WinSetFocus(HWND_DESKTOP,WinWindowFromID(hwndDlg, DATA));
9. Select Save from the Event menu.
When you are finished editing the CLEAR push button, your code will look like
this:
/* Event ~Clear CLEAR, Clicked/selected */
CHAR aTextValue[255]="text";
LONG anIntegerValue=0;
ULONG anUnsignedValue=0;
/* Delete all items ITEMS List Box */
WinSendDlgItemMsg(hwndDlg, ITEMS,
LM_DELETEALL, 0, 0);
/* Clear all DATA Entry Field */
WinSetDlgItemText(hwndDlg,DATA, 0);
/* Give focus to window DATA Entry Field */
WinSetFocus(HWND_DESKTOP,WinWindowFromID(hwndDlg, DATA));
ΓòÉΓòÉΓòÉ 3.5. Changing the Order of the Objects ΓòÉΓòÉΓòÉ
When the application starts, the ADD push button would be given focus. This
means that it is the currently selected object in your form. To give the DATA
entry field focus, you would click on it with the left mouse button, or press
Shift+Tab from the keyboard.
In this section, we will use the List view to give focus to the DATA entry
field when the application is started. This prevents the user from having to
select the DATA entry field before typing data. To move to the List view,
select List view from the View menu.
Each row in the List view represents an object in the Layout view. The object
type and icon appear on the left of the split bar, with other attributes on the
right. In this view, you can use direct editing to change the Text identifier
for an object, as well as the Symbol name (descriptive name) for an object.
To give focus to the DATA entry field when your application is started,
complete the following steps:
1. Select the DATA entry field row by left-clicking on it with the mouse.
The DATA entry field row is highlighted.
2. With the mouse cursor on the DATA entry field row, right-click and drag
the mouse pointer until it is just above the ADD push button row.
A solid horizontal line appears above the ADD push button row.
3. Release the mouse button, and the DATA entry field appears above the ADD
push button in the object order.
You could also programmatically give the focus to the entry field in the
'When opened' event for the main form. The technique you just used,
however, is much faster to implement and visualize if your are working
with many objects.
4. Select Generate and compile from the Form menu, then double-click on the
RUN.EXE program object in your project folder to see your changes.
ΓòÉΓòÉΓòÉ 3.6. Compile and Execute the Application ΓòÉΓòÉΓòÉ
To compile the application, select Generate and compile from the Form menu.
The VisPro Viewer appears, displaying the compilation progress and notifying
you when the compilation is complete.
If there is an error in your code, it will be displayed in the VisPro/Viewer
output window. Double-click on that error line in the VisPro Viewer, and the
event window containing the error will appear for you to correct.
To run the application, double-click the left mouse button on the file RUN.EXE,
which is located in the source folder of your project.
ΓòÉΓòÉΓòÉ 4. Limitations of the Evaluation Version ΓòÉΓòÉΓòÉ
The Evaluation Version of VisPro/C differs from the full product in several key
aspects:
No user's guide or reference is provided. However, you can get enough
information to get started by viewing this README file and by referring
to the online help. The full product comes with a complete user's guide
which includes detailed information on how to use VisPro, a description
of the structure of the generated code, full descriptions on all the add
on objects, and much more.
The evaluation version is limited to generating the source for projects
with two windows (forms). Also each form is limited to at most 22
objects. These limitations are not part of the full product.
The Database Designer is not included in the Evaluation version. This
feature allows you to design client/server applications or reverse
engineer existing database structures from ODBC-enabled databases to
create entity/relationship (E/R) diagrams. These can then be used to
create visual SQL statements or to automatically generate the code used
to access the database. Using the Database Designer you can construct a
form accessing multiple database tables with a single drag and drop
operation.
_________________________________________
The VisPro Database Designer
The VisPro add-on objects are not included in the Evaluation Version.
These objects are business graphics, formatted entry field, spreadsheet,
clock, and calendar.
_________________________________________
A sample application displaying some of the add-on objects
You can use these objects in any or your C applications, even those not
generated by VisPro.
Business graphics
Add pizzaz to your business related applications by using this
control. Displays your data in bar, stacked bar, pie, line and
area charts formats. You can control many style options including
3D effects and colors.
Formatted entry field
Displays a text entry area that has specific formats of data,
including date, time, uppercase, or a customizable picture mask.
Spreadsheet
Allows users to enter and display data in spreadsheet format. You
can control the number of rows and columns, as well as other
spreadsheet attributes. This is ideal for providing you
applications with a way of entering information in column
fashion.
Calendar
This monthly calendar provides you applications with a quick and
easy way of specifing date information.
Clock
The clock control displays the time in analog, digital and
military format.
_________________________________________
A sample application displaying the clock object in different formats
The resource information for each window is generated in binary form in
the Evaluation Version. As a result, it is not possible to modify these
outside the VisPro environment. In the full product, this information is
generated in textual form, allowing for easy inspection and modification.
The product information window is forced to the foreground every time you
enter the Evaluation Version of the VisPro editor. In the full product,
you can choose not to view this window.
After opening the layout view 40 times, the evaluation version will bring
a window telling you that you have used it 40 times. After this, you
will no longer be able to bring up the layout editor.
ΓòÉΓòÉΓòÉ 5. Company background ΓòÉΓòÉΓòÉ
In April of 1993, HockWare introduced VisPro/REXX--the first OS/2 visual REXX
programming tool as well as the first REXX programming tool to include drag and
drop programming.
VisPro/REXX fully exploits OS/2 2.x, OS/2 Warp, the Workplace Shell, CUA '91
objects, SOM and the REXX language. There are three commercially available
products developed with VisPro/REXX:
Performance Plus by Clear and Simple
A CPU performance monitoring tool
WatchIt by Client Server Networking
A LAN performance analysis and management tool for IBM LAN Server
CS-Edit/2 by Multitask Consulting
A system configuration editor
These are just a few of the products that exemplify the robustness and
stability of the VisPro development environment.
HockWare has headquarters in Cary, North Carolina (USA).
ΓòÉΓòÉΓòÉ 6. How To Order VisPro/C ΓòÉΓòÉΓòÉ
VisPro/C is available directly from HockWare or from your favorite software
reseller.
We provide several ways you can reach us for product support and questions.
These include:
Phone: Our technical support number is
(919) 380-0616
Fax: Our FAX number is
(919) 380-0757
Compuserve: Mail can be sent directly to us at
71333,3226
Technical questions can be directed to our forum. You can access the
HOCKWARE forum by using the GO command in this form:
GO HOCKWARE
Internet: Our Internet address is:
hockware@vnet.net
World Wide Web: General sales information, product announcements, and
patches are available from our site on the world wide web. The URL is:
http://www.hockware.com/hockware
The next section contains an online order form, which you may print out to use
when mailing or faxing your order to us.
ΓòÉΓòÉΓòÉ 6.1. Order Form for VisPro/C ΓòÉΓòÉΓòÉ
SHIPPING ADDRESS: BILLING ADDRESS:
Name: ____________________________ Name: ____________________________
Company: _________________________ Company: _________________________
Address: _________________________ Address: _________________________
__________________________________ __________________________________
City: ____________________________ City: ____________________________
State: ___________________________ State: ___________________________
Country: _________________________ Country: _________________________
Zip: _____________________________ Zip: _____________________________
Phone: ___________________________ Phone: ___________________________
FAX: _____________________________ FAX: _____________________________
PAYMENT METHOD: (Circle)
Check Purchase Order(Include copy of PO) Credit Card: Visa Amex MC
Wire Transfer Account Number:
______________________________
Expiration Date: _____________
UPS SHIPPING and HANDLING FEES: (Alaska, Hawaii, Puerto Rico and Intnl.
shipping fees vary. Please call.)
Ground: 1-3 Copies $7.00 each additional copy: $2.00
2nd day air: 1 copy 15.00 each additional copy: 4.00
Next day air: 1 copy 25.00 each additional copy: 6.00
ITEM QUANTITY UNIT PRICE TOTAL
VisPro/REXX Gold __________ $299.00 _____________
VisPro/REXX BRONZE __________ $59.00 _____________
VisPro/Reports __________ $199.00 _____________
VisPro/C __________ $299.00 _____________
VisPro/C++ __________ $299.00 _____________
Development Suite
(VisPro/REXX, C, C++) __________ $499.00 _____________
SUBTOTAL _____________
Sales Tax (residents of NC only, 6% subtotal) _____________
Shipping _____________
TOTAL _____________
Where did you hear about us?
HockWare, Inc. Telephone (919) 380-0616 FAX (919) 380-0757