Shared knowledge leads to accumulated knowledge

Printer Friendly Page

cWindowsEx Documentation Project

The documentation for the cWindowsEx Framework is under development for the moment. The MS Word file below is an incomplete documentation file. We have worked to improve packages and classes description.

Note, the Sample application has a simple tool for documentation generation. It was created for cWindowsEx packages only and may not work out any custom source file correctly.

For a detailed description on using MS Windows API functions you should look at MSDN. Documentation of the cWindowsEx project does not include a detailed description of the Windows API calls.

In order to use/enhance these packages, you must be an advanced Visual Dataflex programmer. Important! Most of the packages are not intended to be used by newbies! Some of the packages require a VDF Expert knowledge. In any case, use these packages with care!

If you do not feel brave enough to use these packages, but require some special feature or a helping hand, then we recommend you to hire an expert! In this case, please contact the project coordinator who will redirect you to the right person of the project.
Documentation for some cWindowsEx Framework packages.

Making you source cWindowsEx compatible

This section describes how-to make your source cWindowsEx Framework compatible.

In fact, it is not difficult at all. Basically, we have used the following structure for any newly introduced package:


Where, ".H" is a header file which includes all required constants, structures and external function declarations. USE ".H" in the ".PKG" file to pickup external declarations. Use ".PKG" file to define Visual Dataflex functions, classes or objects.

If a package needs to be used globally, then you are encouraged to include (USE it) into the CWINDOWSEX.H file. This is the main (Root) file to be used in your application, much like the dfallent idea in DataFlex.

Additionally, you may create one or more supplemental packages. For example, to create some extra functions or classes for some particular purpose. Again, if this package is Global, then USE it in the cWindowsEx.h file. Otherwise use it in the appropriate place of your application.

External_Function Declarations

In order to not have conflicts with another declaration of the same function in any part of the application, please use the "Ef" suffixe in the Declaration:

External_Function NewApiFunctionEf "ApiFunctionName" SOMEAPI.DLL...

Structures and constants

We did not make any special prefix or suffix for the structures(types) and constants definition. So, some extra work may be required to be sure that the same structure has not already been defined somewhere else. As a starting point, use the standard Visual Dataflex packages.

cWindowsEx Tips and Tricks

Tip 1: New About and System Info dialog

If you will invoke About dialog in the Sample Application, then you will see 'System' button. Pressing on this will popup new System Info dialog with sophisticated information about environment, where your application work. This dialog has a Windows Explorer style interface and fully resizable.

Most last item on the left hand treeview named as 'Application' and require additional explanation about this item. Root branch showes to the user current information about name, copyright and revision of the application.

This item has 2 additional items in the tree. Registry and Data. This is a custom items and expected to be filled by developer. About dialog simplifies this task as much as possible.

The purpose. The real life application usually have a lot of system options, that may be stored in different ways. For example, it may be a Windows Registry Branch(es), Some datafile used to store some global application options or SysFile, that used for auto increment and options.

So, you may require from the user to provide an environment report, including current application configuration. It is. This 2 branches utilise this task. You may assign registry branch, unlimited number of System files or any data file where from you would like to get a content.
To assign proper values, pleas open SysInfo.dg in the studio or IDE. Find out oWinListView1 object.

To add system file, use following statement:

Set piAppFile ORDSYS.File_Number 0 To 0

You may assign as much data files as required. The arguments as following: 1) File number, 2) Option field name, 3) Option field value. If 2) and 3) not specified as per example above, then file worked out as System file. Database field name will be used as option name and field value as value.

To add any other data file, use following:

Set piAppFile SALESP.File_Number 2 To 1

As you can see here, The option above defines data collection from Sales person file from Order workspace and uses field 2 (Name) content as option label and field 1 (ID) as value. On building output, to the option name added file name, so you can easely understand where from this value came.

And finally, use following statement to obtain your application Windows Registry branch:

Set psRegistryKey To "Software\Data Access Worldwide\Visual DataFlex\9.0\IDE\"

If you do not need to collect any options, just remove these lines from System Information dialog.

Note: You may save all system information collected into the following formats: Plian text, HTML or RTF (MS Word document). It will allow you to obtain this file from remote customer site and examine as required.