Powerflex Corporation off to a Flying Start in 1998 | New Common Controls Architecture for PFXplus | Make Windows Apps a Reality: Use the PFXplus CCA Tools | Using an Integrated Development Environment for Powerflex Windows Programming | Powerflex news
The year has begun tremendously well for Powerflex Corporation. January just past has been our best January since the company was formed in 1989. We are extremely pleased and excited by this result. In fact this month just finished is the second best ever. David Bennett Director of Technical Services commented that "January is traditionally a slow month for sales as Australians take their summer break during this time and sales suffer. But not this year - we are now more than ever looking forward to a great year." Our product line is now mature with our Windows versions of PFXplus and PFX C-lib now well tested in the market place. We are now in a position to consolidate the very hard work that has gone into the development of these products.
If conservation and recycling make sense for the environment, they make just as much sense for your source code. The 3Rs of conservation for the environment are:
These principles are equally valid when applied to source code, especially when moving a character based application to the Windows environment. The cost and delay of a re-write can cripple a business and is absolutely unnecessary when using the latest release of PFXplus.
Powerflex Corporation is right behind you in your efforts to conserve. The motivation behind PFXplus for Windows is to provide a path to move existing character based code in an orderly fashion to the Windows, Windows 95 and Windows/NT environments.
Not only does PFXplus allow you to re-use your existing code, providing the tools for conversion to Windows based code, it also allows you to continue using the procedural programming techniques you are familiar with. Then add Events and Objects at your leisure when you are fully comfortable with programming under Windows.
The latest release of PFXplus provides some exciting new capabilities with the Common Controls Architecture. The feature article beginning on the next page provides an in-depth look at the benefits available in 32-bit Windows. Please contact Powerflex Corporation or your local dealer for more information about PFXplus with CCA.
The PFXplus Common Controls Architecture (CCA) is a set of development tools and modules for creating PFXplus programs to run under 32-bit Windows 95 or Windows/NT. Whether you convert an existing program or write a new one using familiar techniques, the resulting program will have the unmistakable look and feel of genuine Microsoft Windows.
REWRITE Programs written using the CCA tools may have
Correct operation of the Common Controls requires Windows 95 or Windows/NT 3.51 or later (4.0 or later recommended).
PFXplus 4.2x is required, together with the new and updated versions of OBJECT.PFI, WINOBJ.PFI, and other files.
Our new CCA Add-On to PFXplus:
|CCAnimation||Runs a "mini-movie" to indicate some long-running activity|
|CCBitmapButton||Push button which shows a button rather than text|
|CCBitmapStatic||Displays a passive bitmap|
|CCButton||Push button which can be enabled or disabled|
|CCControl||Generalised control with additional behaviour|
|CCProgressBar||Shows a coloured bar which indicates the progress of an activity|
|CCStatusBar||Placed at the bottom of the form, for displaying status and error messages|
|CCTab||Tab control used to provide the tabs when constructing a tabbed dialog|
|CCToolbar||Toolbar, placed just under the menu, on which you place command buttons|
The right development tools can make the difference between:
Powerflex Corporation is committed to providing tools that make success a reality. Read on for a list of new features provided in version 4.22 to help make the job of Windows application programming that little bit easier.
A Toolbar is a control window that contains one or more buttons. Each button sends a command message when it is pressed, to carry out some action. Often a Toolbar contains the same commands as the menu but in a more directly accessible location.
A Toolbar is defined as an object within PFXplus. Simply add a TOOLBAR object to a FORM to include a Toolbar control.
This picture shows a typical Toolbar which can be created using the tools provided with PFXplus version 4.22.
A Status Bar control is a horizontal window, usually displayed at the bottom of a form, in which an application can display various kinds of status information.
The Status Bar control can appear in two forms. A normal Status Bar is divided into several parts to display more than one type of information. A simple Status Bar has no divisions and is typically used to display an error or notification message.
This Status Bar is implemented as a standard PFXplus object called STATUSBAR. You need simply define it as an object within the main form definition.
The Tab control is the essential element in constructing a Tabbed Dialog. The tabs and frame you see on a Tabbed Dialog are all generated by a single Tab control.
A Tab control is analogous to the dividers in a notebook or the labels in a file cabinet. By using a Tab control, an application can define multiple pages for the same area of a form.
The appearance of a Tab control is achieved by drawing a frame around a specified portion of the form display area to which the Tab control is attached. A Tab control can also have tooltips that are identical in nature to those available with a Toolbar.
A Progress Bar is a very simple control that an application uses to indicate the progress of some activity towards completion. Visually, it consists of a rectangle that is gradually filled, from left to right, with the system highlight colour. The following illustration shows a Progress Bar.
A Progress Bar has a range and a current position. The range represents the entire duration of the activity, and the current position represents the progress that the application has made toward completing the activity. The Progress Bar control uses the range and the current position to determine the percentage of the Progress Bar to fill with the highlight colour.
Add class to your application with animation. Just a little effort gives great rewards.
An Animation Control is a window that displays an Audio Video Interleaved (AVI) clip. An AVI clip is a series of bitmap frames like a movie. Although AVI clips can have sound, you can use only silent AVI clips with an Animation Control.
Because the thread continues executing while the AVI clip is displayed, a common use for an Animation Control is to indicate system activity during a lengthy operation. A typical Animation Control is shown below.
A Bitmap Button is a regular Windows button which displays a bitmap picture instead of text. They look great and are really simple to implement using our CCA tools.
Most image editors can be used for the creation of Button Bitmap files. The program IMAGEDIT.EXE that is shipped with PFXplus is quite suitable for the task. This program has a limitation of 256 pixels for the width and height of a bitmap file. A bitmap with a size of 256 by 256 pixels makes for a large button, enough for most purposes.
The bitmap file BMPBTN.BMP shown here was created with IMAGEDIT.EXE.
The Common Controls Architecture (CCA) MENUBARS system is an integrated set of tools based on the Windows 32 bit Toolbar and Status Bar common controls, also incorporating the Windows menu system. The data defining these controls and the menu system is drawn from the one data file CCAMENU, which is similar to the standard MENU.DAT data file.
Programs gain access to these controls by including CCA.PFI, which is designed to simplify the creation of Forms, Subforms and Popups. CCA.PFI uses WCOMCTL.PFI, which is responsible for the specific class creations and definitions relating to the Common Controls.
When you update to PFXplus version 4.22 you will receive the CCA Add-On which includes all the tools described above.
Remember you can take your existing Xflex character based code and convert it to Windows using the tools provided with PFXplus version 4.22.
One of the key factors in so called power programming in any language is a good text editor. For development work in the Windows environment you will not get much better than ED for Windows, a locally produced product which is finding wide acceptance both here in Australia and overseas.
The purpose of this article is to describe the way we have configured ED for Windows for our Powerflex development work. We have been using this system for over twelve months now and find that we rarely need to drop out to MS-DOS.
If ED has been installed correctly, the necessary additions will have been made to the Windows configuration. While some will want to add the ED for Windows directory to the PATH statement, this is not really necessary if you launch the editor from a Desktop icon. In the Properties section of the icon we specify the full path for ED for Windows and it takes it from there.
ED supports a range of file extensions and allows for Programs to be set up for each file type. For our purposes, it is beneficial to set up programs to compile various types of Powerflex code and to run the program we are currently working on. It is not necessary to repeat the programs for each file extension we may use, .SRC, .PFX, .FRM, .RPT etc. Once a compile program has been transferred to a Toolbar button, it will adapt to any extension you may use.
We suggest you select one file type to set up an initial set of programs, then use the copy function to produce variations on the theme.
Open a source file, for example GMEM3.PFX. From the Tool menu, select Programs, or alternatively use ATL+F10.
From the Program Titles dialog select ADD and then proceed to complete the details along the lines of the example shown. This example shows how to set up a program to compile the current program, irrespective of extension, producing both a .PTC and .PR3 file.
By specifying <NAME>, we will get the name of the current file including its drive and path. If we use the <FILE> option here we will get only the name of the current file, excluding any drive\path and file extension. If PFCN.EXE cannot be found in your PATH, you will need to specify the full path for that file.
Make sure you check both the Save edited files and Unlock & reload files as All. We suggest that you also check the Goto first error option and select the Powerflex Error track type.
Once you have saved this program you can use it as a template to produce other variations for the compiler. For example, Compile .PTC would have the Command line PFCN <NAME>.
Similarly, you could set up a program to run the current program. Using the above as a template you might produce a Program with the Command Line PFLND <FILE>. Note that with this we use <FILE> to specify the program to run because we do not want to pass the full path to the runtime. We also have not checked the Goto first error option as this is not relevant.
By just setting up all your favourite programs like this you will improve your working environment. To make things even easier, you can attach any or all of the programs you set up to the Toolbar. The only restriction here is that we are limited to the Toolbar button images that come with ED.
Once a Program has been attached to a Toolbar button, it becomes independent of the Programs menu and hence the file extension. It is also more convenient to click a button to compile or run a program than to select a program from the Program menu.
From the ED main menu, select Options and then Toolbars. The toolbar that you are currently using will be checked. If this is the one you want to change, note the name and then select Customize.
From the Toolbar Configuration dialog, select the toolbar you want to modify. Then locate and select a button image. From the Command Type listbox, select Programs, and from there locate and select the program to be associated with the button image selected. Now locate the position you want to place the new button and select Add Before or Add After as appropriate.
We would suggest that you use the Copy option before you embark on this exercise to avoid errors. You might also remove existing buttons that you would not use in order to make space for your new buttons.
ED for Windows is available from Neville Franks at Soft As It Gets by telephone on +61 3 9885 4445 or by fax on +61 3 9885 4444, or by e-mail at email@example.com The Web site can be visited at www.getsoft.com. For existing users Neville tells me that version 3.80 is now released.
In order to rationalise and streamline our e-mail services Powerflex will from the end of February discontinue our cc:Mail service. If you need to contact us please use the following Internet e-mail addresses.
Support: firstname.lastname@example.org Information: email@example.com General Enquiries: firstname.lastname@example.org Sales: email@example.com Individuals: Individuals responding to your messages will provide you their direct e-mail addresses where necessary. It is important to provide a return e-mail or fax address when you correspond with us.
The fax machine and postal service are still working for those who prefer non-electronic communication.
The coming of the year 2000 presents a problem for computer software quite unlike any other. Although getting working software to keep working when the calendar clicks over should be easy enough, I know several computer professionals who are making unusual preparations. They swear they are going to take all their money out of the bank, run up a bill on the credit card, take a long holiday and go nowhere near an automatic machine on the magic day. Strange people!
The year 2000 problem has two quite unusual features. First, the deadline has been known a long time and many people are not ready, but it will not slip. Not by one second.
Secondly, no-one has ever done it before. There are no dry runs and no second chances.
Fortunately, the problems are fairly well understood by now and PFXplus provides a good set of capabilities to encourage and support year-2000-compliant programming. As discussed in the previous issue of POWERlines, the main thing you must do is to convert all your existing data to use so-called "high-range" dates, if it doesn't already. That means that your data files should contain dates like 08/08/1998 and not 08/08/98.
Unfortunately the fragment of code we published last issue was incomplete. It did not handle zero dates correctly. Here is the correct way to do it.
if inv.date > 0 and ; inv.date < 693975 begin inv.date = inv.date + 693975 saverecord inv end
So all you still have to do is make sure you are running PFXplus 2.63 or later, convert your data and literals in your programs into high range format and add these two lines to your PFX.INI.
[PFL] bSysDateCentury=true iBreakYear=1950
Then relax and enjoy the millenium with our compliments!
Powerflex Developer's Kit: 4.22
Powerflex Runtimes: 4.22
Powerflex SCO RS/6000: 4.11
Powerflex HP 9000, Motorola: 4.11
Powerflex Siemens, DEC: 4.11
PFXdebug for DOS/Windows, Unix: 4.11
Powerflex Reporter Source Code: 2.63
Powerflex Toolbox Source Code: 2.63
PFX C-lib MSDOS: 4.20
PFX C-lib Xenix/Unix: 3.21
PFX C-lib for Windows: 4.20
PFXsort DOS, DOS-386 Win32: 4.00
PFXbrowse for DOS: 1.00
PFXbrowse for DOS-386 and Btrieve: 1.10
PFX Software Protection: 1.30
Further information is available from Powerflex or your local dealer.