August 2006: Volume 15 Number 1

SP4 overview | SP4 details | VAR program | Technical tips | News, products update | Newsletters home page

Powerful new features in Service Pack 4

David Bennett – MD Powerflex Corporation – Australia

The release of Service Pack 4 for PFXplus V5 brings together a number of powerful new features and minor fixes we have been working on for some time. While the main focus of our development effort remains PFXweb, we recognise that many of our customers continue to use Windows and this service pack is just for you.

The main new features are in two areas: enhancements to the Windows GUI and COM Support. There is also support for later versions of Btrieve and SQL, plus a number of minor features.

Windows/XP interface gives a better user experience

The Windows User Interface changed quite a bit in Windows/XP. While earlier versions of PFXplus provided compatibility, these latest changes continue our commitment to enhance and improve the user experience.

We have provided support for manifests, so you can create a user interface just like Windows/XP.

We have added support for new Windows/XP controls, including ComboBoxEx, and improved the support for the Date-Time picker by making it work for all date windows. Either a keystroke or a mouse click can be used to pop it up when you need it.

We've also added colour just about everywhere! The ListView can have stripes of alternating colour and it can also display colour in a way that is data sensitive. For example, a negative balance can show in red.

The original architecture of Windows comprised a set of Dynamic Link Libraries (DLLs). Most of the core features are still accessed through this mechanism, and can be called in PFXplus using LOAD_DLL.

COM Automation also includes a whole host of useful components from other vendors, and a number of useful features in Windows itself. For example, you can use COM support to send email using the CDO object on any mail server, including those which do not have Outlook or Exchange installed.

COM automation support is a new dimension of power

Increasingly, new Windows features have used Application Programming Interfaces based on the Common Object Model (COM). Various parts of the technology have been referred to in the past as OLE or OCX, but now COM is the preferred term. COM Automation refers to the ability for one program to control another, and ActiveX refers to COM-based controls and other user interface objects.

PFXplus supports COM Automation in a similar way to Visual Basic, based on there being a Type Library. This includes all the programs in the Microsoft Office suite: Word, Excel, Outlook, etc. You can easily write a program to display customer data as a Word document, or sales summary as an Excel chart.

COM Automation also includes a whole host of useful components from other vendors, and a number of useful features in Windows itself. For example, you can use COM sup-port to send email using the CDO object on any mail server, including those which do not have Outlook or Exchange installed.

These are powerful new features, and we look forward to your feedback. The beta Service Pack 4 is available for download to all developers with a registered version of PFXplus version 5.0 for Windows. Just contact us and we will send you the download link.

Top of Page

PFXplus Service Pack 4

Eva Meisel - Powerflex Corporation, Australia

The beta version of Service Pack 4 for PFXplus 5.0 has just been released. PFXplus is a constantly evolving product and this Service Pack adds some exciting new features. It also eliminates one or two minor annoyances reported by our developers.

New features

The features added in Service Pack 4 result from ideas and suggestions from PFXplus developers as well as our desire to remain at the forefront of industry trends. The most exciting of the changes are the provision of COM support and the expansion of the PFXplus GUI to include colour support independent of Windows default settings.


The compiler now allows arrays larger than 64K. Any global or local array can now have any combination of bounds of any integer size. For string arrays, the maximum length is 32767 for each element of the array. Both array bounds and string length can be expressed as either a constant or an expression, which is then evaluated on first use at runtime.
Note: programs that use variably-sized arrays or large arrays must be recompiled, and are not compatible between SP4 and previous versions.

A limit on the number of objects that could be defined has been removed. The theoretical limit on the number of objects is now about 16,000, but in practice other factors will impose a lower limit.

The /HTML switch for creating .htm output is now enabled in the PFCN compiler. This switch invokes the MKHTML conversion on output file /O<file> and sends the resource output to <file>.htm.
This provides compiler support for PFXweb, which then requires a separate runtime.


Pervasive Btrieve version 8 and 9 are now supported by PFXplus runtimes. Previously, it was necessary to run a version 8 or 9 engine configured to generate version 7 files.

COM Support

The compiler and runtime now support COM objects. This support allows control of automation objects such as Word and Excel documents. This powerful new feature has its own documentation, and will be further enhanced in future releases.

Form control enhancements

WINOBJ.PFI and WCOMCTL.PFI files have been updated with changes to Classes CONTROL, CCEditWithButton, CCListView, CCProgressBar, CCTreeView and CCStatic to support the following:

A new WCOMBOBOXEX class has been added, and runtime changes made to support the Windows common control class "ComboBoxEx32". The same syntax that is used to add items to a ComboBox can be used to set items for the ComboBoxEx.

A CCDateTimePicker class has been added to support the Windows common control class "SysDateTimePick32".

New configuration item iMonthCalendarKey allows a double click on a DATE type window, or a press on a specified key, to popup a MonthCalendar and allow the user to make a date selection

A number of extra keys are available in KEYS.PFI, including Alt+Down which is the Windows default popup key.

Lookup enhancements

Lookup now supports row and column colouring. New classes and new member functions are added to support this new functionality. Lookup supports 2 types of colouring - setting the background colour of a row and setting the foreground or background colour of a column.

Changes to the Runtime and LKUPSRCH.PFI support ListView callback and enable local column sorting of a ListView control.

New properties LKPOPUP\NoSeed and LKUPSUBFORM\NoSeed allow better control over the SearchFile function.

SQL specific

Microsoft SQL Server 2005 is now fully supported.

Configuration item iRollbackOnExit now allows an abort transaction to be called if the program exits during an active transaction with outstanding locks. If not enabled, a commit is done during the exit phase which may commit transactions despite a fatal error. Values are

0 disable feature, active transaction committed on exit
1 enable feature, active transaction aborted on exit

Configuration item iSqlCacheOpens controls the in-memory caching of SQL structure data, which significantly speeds up reopening of files that have just been closed. Values are

0 use default value (currently 2 for all database drivers)
1 disable feature, no caching
2 enable feature, caching in effect

This feature should only be disabled by programs which must manipulate the PFXFILES tables directly. Note that this feature was implemented in SP2 but not previously documented.


As a result of support requests and suggestions we have included the following enhancements and fixes.


The compiler now emits an error if an attempt is made to create an object or class based on a defining class or superclass of unknown size because it has only been declared forward.

The compiler now generates object trees including only objects inheriting from @HANDLER in the CHILD and SIB properties.


In some cases a window form produced a Signal 11 error when the program sent a message to a statusbar, menubar or toolbar. This nas been fixed.

Setting a FILE_MODE on an in-memory table is now ignored. In previous versions of the runtime, setting a FILE_MODE on an in-memory table could generate a Signal 11.

The Clear button on a CCA toolbar now works correctly and produces the same result as pressing the KEY.CLEAR.

Setting the SET_CURSOR variable in a multi-line edit containing line break characters to a value greater than the length of the contents of the window now correctly places the cursor position at the end of the data. In previous versions of the GUI runtime the positioning of the cursor under these conditions was not correct.

The runtime now correctly gives an error 49 "User number exceeds version limit" when the maximum number of 999 licensed users is reached and the 1000th user attempts to log on. In previous versions, the 1000th user was silently given a single user status with unpredictable behaviour for all other users connected to the database.

The runtime now correctly converts lower-case strings to indicators. Service Pack 3 incorrectly converted lower-case string values to FALSE.

EM_HIDEBALLOONTIP message has been added in order to redraw the edit window after the Windows XP generated "Caps Lock" warning balloon tip is dismissed. Previously, where manifest files were used to apply XP style to PFXplus edit window used for password login, the "Caps Lock" warning generated by XP system made the PFXplus contents disappear.

In certain circumstances the PAGE command may have produced a Signal 11 error. This has been corrected.


A rare problem in calculating a recnum for Btrieve files has been fixed. Previously, an incorrect RECNUM may have been calculated for files where the number of Btrieve records in a block is 32, 16 or 8.

SQL specific

The SQL runtime now correctly allows a zero length string in a constraint. In previous versions of the runtime this condition caused a GPF.

Powerflex SQL runtimes now correctly create in-memory tables when the SQLOpen command returns a table which has a record length of less than 6 bytes. In previous versions the error 61 (ERINVDEF) was returned.

Powerflex SQL runtimes are now multi-user safe if the INDEX_SET and REINDEX commands are used to create and reindex a temporary index on a Mark 5 file. In previous versions of the runtimes, a Violation of PRIMARY KEY constraint SQL error was returned in this situation.

The Powerflex SQL runtime now correctly finds the SQL columns under an overlap field when used in an index. In previous versions some columns under an overlap field were left out of the created index.

The Powerflex SQL runtime now correctly caches SQL statement handles. In previous versions the cache limit was too low and under some circumstances the runtime hung in a loop.

The open option WHERE now correctly constrains all finds in the SQL runtimes. In previous versions this option did not work.


The release includes a number of new samples and preliminary documentation, including documentation for COM Support, which should be studied for further information.

Value added reseller program

Chris Babarczy - Powerflex Corporation

The Powerflex Value Added Reseller (VAR) Program was introduced 18 months ago. Since that time there has been much interest and many questions from our customers about why the program was introduced and exactly how it works.

This article explains the reasons for the program, how it works and the benefits that you as a Powerflex customer can receive by becoming a member.

Long term commitment

The underlying reason for the introduction of the program was the understanding that our customers have made significant investments in developing their applications using Powerflex products. In an industry that has undergone major change over recent years, our challenge was to provide the best long term product development and support to those developers dependant on our products.

We investigated options such as frequent product upgrades and subscription licensing but concluded these could greatly inconvenience our customers. Therefore, we decided on our VAR Program model whereby membership would assure our customers of ongoing support and development of their Powerflex products.


The immediate benefits to members of the VAR Program are

Attractive as these benefits are, there is one overriding benefit for Powerflex developers. That is, the VAR Program ensures that Powerflex products will undergo continual development and enhancement while there exists a need for high performance and robust application development products.

How it works

The Powerflex VAR Program is based on a model that is becoming more and more popular with software developers around the world.

Membership of the VAR Program is on a product by product basis. That is, if the benefits of the VAR Program are required for a particular product, then it is necessary to register that product in the program. Registration involves recording of product details including serial number, a nominated developer and payment of an annual fee. Products are registered according to the following guidelines

The current Service Pack 4 is now in beta test. When the production version is released, it will be sent free of charge to all VAR members.

Join now

Joining the VAR Program is as simple as contacting Powerflex Sales. We will give you all the information you need and make it easy for you to become a member. Join now and protect your application investment!

Top of Page

Technical Tips

Technical tip No 49 - Powerflex Reporter

Ingemar Aronsson,I. Aronsson System AB, Sweden.

When running a report, if you press a key to interrupt the report, you get the dos-style message "Report paused.......".
To get a more windows style message change report.pfa to:

#ifndef rpt.keypress
IF QUERYYESNO ("A key has been pressed, finish?")==ID_YES RETURN END$OF$REPORT
// string $rpt$akey 1
// repeat
// show "Report
// Q)uit, F)inish or C)ontinue..."
// inkey $rpt$akey
// showln
// if key.escape ;
// return end$of$report
// until $rpt$akey in "QqFfCc"
// if $rpt$akey in "Qq" return end$of$report
// if $rpt$akey in "Ff" return

Technical tip No 50 - Manifest style

Peter Juliff, Vetware Pty Ltd, Australia.

When using the XP manifest styles, there were a few things I had to "fiddle with" so that the application looked correct.

  1. The XP tab image is a lighter colour and the subform on the tab is relatively darker when using the manifest file. If you have been very careful and made sure your x and y for all sub forms is consistent, it just looks a little bit odd. If you have been a bit sloppy, then the subforms stand out as being oddly positioned. In such cases, the precise position and dimensions for subforms can be easily modified in PFXdre without having to modify the source code.
  2. The height of some of my lookups need to be adjusted as they didn't seem to display the same number of rows and leave white space at the bottom. If you make the image a bit higher it displays correctly again.
  3. With lookups, the column widths may have to be increased. Using the manifest file makes the headings on the columns slightly larger. A bit of tweaking is required to display the whole column header.
  4. With raised subforms, the top form often, but not always, needs to be about 1-3 shorter and sometimes about 1-2 narrower.

    r_subform TheForm {screen=s_main,x=xpos,y=ypos} ; {width=ScrWidth-4, height=ScrHeight-16} begin


    r_subform TheForm {screen=s_main,x=xpos,y=ypos,HelpID=IDH_PrinterConfig} ; {width=ScrWidth-4, height=ScrHeight-19} begin

    The same applies to subforms on tabs and subforms if you have a status bar down the bottom of the screen. "

Top of Page

Powerflex News and Product Update

PFxplus v5.0 for Red Hat ES4

PFXplus v5.0 has been validated for Red Hat Enterprise Linux ES 4. Now you can upgrade to the latest Red Hat Linux with confidence, knowing that your PFXplus applications will handle the transition without a hitch.

Contact us to find out which Unix platforms are supported by PFXplus or to organize a validation of PFXplus for a particular operating environment.

PFX C-lib for Linux

PFX C-lib version 5.0 is now available for Linux. This new version was built with version 4.0.2 of the GNU C Compiler on the Ubuntu 5.10 distribution of Linux (kernel 2.6-12-9-386). Contact us for product details and pricing.

PFXcrystal 5.1 supports CR XI

PFXcrystal 5.1 has been tested and validated to work with current versions of Crystal Reports XI and XI SP1. The latest packaging of PFXcrystal 5.1 now also contains detailed installation instructions for Crystal Reports XI. Special discounts are still available for VAR members wishing to update to the new version.

New product packaging

To compliment our new logo and new look Powerlines, we have released new content and packaging of our version 5.0 products.

As well as the updated packaging, the product CDs now include updated Readmes, manuals in PDF format and copies of Service Pack 2 where applicable.

If you need new media for one of your Powerflex version 5.0 products, or just want the latest we will happily send you a copy. A charge of AUS$20 for the first and AUS$5 for subsequent products in a single order is required to cover our administrative and mailing costs to anywhere in the world. Contact sales for details.

Top of Page

Current Versions of Powerflex Release Software

PFXplus Developer's Kit 32-bit for Windows/Btrieve/SQL incl SP2 5.0
PFXplus Runtimes 32-bit for Windows/Btrieve/SQL incl SP2 5.0
Service Pack 3 for PFXplus Developer/Runtime/PFXodbc/PFXbrowse 32-bit for Windows/Btrieve/SQL, available to VAR members only 5.0
PFXplus for UnixWare incl SP2 5.0
PFXplus for AIX incl. SP2 5.0
PFXplus for Linux SP1 5.0
PFX C-lib 32 bit for Windows/SQL incl SP2 5.0
PFX C-lib for Linux 5.0
PFXsort for 32 bit Windows/SQL 5.0
PFXsort for UnixWare 5.0
PFXsort for Linux 4.41
PFXbrowse 32-bit Windows/Btrieve/SQL Developer version incl SP2 5.0
PFXbrowse 32-bit Windows/Btrieve/SQL End-user version incl SP2 5.0
PFXbrowse Developer for Linux 4.41
PFXodbc 32-bit Windows incl SP2 5.0
PFXcrystal 32-bit Windows for Crystal Reports 9, 10 and XI 5.1
PFXplus HTML Help 5.0

Top of Page