Beruflich Dokumente
Kultur Dokumente
• Programming
1. FiveWin Programming Guide
• Reference
1. FiveWin Reference Guide
• About...
1. Developers
2. Tech Support
3. Distribution
4. Register Process
5. WhatsNew
2. Resources Management
2.1 What are resources ? .
2.2 EXE resources vs. DLL resources .
2.3 Multimedia applications .
3. DataBases Management
3.1 Reusing all your MsDos designs .
3.2 Using FiveWin DataBase objects .
3.3 DataBases and Non-Modal programming .
3.4 Network programming .
4. Browses Management
4.1 FiveWin own TWBrowse class .
4.2 Placing browses in resources .
4.3 Using FiveWin indexed filters ( SELECT clause ) .
4.4 Drawing bitmaps inside browses .
4.5 Browsing arrays .
4.6 Browsing everything you want .
5. Printing
5.1 Basic concepts about printing in Windows .
5.2 Quick printing techniques! .
5.3 Managing the printer as an object .
5.4 Managing the FiveWin Report engine - I .
5.5 Managing the FiveWin Report engine - II .
5.6 Mixing graphics and text .
5.7 Previewing your print-works .
6. Debugging
6.1 Using the FiveWin debugger .
6.2 Debugging techniques .
6.3 Low level debugging techniques .
7. Documenting
7.1 Developing Windows Help files .
7.2 Managing HLP files from your applications .
8. Windows advanced
8.1 Managing DLLs - Dynamic Link libraries .
8.2 Managing DDE - Dynamic Data Exchange .
8.3 Managing MAPI - Mail services .
8.4 Managing ODBC - Open DataBase Connectivity and SQL .
8.5 Managing VBXs - Visual Basic Control files .
Once you have redefined its behaviors, the Object will be activated
using the command:
Lets review now, step by step, the process you should follow
to use resources in your programs:
2. Using that designer you may start drawing the different screens
of your program. This is a standard system for Windows programming.
The screens you design must be stored inside a DLL. In the
\FiveWin\DLL directory there is an 'empty' DLL you may use to store
your screens in. (make a copy for every new project). You should tell
the resource editor to 'open' and use that DLL. Select open file
and type the name of that DLL.
3. When you design your screens you should give a name to each of them.
This name will let you select them from inside your program. You should
specify a unique identifier, a number, for each element of a screen.
This number will be used by the REDEFINE command to tell FiveWin which
Object you are using.
After that, from inside your program you should tell FiveWin that
your program is going to use resources. To do this, use the
following command at the beginning of your program:
#include 'FiveWin.ch'
And when you are about to end the execution of your program, you
should tell FiveWin that you have finished using them:
To use any of the Dialog Boxes you have defined in your DLL all you
have to do is the following:
function TestDialogBox()
local oDlg
local cName := "FiveWin"
return
In this example we are building a Dialog Box from the screen "MyDialog"
stored inside the DLL we have specified in a SET RESOURCES TO "MyDLL.dll"
earlier in the program.
Review the source code of \EXAMPLES\FwBorl.prg where you will find several
examples of using resources from DLLs.
When you get used to this system you will understand that it is the
easiest and quickest way of building programs.
There are two main ways to store the resources of your applications:
Both systems are very powerful, but there are some important
differences you should know:
This means you don't have to remember 'strange' numbers, and also
that under any source code or resources modification you will
make fewer mistakes.
Sample:
Instead of that:
This one has the benefit that you may create a .CH file with all
those #define's and the resource editor let you use it when modifying
the .RC file:
MyApp.RC
RC -K MyApp
The only disadvantage of this system is that every time you build your
EXE you have to compile the RC and place it inside the EXE again -though
this process is extremely fast!-
And you are ready to start using your resources. Remember that if you
decide to put your resources inside your app (using .RC and RC.EXE)
there is no need to specify SET RESOURCES TO... as the .EXE already
has all them inside.
The great disadvantage of this system is that you are not allowed
to use labels if you use a DLL to store resources ! Neither Borland
resource editor nor Microsoft let you use a .CH or .H file where
you may store your #define's if you store your resources inside a DLL.
Sound: There are two principal ways to reproduce sounds in our apps:
Playing a WAV file and playing a MDI file.
WAV files are digital recordings of sounds. A WAV file it may be a person
voice, a song, noises, etc... We have the following functions to reproduce
them:
Vision: There are two principal ways to display images in our apps:
Managing Bitmaps BMP files and reproducing animated Video files.
BMP bitmaps files are the way Windows uses to store digital pictures and
later show them again at the screen or at the printer. You may store
AVI Animated video files is the way Windows stored a sequence of bitmaps
mixed with audio (recorded from a video camera, cartoons, etc...). FiveWin
implements the Class TVideo to easily reproduce them. (See Class TVideo
full explanation).
Windows has a powerful subsystem named MCI (Media Control Interface) that
lets you easily access to any kind of device which it is MCI compatible.
The first thing you should do when studying a new device to manipulate is
to check if it is MCI compatible. FiveWin implements the Class TMCI to
easily manage any kind of MCI compatible device (See Class TMCI full
explanation).
To finally make your application look in a unique way (the final user
will not recognize that he is using a Windows application) there are some
easy techniques that could be used. You can easily avoid using a frame
in your main window, so there will not be a visible caption and typical
Windows small pushbuttons on the corners. Basically this can be done
doing:
There are just some points you should keep in mind for a better
understanding of Windows processes:
SetHandleCount( 40 )
Remember that DBFs that use memos also open an associated file DBT, and
also remember that normally when Windows is printing it opens some
temporary files (also FiveWin opens some more when doing PREVIEWs of
printing works). If you get an error it may be that there are not
enough files available. Increase its number with SetHandleCount().
There is a maximum of 255 files available per application.
Also it is not a good idea to give 255 files to all your applications
for you will consume a lot of memory resources!
2.- If you are working with NonModal designs, the same DataBase may
get opened several times at the same time! By the same user! Clipper
allows this but, in fact, your application is acting like an application
for a NetWork. You have to provide Multi-User control to your application!
For this, if you are using Windows 3.1 loading SHARE.EXE before loading
Windows, this is a MUST! If you are using Windows 3.11 or Windows 95
(pre-releases versions) this is no needed as these new versions
automatically load SHARE.EXE when starting.
3.- FiveWin offers you a powerful DataBase Class that in fact saves
you a lot of tedious work. Just give a little of your time to understand
the FiveWin DataBase Class and you will save a lot of your precious
time!
DataBase objects saves you from coding a _lot_ of source code lines!
Go for DataBase objects right now!
4.- If you are working with older versions of CA-Clipper (older than
5.2 d) you may have serious troubles working with some CA-Clipper
RDDs. Some of them cause big problems in MsDos but in Windows they
may crash your system. DbfCdx is not working properly even in version
FiveWin DataBase objects have been designed with the purpose of reducing
the size of your code when you have to manipulate a DBF. They simplify very
much all the work required to work with DataBases and they are totally
compatible with the standard way of manipulating DBFs in Clipper.
After you do the typical USE <cDbfName> ALIAS ..., then following this
sentence you write:
local oDbf
DATABASE oDbf
FiveWin will create automatically a DataBase object and will keep its
reference inside the oDbf variable.
The DataBase object will have as DATA the name of the fields of your
DBF. Sample:
Enjoy DataBase objects, they are extremely powerful and saves you
from a lot of work! And they are 100% compatible with your existing
code !!!
If you choose to develop your application using a Non-modal style you may
be aware of certain design rules:
If you use MDI windows in your app, or if you use DialogBoxes with the
clause NOWAIT, then you are implementing Non-modal designs.
A non-modal design will let user select several things at the same time.
If you place a browse inside a MDIChild window, that MdiChild window
may be opened several times! Or if a DialogBox is editing a certain
Database, it may be issued several times.
Yes! Clipper let you open the same physical database in different alias,
though acting in the same way as if you were working on a NetWork.
From that moment you have to use Cust1 or Cust2 to reference your fields.
If you have never coded for a NetWork, don't be afraid. In next item
in this documentation we explain the foundation for doing NetWork
coding with Clipper. It is quite easy!
Network programming
--------------------------------------------------------------------------------
If you have never design a NetWork application with Clipper, don't be afraid!
They are not so difficult. There are some rules you have to follow:
FiveWin implements its own browse which has some important differences from
the traditional MsDos Clipper TBrowse. This difference is based on the fact
that we wanted FiveWin browsers to execute as fast as possible. Windows is
FiveWin TWBrowse does not work with column objects, instead of those, it
holds an codeblock (DATA bLine) which returns an array. The contents of
this array is used to display each visible column content. This makes an
important difference: Lets suppose we have a 10 columns browse, which
also has 25 rows on the screen. If we were working with traditional browse
to fully repaint the browse we were doing the following:
This fact makes FiveWin TWBrowses extremely fast, though it changes a little
the way you are used to work with browsers. The main idea is that DATA bLine
holds a codeblock that returns an array:
Important: Always use character expressions as elements for the bLine array!
A number will means a bitmap handle. An invalid bitmap handle
(if by mistake you supply a number instead of a string expression)
will cause strange results!
lHitTop HitTop
lHitBottom HitBottom
PageUp() PageUp()
PageDown() PageDown()
Refresh() RefreshAll()
DrawSelect() RefreshCurrent()
(DrawLine(nLine))
Skip() "
See FiveWin Browse xBase commands and the Class TWBrowse explanation
in this manual for a full description of the above xBase commands. Remember
that FiveWin also provides a new powerful Class TCBrowse in case that you
want to work with column objects. TCBrowse is also a fast browse, though
not as fast as TWBrowse.
1. Select the custom control toolbar button (it shows a little key on
it).
2. You will be prompted for the name of the custom control to use:
Write TWBrowse.
3. Draw the browse area on the Dialog Box and double click on it.
Instead 110 you will select the desired ID for your browse control.
6. Review the RC and DLLs we provide in the SAMPLES directory to see how
we do it.
Lets see a sample of its use: Suppose you have a clients database indexed
by surname. Lets suppose that you just want to review clients whose
names start with L, M, N. Then you do:
This will make the browse just show from "L" up to "N" surnames.
We called them Indexed Filters and we manage them using the LISTBOX ...
FIELDS ... SELECT ... clause:
...
Basically what FiveWin does is a SEEK of the <uValue1> when going TOP:
to find the first element to be showed. If <uValue2> is provided (it
is optional) we do a SEEK of the <uValue2> when going BOTTOM: (to find
the last element to be showed). If <uValue2> is not provided then we
use the following index value to stop the records showed.
* The DataBase showed on the browse ( LISTBOX ... FIELDS ... ) must be
indexed and the active Key must be the same as the <uValue1> we are
going to seek. Please check carefully the types of the index expression
and the type of the <uValue1> and <uValue2> (this one if defined).
Sample:
This clause has been extensively tested, and we guaranty it works properly.
If you don't get a proper behavior it could be that you are not using
it properly. Please review your code and check that all the rules
that we show here are being observed in your code.
If you get strange behavior it is a clear sign that you have some
other problems. We offer an extensive working sample in the
IDE\SOURCE\DOC.prg. Review and you will see how to get all the power
from this really useful clause.
See SAMPLES\FwBrow.prg:
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&Information"
MENU
MENUITEM "&About..." ;
ACTION MsgAbout( FWCOPYRIGHT, FWVERSION ) ;
MESSAGE "Some information about this demo"
SEPARATOR
MENUITEM "&Exit demo..." ACTION ;
If( MsgYesNo( "Do you want to end ?", "Please, Select" ), oWnd:End,)
;
MESSAGE "End the execution of this demo"
ENDMENU
MENUITEM "&Utilities"
MENU
MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
MESSAGE "Calling Windows Calculator"
SEPARATOR
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function Clients()
local oDlg
local oLbx
local aHBitMaps:= { ReadBitmap( 0, "..\bitmaps\Level1.bmp" ), ; // BitMaps de
14 x 32
ReadBitmap( 0, "..\bitmaps\Level2.bmp" ), ;
ReadBitmap( 0, "..\bitmaps\Level3.bmp" ), ;
ReadBitmap( 0, "..\bitmaps\Level4.bmp" ),;
ReadBitmap( 0, "..\bitmaps\Level5.bmp" ) }
if ! File( "clientes.dbf" )
DbCreate( "Clientes.dbf", { { "Nombre", "C", 40, 0 },;
{ "Direccion", "C", 50, 0 },;
{ "Telefono", "C", 12, 0 },;
{ "Edad", "N", 2, 0 },;
{ "Productos", "C", 10, 0 },;
{ "Nivel", "N", 2, 0 } } )
endif
USE Clientes
if RecCount() == 0
APPEND BLANK
endif
INDEX ON Clientes->Nombre TO CliName
SET INDEX TO CliName
GO TOP
USE
return nil
//----------------------------------------------------------------------------//
do case
case nNivel == 1
nColor = CLR_HRED
case nNivel == 2
nColor = CLR_HGREEN
case nNivel == 3
nColor = CLR_HBLUE
endcase
return nColor
//----------------------------------------------------------------------------//
local oDlg
local lFivePro
local lDialog
local lObjects
local nNivel
if lAppend
GOTO BOTTOM
SKIP
endif
if lAppend
APPEND BLANK
endif
Clientes->Nombre := cName
Clientes->Direccion := cAddress
Clientes->Productos := If( lFivePro, "F", "" ) + ;
If( lDialog, "D", "" ) + ;
Clientes->Nivel := nNivel
Clientes->Telefono := cPhone
Clientes->Edad := nAge
else
GOTO nOldRec
endif
return nil
//---------------------------------------------------------------------------//
return nil
//----------------------------------------------------------------------------//
SET SOFTSEEK ON
if ! DbSeek( cNombre )
MsgAlert( "I don't find that customer" )
GO nRecNo
else
oLbx:UpStable() // Corrects same page stabilizing Bug
oLbx:Refresh() // Repaint the ListBox
endif
endif
return nil
//----------------------------------------------------------------------------//
function OpenDbf()
return nil
//---------------------------------------------------------------------------//
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
oBrw:bGoTop = { || nItem := 1 }
oBrw:bGoBottom = { || nItem := Eval( oBrw:bLogicLen ) }
oBrw:bSkip = { | nWant, nOld | nOld := nItem, nItem += nWant,;
nItem := Max( 1, Min( nItem, Eval( oBrw:bLogicLen ) )
),;
nItem - nOld }
oBrw:bLogicLen = { || Len( aSample ) }
oBrw:cAlias = "Array" // Just put something
oBrw:bKeyChar = { | nKey | MsgInfo( nKey ) } // Controlling keystrokes
There are certain DATAs and METHODs in a TWBrowse object, that conveniently
initialized will let you browse anything:
oBrw:bGoTop = { || nItem := 1 }
oBrw:bGoBottom = { || nItem := Eval( oBrw:bLogicLen ) }
oBrw:bSkip = { | nWant, nOld | nOld := nItem, nItem += nWant,;
nItem := Max( 1, Min( nItem, Eval( oBrw:bLogicLen ) )
),;
nItem - nOld }
oBrw:bLogicLen = { || Len( aSample ) }
oBrw:cAlias = "Array" // Just put something
oBrw:bKeyChar = { | nKey | MsgInfo( nKey ) } // Controlling keystrokes
The major difference between managing the printer in MsDos and in Windows
is the fact that in Windows we manage the printer in graphical mode.
This means that we are going to manage different sizes of fonts, that we
are going to manage text and drawings, that we may need to preview all
that on the screen, and the most important thing: that different printers
may have different resolutions, and we have to control all that.
FiveWin automatize all these processes giving you maximum power with minimum
complexity. FiveWin categorizes all printing works in these different
types:
Just call the function Report() and you will get a full paged
report automatically generated from the current workarea!
PAGE
...
oPrn:Say( nRow, nCol, cText, ... )
...
ENDPAGE
ENDPRINT
The PRINT command is building there a TPrinter object. From that moment
on we may manipulate it directly, using all the DATA and METHODs offered
by the TPrinter Class.
PAGE
...
ENDPAGE
And from inside that section you send messages to the Printer object.
The most common message used is <oPrn>:Say() :
Remember that the coordinates where you are printing depend upon the
specific printer resolution you may be using. In order to control this,
you have to ask the printer object about its specific resolution:
Now, you divide those values by the number of rows and cols that you
want to manage, and increase nRow, nCol according to those steps.
See SAMPLES\TestPrn2.prg
To create a font object that adapts its size to the specific resolution
of a printer, we use as always the container clause OF :
PRINT oPrn
...
PAGE
...
ENDPRINT
oFont:End()
We want to thank our friend Ignacio Ortiz de Zu.iga for his excellent
work and contribution to the FiveWin Report engine,
--------------------------------------------------------------------------------
( many thanks also to Roger Seiler for his great help on documenting the
FiveWin Report Engine)
LOCAL oReport
As you can see the basic construction is very simple. Here is the
complete syntax with all the optional bells and whistles:
REPORT [ <oReport> ] ;
[ TITLE <bTitle, ...> [< LEFT | CENTER | CENTERED | RIGHT > ] ];
[ HEADER <bHead, ...> [< LEFT | CENTER | CENTERED | RIGHT > ] ];
[ FOOTER <bFoot, ...> [< LEFT | CENTER | CENTERED | RIGHT > ] ];
[ FONT <oFont, ...> ] ;
[ PEN <oPen, ...> ] ;
[ < lSum:SUMMARY > ] ;
[ < file: FILE | FILENAME | DISK > <cRptFile> ] ;
[ < resource: NAME | RESNAME | RESOURCE > <cResName> ] ;
[ < toPrint: TO PRINTER > ] ;
[ < toScreen: PREVIEW > ] ;
[ TO FILE <toFile> ] ;
[ TO DEVICE <oDevice> ] ;
[ CAPTION <cName> ]
GROUP [ <oRptGrp> ] ;
[ ON <bGroup> ] ;
[ HEADER <bHead> ] ;
[ FOOTER <bFoot> ] ;
[ FONT <uFont> ] ;
[ < lEject:EJECT > ]
COLUMN [ <oRptCol> ] ;
[ TITLE <bTitle, ...> ] ;
[ AT <nCol> ] ;
[ DATA <bData, ...> ] ;
[ SIZE <nSize> ] ;
ENDREPORT
With the command COLUMN (syntax above) you indicate all the
columns that the report will have indicating the data and the
title of each column. This can be very simple. For example:
------------------------
REP02.PRG
IMPLEMENTING TOTALS:
If you want a Total on any column just add the word TOTAL in the
command, for example:
------------------------
REP03.PRG
You can put any header and footer on the report by declaring them
in the REPORT command. For example:
You can even specify how it will be written: left, centered or right,
adding the word LEFT, RIGHT or CENTER|CENTERED. For example:
Remember: by default Titles are centered and Headers and Footers are
written on the left side.
If you want more than one line for a title just put a comma between
each title. For example:
REPORT oReport ;
TITLE "My First Report", "with FiveWin"
The report engine NEVER puts a white line between the header and the
title or between the title and the column titles. It is up to you to
put the blank lines wherever you want them. For example, if you want
to put a blank line between the header and the title, just indicate a
second line on the header with nothing on it -- just an empty chain:
-------------------------
REP05.PRG
USING EXPRESSIONS:
You can put almost anything you want in your reports because you can
use any expression that returns a character string, remember this is
the key to do almost anything you want. For example, if you want to
put the date() on the report plus the current page number, just
do the following:
--------------------------
REP06.PRG
REPORT DESTINATION:
By default, the report is sent to the printer, but you can change it
when you create the report:
When you send the report to the screen (PREVIEW), the report engine
creates all the pages until you push the button Preview, and then
you will immediately see the first page created.
-------------------------------
REP07.PRG
USING FONTS:
You can use any font you want with your reports. This is the way you
use them:
First you have to define them with the command DEFINE FONT oFont ....
When you create the report, you specify the fonts you want to use,
separating each one with a comma.
For example:
The first font in the list (oFont1) will be the standard font, so if
you do not specify a font for a specific column it will use the
standard font (oFont1).
If you want a column to use the second font just do the following:
[ NESCAPEMENT <nEscapement> ] ;
SET FONT ;
[ OF <oWnd> ] ;
[ TO <oFont> ]
CLAUSES
CONFIGURING COLUMNS:
When you create the columns, you can specify a lot of behavior:
If you specify that the column has a total, the DATA should be a
number. But if not, do not worry -- the report engine does not break.
The TOTAL clause can have also a FOR condition. For example:
----------------------------
REP09.PRG
MULTILINE COLUMNS:
This is something you will really love: suppose you need to put
another column but you do not have enough width on the paper to do it?
You could use a smaller font, but this is not the best way. The best
way is to use multi lines for columns. That means that one database
register can use more than one line on the report. So we can do
something like this:
Name Salary
=================== ===========
Test->First Test->Salary
Test ->Last
You can do the same with the column title, like this:
If you put a TOTAL on that column, all the numeric data will be added.
All the data will have the same picture, but I will explain later
how to change this behavior.
--------------------------
REP10.PRG
If you want the totals of the groups to be printed you must totalize
at least one column.
END REPORT
The report will totalize each column that has been created with the
TOTAL clause for every State and will make a page eject when the
State changes.
You can even specify a Header, a Footer and a font to use for that
group (just one line on Headers and Footers):
GROUP ON Test->State ;
FOOTER "Total State:" ;
FONT 2 ;
EJECT
--------------------------
REP11.PRG
SUMMARY REPORTS:
If you specify the clause SUMMARY when you create the report:
When you use the SUMMARY clause the report engine does not put any
group separator line.
---------------------------
REP12.PRG
When you activate the report, it is possible to define FOR and WHILE
conditions. For example:
Because the report engine can make a report even from an array, by
default the WHILE condition is "!Eof()". So if you change the WHILE
condition, you must take care that if you are making a report from a
database it is a good practice to include in the WHILE condition the
text ".and. !Eof()":
You can even control the flow of the report in the same manner as you
do with other windows.
When you activate the report you can indicate functions that will be
called when the report is in a particular state:
The INIT function is called just one time on the first page after the
column titles are printed.
The END function is called just one time on the last page after the
Grand totals are printed.
The ENDPAGE is called on every end of a page, when all the text is
printed (not very useful).
The ENDLINE is called on every end of line of the body report. When
ENDLINE is evaluated all the line has been printed and the current
report line is been incremented.
Report Classes
--------------------------------------------------------------------------------
Class TReport .
Class TrColumn .
Class TrGroup .
Class TrLine .
Report Classes
--------------------------------------------------------------------------------
Class TReport .
Class TReport
-------------------------------------------------------------------------------
DATAs
-------------------------------------------------------------------------------
oDevice The target device where to print
oTitle A TRLine object which contains the report title
oHeader A TRLine object which contains the report header
oFooter A TRLine object which contains the report footer
oRptWnd The related report window
oBrush An optional brush to use at the report
METHODs
-------------------------------------------------------------------------------
New Method constructor: creates a new report. .
AddColumn Add a TRColumn object to the report. .
DelColumn Del a TRColumn object from the report. .
InsColumn Insert a TRColumn object to the report. .
AddGroup Add a new TRGroup object to the report. .
DelGroup Del a TRGroup from the report. .
Stabilize Stabilizes the report before starting printing (activate). .
Skip Skip to next record on the current workarea -or equivalent-. .
Init Evaluate the ::bInit codeblock if defined. .
End Forces the termination of the report. .
StartLine Executes the codeblock defined on the start of a line. .
EndLine Ends printing the current line. .
StartGroup Executes the codeblock defined on the start of a group. .
EndGroup Executes the codeblock defined on the end of a group. .
StartPage Executes the codeblock defined on the start of a page. .
EndPage Executes the codeblock defined on the end of a page. .
NeedNewPage Returns .t. if a new page is needed. -internal used- .
NewLine Start a new line, and executes the startline codeblock. .
BackLine .
ColTitle Prints all report columns titles. .
TotalLine Prints every report columns Separator lines. .
PageTotal Prints all report column page & grand totals. .
Activate Starts executing the report. .
Play .
Margin Modify any of the top, left, bottom & right report margins. .
Say Draws a text .
SayBitmap Draws a bitmap .
Box Draws a box .
Line Draws a line .
Shadow Shadows an area .
KillShadow .
Grid Places a grid on the report .
Inc2Pix Turns inches into pixels .
Class TrColumn .
Class TRColumn
-------------------------------------------------------------------------------
DATA
oReport Its TReport object container.
aData An array with all data codeblocks.
aTitle An array with all titles codeblocks.
aPicture An array with all pictures.
bDataFont A codeblock that returns the font to use for the data.
bTitleFont A codeblock that returns the font to use for the title.
METHODS
New Method constructor: creates a new column.
Stabilize Stabilizes the column. It is called by the report stabilize.
SayTitle Prints its title.
SayData Prints its data.
SayTotal Prints its total.
DATAs
-------------------------------------------------------------------------------
oReport Its TReport object container.
aTotal An array of numeric totals, one for each report column.
bGroup A codeblock which holds the group expression.
bHeader A codeblock that returns the header of the group.
bFooter A codeblock that returns the footer of the group.
bHeadFont A TFont object to use to print the group header.
bFootFont A TFont object to use to print the group footer.
cValue It keeps the latest group evaluated expression.
nCounter
lEject If eject is to be performed on each group change.
METHODs
-------------------------------------------------------------------------------
New Method constructor: creates a new TRGroup object. .
Reset Resets the accumulated total value of all aTotal to 0. .
Header Prints the header of the group. .
Footer Prints the footer of the group. .
Total Prints the totals of the group. .
HeaderHeight Returns the height of the group header. .
FooterHeight Returns the height of the group footer. .
Evaluate Calculates the group expression .
Check Checks if the group condition has changed .
Class TrGroup .
DATAs
-------------------------------------------------------------------------------
oReport Its TReport object container.
METHODs
-------------------------------------------------------------------------------
New Method constructor: creates a new TRLine object. .
Stabilize Stabilizes the line. Called by the report stabilize method. .
Say Prints the line. .
Class TrLine .
This will cause the printout to be reviewed first in screen, giving the
user the ability to preview and interactively select what to print or to
cancel the printout work.
SET TEMP=c:\temp
FiveWin will store temporarily the metafiles files inside that directory,
and will delete them once the preview is finished. All these operations
are managed automatically by FiveWin.
8. Windows advanced
8.1 Managing DLLs - Dynamic Link libraries
--------------------------------------------------------------------------------
What is and how to use a DLL ? .
SAMPLES
--------------------------------------------------------------------------------
DllCall.prg Dynamic linking at runtime sample .
DLL Commands
--------------------------------------------------------------------------------
<FuncName> The name of the DLL function. Remember Clipper only uses
10 characters maximum length.
Length in bytes
<Type>, BYTE, CHAR 1
<return> WORD, BOOL, HANDLE, HWND, HDC 2
LONG, STRING, LPSTR, PTR 4
DOUBLE 8
#include "FiveWin.ch"
function Main()
SndPlaySound( "tada.wav", 0 )
return
#include <WinTen.h>
#include <Windows.h>
#include <MMSystem.h>
#include <ClipApi.h>
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
Now, edit TEST.DEF -which it is an ascii file- and rename the symbols
with 10 characters or less with an underscore:
Then do:
Review our \WinApi directory C -only registered users- source code to see a
lot of examples of doing this.
Dll.ch
#ifndef _DLL_CH
#define _DLL_CH
#define VOID 0
#define BYTE 1
#define CHAR 2
#define WORD 3
#define _INT 4 // conflicts with Clipper Int()
#define BOOL 5
#define HDC 6
#define LONG 7
#define STRING 8
#define LPSTR 9
#define PTR 10
#define _DOUBLE 11 // conflicts with BORDER DOUBLE
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
#endif
//----------------------------------------------------------------------------//
// This sample shows how to make a Dynamic Linking at RunTime!
// Using Borland BWCC.DLL DLLs
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
SndPlaySound( "Ahhhhh.wav", 0 )
return nil
//----------------------------------------------------------------------------//
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
for n = 1 to 10
FreeLibrary( hDll )
next
endif
return
DDEML Classes
--------------------------------------------------------------------------------
TDDEMLServer DDE Server Class .
TDDEMLClient DDE Client Class .
SAMPLES
--------------------------------------------------------------------------------
DDEMLSVR.prg DDEML Server sample .
DDEMLCLI.prg DDEML Client sample .
What is DDE ?
--------------------------------------------------------------------------------
<uAction>
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
Class TDde
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
nService The service on which to establish the connection.
nTopic The topic on which to establish the connection.
nItem The item on which to establish the connection.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
Activate To initiate a conversation with server applications
responding to the specified application and topic names.
Execute To send a string to the server to be processed as a
series of commands.
End Ends the DDE connection
DATAs
--------------------------------------------------------------------------------
hInst A handle of the DDEML instance session
hConv A handle of the DDEML conversation
cService The name of the service
hService The handle of the service
lConnecting If the server is in the process of connecting with a Client
hSz2 Some processes require to hold a hSZ2 handle stored here
aClients An array with all the attended Clients
bOnConnect The action to perform when connecting to a client
bOnRequest The action to perform on a client request
bOnDisconnect The action to perform when a client disconnects
bOnExecute The action to perform on a Client Execute command
METHODs
--------------------------------------------------------------------------------
New Constructor METHOD
Connect Automatically called when a Client wants to connect
ConnectConfirm Automatically called when a Client has finally connected
Disconnect Automatically called when a Client has disconnected
Execute Automatically called when a Client has sent a command
Request Automatically called when a Client has done a request
Return Use this method to return data to a Client Request
DATAs
--------------------------------------------------------------------------------
hInst A handle of the DDEML instance session
hConv A handle of the DDEML conversation
cService The name of the service
hService The handle of the service
cTopic The name of the topic to keep the conversation about
hTopic The handle of the topic
nTimeOut The timeout to wait for an answer. Default 1000. Use -1 for
ASync.
METHODs
--------------------------------------------------------------------------------
New Constructor METHOD
Connect To connect to a Server
Disconnect To disconnect from the Server
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
USE c:\FiveWin.19\samples\Customer
return nil
//----------------------------------------------------------------------------//
function InitServer()
if oServer == nil
oServer = TDDEMLServer():New()
oServer:bOnExecute = { | cCommand | ;
MsgInfo( "Command: " + cCommand,;
"Server: Command Received" ) }
endif
return nil
//----------------------------------------------------------------------------//
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
return nil
//----------------------------------------------------------------------------//
function InitClient()
if oClient == nil
oClient = TDDEMLClient():New()
endif
return nil
//----------------------------------------------------------------------------//
function RequestData()
for n = 1 to 20
oWnd:Say( n, 2, oClient:Request( "CUSTOMER->Last" ) )
oClient:Request( "CUSTOMER->( DbSkip() )" )
next
SysRefresh()
return nil
//----------------------------------------------------------------------------//
8.1 Managing MAPI - Mail Services
--------------------------------------------------------------------------------
What is MAPI ? .
SAMPLES
--------------------------------------------------------------------------------
TestMail.prg Sending and receiving mail .
What is MAPI ?
--------------------------------------------------------------------------------
#include "FiveWin.ch"
#include "Mail.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oBar
return nil
//----------------------------------------------------------------------------//
function InteractiveMessage()
local oMail
MsgInfo( oMail:nRetCode )
return nil
//----------------------------------------------------------------------------//
function DirectMessage()
local oMail
MsgInfo( oMail:nRetCode )
return nil
Working samples
--------------------------------------------------------------------------------
TestOdbc.prg A sample showing how to manage a DataBase using ODBC .
Bibliography
--------------------------------------------------------------------------------
Microsoft documentation .
What is ODBC ?
--------------------------------------------------------------------------------
The ODBC driver has to follow the ODBC.DLL rules, so we don't have to
worry about it as we know that it will always be used in the same
way. ODBC lets Windows applications use any kind of DataBases in the
same way!
Right now we offer a powerful ODBC class to easily manage ODBC. When our
ODBC RDD is ready, then we will manage FiveWin ODBC objects through the
Clipper RDD driver.
Though ODBC is a very nice concept and, of course, some ODBC drivers work
quite well, we believe from our experience and conversations with FiveWin
users that ODBC it is not at all as easy and fast as CA-Clipper standard
DataBase management power (especially if you use the SixDriver or Comix!).
We recommend that you keep using your CA-Clipper DBFs designs and your
existing routines and applications.
There are some circumstances where using ODBC may be extremely useful.
We think FiveWin ODBC capabilities are really useful by offering
downsizing to companies. Imagine a company which uses DataBases that
can be accessed through ODBC. You can take your CA-Clipper and
FiveWin and convert those DataBases into standard CA-Clipper DBFs and
indexes (managed with your RDDs). This is a good opportunity for you to
gain business. Many companies are willing to downsize to PC platforms.
CA-Clipper and FiveWin-ODBC may be the key!
Of course you may use ODBC if you want to or if you need to. In these
circumstances remember not all ODBC drivers are as powerful as
Clipper, and you will discover, possibly a big surprise, that sometimes
your 'normal' Clipper processes can not be performed in ODBC!
We have not covered all the possibilities and situations in FiveWin ODBC
that you may face when trying to manage ODBC drivers. However we have offered
an open architecture which you may use and extend to suit your particular
needs.
What is SQL ?
--------------------------------------------------------------------------------
Microsoft Windows has chosen SQL as the standard method to manage ODBC
drivers. SQL is the programming system to manage ODBC architecture.
The core level is the most basic and standard system. All ODBC drivers
accept most of SQL core level rules. Level1 and Level2 offer more
powerful capabilities. The first thing you need to identify when using
an ODBC driver is exactly at which level it operates. ODBC driver
manufacturers may provide an extensive documentation and samples.
SQL functions are managed in the same way as we manage Clipper functions.
They are just functions.
Sample:
ODBC drivers and Windows MUST be properly configured at the USER level
to function correctly. You can not develop an ODBC application that
will work unless everybody has ODBC properly installed in their computers.
ODBC is not 'self-contained' like the CA-Clipper DBFs management
(where you can generate your DBFs and indexes on the fly!).
<cUser> The name of the user who is going to manage the DataBase.
CLAUSES
<cUser> The name of the user who is going to manage the DataBase.
CLAUSES
DATAs
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
End Ends control and make it disappear
Cancel Cancels the current in process SQL statement
Execute Execute an SQL statement
GetCurName Gets the current assigned cursor name
GetOptions
InitFields Loads all DataBase fields descriptions into ::aFields
LastCommand Last executed command
LastError Retrieves the last error
FieldGet Retrieves the contents of a field
FieldGetBlob Retrieves the contents of a BLOB field into a disk file
FieldName Retrieves the name of a field
FieldType Retrieves the type of a field
FieldLen Retrieves the len of a field
FieldDec Retrieves the number of decimals of a field
ParamData
Prepare Prepares a SQL command so next time won't be parsed again
PutData Changes the current cursor pointed table values
RowCount Retrieves the number of fields of the DataBase
SetCurName Sets a name for the cursor in use
SetOptions Set several SQL options
SetParam Sets a param description for next SQL statement
Skip Skip to the next record
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------
//
function Main()
local oBrush
// SET 3DLOOK ON
//----------------------------------------------------------------------------
//
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "Use &ODBC" ACTION TestOdbc()
ENDMENU
return oMenu
//----------------------------------------------------------------------------
//
function TestOdbc()
cName = oDbc:FieldGet( 1 )
oDbc:End()
return nil
//----------------------------------------------------------------------------
//
8.6 Event-Driven programming
--------------------------------------------------------------------------------
What are event-driven applications ? .
How may I control events ? .
Do I need to care about events ? .
TWBrowse Class
bSkip Like Clipper TBrowse:skipBlock. We provide a default fast
DataBase skipper.
bGoTop Like Clipper TBrowse:goTopBlock. We provide a default
DataBase bGoTop.
bGoBottom Like Clipper TBrowse:goBottomBlock. We provide a default
DataBase bGoBottom.
bChange CodeBlock to perform when moving from row to row
TReport Class
bInit A codeblock which holds the ON INIT clause.
bEnd A codeblock which holds the ON END clause.
bStartLine A codeblock which holds the ON NEWLINE clause.
bEndLine A codeblock which holds the ON ENDLINE clause.
bStartPage A codeblock which holds the ON NEWPAGE clause.
bEndPage A codeblock which holds the ON ENDPAGE clause.
bStartGroup A codeblock which holds the ON NEWGROUP clause.
bEndGroup A codeblock which holds the ON ENDGROUP clause.
bSkip A codeblock which holds how to skip to the next report line.
bChange A codeblock which holds the ON CHANGE clause
static one
static two
static three
where
This does not have sense with few statics, but it do has sense
when you are managing a large amount of statics (I know of
customers that use over 1000 statics). FW 192 has a new function
that counts the number of statics variables your app has.
This is a sample:
// Correct way:
static far char Alert[] = "Alert";
CLIPPER nMsgBox()
{
_MsgBox( Alert, 0 );
}
// wrong way:
CLIPPER nMsgBox()
{
_MsgBox( "Alert", 0 );
}
//wrong way
static byte Buffer[200];
//right way
static far byte Buffer[200];
The less initial DGroup your app consumes (FW 192 reports you
this initial size), and the less Clipper static variables you
manage, the larger Clipper stack you may have:
<----------------------------- 64 Ks -------------------------------->
DATA,_BSS (SYMP) | STACK_C | HEAP_C | CLIPPER STACK | CLIPPER STATICS
<----------- initial DG size ------->
From FiveWin 1.9.2 we are allocating dynamic heap when building GETs and
MultiGets from source code ( @ ..., ... GET ... ), so we have been able
to successfully reduce the LNK (or DEF) file HeapSize value down to
1024 bytes and the applications are working successfully. This was not
possible before as Gets and MultiGets used that area for internal working.
Doing this HeapSize reduction you will get an extra 7,5 Ks for your
Clipper stack!
xBase commands are the highest level of abstraction, that is, it is the
level at which you don't care about how things work and you only care about
functionality, that is "to make it work".
xBase commands originally came from dBase, and they have been evolving
towards a standard named "xBase". These commands are built over Objects.
These Objects, and their classes are the second level of abstraction.
To use Classes and Objects it is necessary that you have some OOPS
skills. FiveWin uses our library Objects to use the OOPS capability
of CA-Clipper. You can contact us to get the latest commercial release
of Objects, at a very low price, which includes all the documentation,
examples and source code so you will be able to utilize the incredible
world of OOPS technology.
Objects are also based on functions (methods) and data. This is the next
level of abstraction. You may realize as we progress through this document
that the complexity grows and there are more details to understand.
Finally most of the functions we use are based on the Windows API.
In spite of the low popularity achieved by dBase IV, that version did a big
advance to consolidate the commands for creating and managing Objects
although it did not offer OOPS.
Note that if we use that command for create any Object, in some way
we are using a generic building 'message'. This is why we recommend
implementing that syntax for creating new Objects.
DEFINE WINDOW oWnd ==> Get transformed in ==> oWnd := TWindow():New( ... )
The use of these commands let us use a unique and common syntax for all
the Objects. You may think that this is one of the targets of OOPS:
We must concentrate in our goal and not in a particular implementation,
that means, we should use a unique interface.
In FiveWin we have implemented for the first time a mixed system for
developing Object Oriented environments. The system we have developed lets
you use the power of OOPS and also the extensibility offered by 'pointers',
in Clipper named 'CodeBlocks'.
When we do:
We are modifying the behavior for that window when it receives the
PAINT event. This system is based on CodeBlocks. It is logical because
that behavior will not be reused in the future.
We are convinced that a good OOPS architecture should use this two
building models. As you get more OOPS experience you will understand
our point of view.
OOPS is marvelous, but still there are some aspects that should evolve.
The construction of this mixed model may be a good way for discovering
new possibilities.
What is an Object
--------------------------------------------------------------------------------
From the moment a human is born, they start recognizing and classifying the
world around. Our brain has the automatic mechanisms to organize our world
into Classes.
* four legs
* a certain color
* some dimensions
* some weight
* a surface to sit on
* etc...
* Can be built
* Can be moved from one place to another
* Supports someone if he/she sits on it
* Can be destroyed
* etc...
In these behaviors we see what the chair DOES and what can
be DONE TO the chair:
Now lets see how we take those concepts into programming languages:
What is a Window ?
A Window DOES:
* Resize
* Iconize
* Change its position
* etc...
Send it a Message!
oWindow:Message( params,... )
What is a Class
--------------------------------------------------------------------------------
A Class is a group of rules which controls how the Object gets created
and what the behaviors of those Objects are.
I have a chair. I can touch it. I can use it. The chair exists!
CLASS TWindow
That is the header declaration. We can see the Data that a Window
Object will have: nTop, nLeft, nBottom, nRight
TWindow():New( 3, 3, 20, 40 )
That Data can have different values from one Object to another, but it will
always be the same kind of Data.
* Encapsulation
* Polimorphism
* Inheritance
Suppose we have a ball and a glass. Then I take a hammer and I hit them:
Object Ball --> start jumping from one place into another.
oReport:Print()
oLabel:Print()
We may create new Classes from the ones we already have! We say we 'inherit'
new Classes from the previous ones.
In Clipper we do:
...
ENDCLASS
You may read in many places that Windows is Object Oriented. This is not
true. In order to be Object Oriented is should offer the three main rules
of an Object Oriented environment: Encapsulation, Polymorphism and
Inheritance.
Windows should be Object Oriented and this would greatly help programmers
to write Windows applications. This is why Borland, Microsoft, CA and other
manufacturers have developed C++ classes libraries to convert Windows into
a true Object Oriented environment.
The problem with this latest approach is that there is still no standard.
If you review Microsoft, Borland and CA Class hierarchies you will find
many differences. These hierarchies are extremely large and most of
the time all of their features are not required in standard Windows
business applications.
If you review the examples provided in the Petzold book, you will realize
all Windows applications have the same structure:
long WINAPI WndProc( HWND hWnd, WORD wMessage, WORD wParam, LONG lParam )
That is the function Windows API uses to sends messages to our defined
window. Let's review those parameters:
case WM_COMMAND:
...
return ...;
...
default:
return DefWindowProc( hWnd, wMsg, wParam, lParam );
}
Our window tells Windows API what to do according to the different values
the window function returns. Typically there are these possibilities:
This process is the main conversation system between Windows API and
our defined windows. In this process we have to connect to the Clipper
Object Oriented kernel in order to convert it into an Object Oriented
process.
Based on the fact that FiveWin integrates its own Object Oriented Engine,
it gives you the freedom to create all the new classes you may need so you
have the real capability to create truly OOP based applications.
The main advantadge of coding using OOP is that our applications increase very
much in modularity, so they are better structured and you will be able to code
much more keeping a much better and simpler organization.
How can you properly code in OOP ? The key for it is to be able to recognize
'objects' in your code. And only through practise you will be able to
easily recognize those objects. Once you start recognizing those objects,
your code will be turning more and more OOP.
How can you recognize an Object ? Look at the variables you are using.
If some variables are clearly related to different aspects of the 'same',
there is a high probability that there is an object there:
Now, you realize they all belong to a customer, so you create a new
TCustomer Class:
CLASS TCustomer
...
ENDCLASS
oCustomer:cLastName = ...
oCustomer:cAddress = ...
oCustomer:nAge = ...
Now, you will be able to recognize several actions that are performed
on TCustomers objects. Those different actions may become METHODs:
CLASS TCustomer
ENDCLASS
#include "FiveWin.ch"
#include "Install.ch"
//----------------------------------------------------------------------------//
function Main()
SET 3DLOOK ON
DeleteObject( hBmpText1 )
DeleteObject( hBmpText2 )
return nil
//----------------------------------------------------------------------------//
function DlgInstall()
local oDlg
local lLib := .t., lSamples := .t., lInclude := .t., lManual := .t.,;
lUtil := .t., lSource := .t., lGroup := .t.
local nTotal := 2760000
local oRequired
oWnd:End()
return nil
//----------------------------------------------------------------------------//
function SayBitmaps()
oWnd:ReleaseDC()
return nil
//----------------------------------------------------------------------------//
function FillBlue()
oWnd:GetDC()
aRect[ 3 ] = 0
for n = 1 to nSteps
aRect[ 3 ] += 3
aRect[ 1 ] += 3
nBlue -= 1
next
oWnd:ReleaseDC()
return nil
//----------------------------------------------------------------------------//
if ! File( cTarget )
lMkDir( cTarget )
lMkDir( cTarget + "\Examples" )
lMkDir( cTarget + "\Icons" )
lMkDir( cTarget + "\IDE" )
lMkDir( cTarget + "\lib" )
lMkDir( cTarget + "\Manual" )
lMkDir( cTarget + "\Source" )
endif
if lLib
nPercent = 10 ; oMeter:Refresh() ; SysRefresh()
LZCopyFile( "d:FiveWin.li_", cTarget + "\lib\FiveWin.lib" )
nPercent = 20 ; oMeter:Refresh() ; SysRefresh()
LZCopyFile( "d:WinApi.li_", cTarget + "\lib\WinApi.lib" )
nPercent = 30 ; oMeter:Refresh() ; SysRefresh()
LZCopyFile( "d:501_520.li_", cTarget + "\lib\501_520.lib" )
nPercent = 40 ; oMeter:Refresh() ; SysRefresh()
endif
if lManual
LZCopyFile( "d:readme.tx_", cTarget + "\Readme.txt" )
nPercent = 42 ; oMeter:Refresh() ; SysRefresh()
LZCopyFile( "d:Fw16.hl_", cTarget + "\manual\Fw16.hlp" )
nPercent = 52 ; oMeter:Refresh() ; SysRefresh()
endif
return nil
//----------------------------------------------------------------------------//
function BuildGroup()
local oDde
return nil
//----------------------------------------------------------------------------//
FiveWin powerfull Class TSocket implementation lets you build robust and
powerfull IntraNet/InterNet databased applications.
FiveWin Class TSocket offers an easy and object oriented WinSock.dll TCP/IP
management. Review SAMPLES\\TestSock.prg to see the foundation of a WEB
self contained DataBased WEB pages server.
Classes
--------------------------------------------------------------------------------
Class TSocket InterNet TCP/IP object oriented implementation .
Class TWebServer WEB pages and Proxy server with dynamic HTML support .
Class TInternet Microsoft WinINet.dll object oriented management .
Class TFTP WinINet.dll FTP object oriented management .
Class TFTPFile WinINet.dll FTP files object oriented management .
Samples
--------------------------------------------------------------------------------
SAMPLES\\SockCli Sockets client client/server sample
SAMPLES\\SockServ Sockets server client/server sample
SAMPLES\\FiveGen A databased-dictionary application with automatic WEB
mgement
SAMPLES\\GALLERY\ICopyFiles FTP sending and receiving files sample
--------------------------------------------------------------------------------
Class TSocket InterNet TCP/IP sockets support
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
nPort socket port number
cIPAddr socket IP address
nTimeOut connection timeout value
nBackLog listen backlog value
nSocket socket handle
hFile handle of a file transmited in chunks
bAccept codeblock to evaluate on accept event.
bRead codeblock to evaluate on read event.
bWrite codeblock to evaluate on write event.
bClose codeblock to evaluate on close event.
bConnect codeblock to evaluate on connect event.
METHODS
--------------------------------------------------------------------------------
New( nPort ) Constructor. nPort = port to use for the socket.
Accept( nSocket ) Constructor. Builds a new socket to accept a incomming
connection
End() Generic destructor.
HandleEvent() manages asyncronous connections events.
GetData() Retrieves incomming data.
SendBin() sends binary data.
SendChunk() sends chunks of a file (::hFile ).
SendData() sends data.
Listen() Sets the socket in listening state.
Close() Closes the socket.
Connect( cIPAddr ) Connects to a specified IP address.
Refresh() Determines the status of the socket.
OnAccept() Accept incomming event method.
OnRead() Read incomming event method.
OnWrite() Write incomming event method.
OnClose() Close event action.
OnConnect() On connect event method.
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
nPort socket port number
cIPAddress socket IP address
nTimeOut connection timeout value
nBackLog listen backlog value
nSocket socket handle
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
ReDefine Constructor for resources.
cGetPRG Generates the source code of the button.
New( nPort ) Constructor. nPort specifies the port to use
Accept Constructor. Creates a clone from the listening host socket
End Closes the connection
GetText Retrives the data that arrives to the socket
SenData Sends data throught the socket
Listen Turns the socket into a listening host socket
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
hWinINet handle to opened WinINet.dll
hSession handle of current session
aFTPs Array of all TFTP objects in use
METHODS
--------------------------------------------------------------------------------
New Constructor
End Generic destructor
FTP( cFTPSite ) Generates a new TFTP object and connects to it
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
oInternet TInternet container object
cSite URL address
hFTP handle of the FTP connection
cUserName user name to login
cPassword password to login
METHODS
--------------------------------------------------------------------------------
New( cFTPSite, oInternet ) Constructor. cFTPSite = URL to connect to.
oInternet = previous created TInternet object
End() generic destructor
DeleteFile( cFileName ) deletes a remote FTP file
Directory( cMask ) as Clipper Directory() but on a FTP site!
DATA
--------------------------------------------------------------------------------
oFTP TFTP container object
cFileName name of the file
hFile Internet handle of the file
lBinary binary management vs. ascii management
METHODs
--------------------------------------------------------------------------------
New( cFileName, oFTP ) Constructor. cFileName = name of the file to manage.
oFTP = a previous built TFTP object.
End() generic destructor
OpenRead() opens the file for reading
OpenWrite() opens the file for writting
Write( cData ) write data to the file
Read( nBytes ) read n bytes from the file
Seek( nBytes, nFrom ) skips + / - bytes file pointer
--------------------------------------------------------------------------------
FiveWin Internet software layers
--------------------------------------------------------------------------------
FiveWin Classes
TInternet, TFTP, TFTPFile | FiveWin Class TWebServer
-----------------------------------------------------
Microsoft WinINet.dll | FiveWin Class TSocket
-----------------------------------------------------
Berkeley University WinSock.dll
-----------------------------------------------------
Hardware
-----------------------------------------------------
The bottom software layer is WinSock.dll, a DLL that comes with Microsoft
that originally was developed by Berkeley University (the famous sockets!).
FiveWin implements a direct connection to this DLL (WINAPI\WinSock.c), so
you may directly use all its functions.
On top this DLL Microsoft builds the 32 bits WinINet.dll, a high level
Internet layer wich is very usefull to manage FTP services. FiveWin is
managing this 32 bits DLL thanks to our own 16-32 bits automatic thunk
system, used everytime you manage FiveWin DLL32 commands (DLL.CH). In
fact all the WinINet.dll support has been built using FiveWin high level
DLL32 commands (SOURCE\WINAPI\WinINet.prg).
The real power of this design is based on the FiveWin dynamic HTML own
foundation. Before an object TWebServer sends WEB pages on the Internet,
FiveWin mixes standard HTML codes with your own Clipper code requires.
Simply place any Clipper expression between << >> and those expressions
will be expanded in your HTML files. This means live access to your
databases and remote management of your application. Microsoft is trying
to implement now a solid dynamic HTML standard. You already have all
this power.
--------------------------------------------------------------------------------
#include "FiveWin.ch"
function Main()
return nil
--------------------------------------------------------------------------------
FiveWin dynamic HTML own implementation
--------------------------------------------------------------------------------
To get the best results from FiveWin Class TWebServer and dynamic
HTML generation a mixure of JavaScript (or VBScript), standard HTML
and Clipper code is required.
Get yourself familiar with HTML code. HTML is such an easy language
that you will be surprised how fast you may get it. basically there
are two main operations you will be dealing with: GET and POST.
<filename.html>?<parameters>
* When the user has completed some controls requested info and has
submited it to you, FiveWin declares a 'Query' variable that holds
the original user query values.
You will become familiar to these concepts once you start managing them
just a little. You will be surprised how far you can get using your
loved Clipper and developing Internet applications using FiveWin.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Comandos
1. xBase Commands
1.1 xBase commands alphabetically ordered .
1.2 xBase common elements .
1.3 FiveWin Header files .
3. Functions
3.1 Alphabetically ordered A-G .
3.2 Alphabetically ordered H-Z .
3.3 By cathegory .
Appendix I: Bibliography
xBase commands .
--------------------------------------------------------------------------------
Bar Commands
--------------------------------------------------------------------------------
CLAUSES
Example: SAMPLES\TestBar.prg
Bitmap Commands
--------------------------------------------------------------------------------
<cResName> The name of the bitmap resource bitmap when loading a bitmap
from a .RC, .RES or a .DLL file .
<cBmpFile> The name of the BMP file when loading a bitmap directly
from a BMP file.
<uValid>
SCROLL Enable the use of scrollbars to scroll the bitmap into its
visible area. This let the user review bitmaps larger than
the control.
DESIGN Allows the user to move and resize with the mouse
Browse Commands
--------------------------------------------------------------------------------
<uAction,...>
CLAUSES
DESIGN Allows the user to move and resize with the mouse
Brush Commands
--------------------------------------------------------------------------------
DIFFERENT STYLES:
PushButton Commands
--------------------------------------------------------------------------------
<nRow>, <nCol> The coordinates of the Button. They mimic text mode
coordinates.
CLAUSES
DESIGN Allows the user to move and resize with the mouse
CANCEL
CheckBox Commands
--------------------------------------------------------------------------------
<nRow>, <nCol> The coordinates of the CheckBox. They mimic text mode
coordinates.
CLAUSES
DESIGN Allows the user to move and resize with the mouse
<uAction>
<cTitle> The title of the DialogBox. You may also change the
title of a resource DialogBox. This means that you
may use the same DialogBox for different purposes by
just changing its title.
Value Description
CLAUSES
VBX You may specify this when using a VBX control in the
DialogBox.
DLL Commands
--------------------------------------------------------------------------------
<FuncName> The name of the DLL function. Remember Clipper only uses
10 characters maximum length.
Length in bytes
<Type>, BYTE, CHAR 1
<return> WORD, BOOL, HANDLE, HWND, HDC 2
LONG, STRING, LPSTR, PTR 4
DOUBLE 8
#include "FiveWin.ch"
function Main()
SndPlaySound( "tada.wav", 0 )
return
#include <WinTen.h>
#include <Windows.h>
#include <MMSystem.h>
#include <ClipApi.h>
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
Now, edit TEST.DEF -which it is an ascii file- and rename the symbols
with 10 characters or less with an underscore:
Then do:
Review our \WinApi directory C -only registered users- source code to see a
lot of examples of doing this.
CLAUSES
Font Commands
--------------------------------------------------------------------------------
SET FONT ;
[ OF <oWnd> ] ;
[ TO <oFont> ]
CLAUSES
GET Commands
--------------------------------------------------------------------------------
Creating a GET from @ <nRow>, <nCol> GET [ <oGet> VAR ] <uVar> ;
source code [ OF | WINDOW | DIALOG <oWnd> ] ;
[ PICTURE <cPict> ] ;
[ VALID <ValidFunc> ] ;
[ WHEN <WhenFunc> ] ;
[ COLOR | COLORS <nClrFore>;
[,<nClrBack>] ] ;
[ SIZE <nWidth>, <nHeight> ];
[ FONT <oFont> ] ;
[ HSCROLL ] ;
[ CURSOR <oCursor> ] ;
[ PIXEL ] ;
[ MESSAGE <cMsg> ] ;
[ UPDATE ] ;
[ WHEN <WhenFunc> ] ;
[ CENTER | CENTERED> ] ;
[ RIGHT ] ;
[ READONLY | NO MODIFY ] ;
[ DESIGN ] ;
[ ON CHANGE <uChange> ] ;
[ PASSWORD ] ;
CLAUSES
DESIGN Allows the user to move and resize with the mouse
SET HELP TO <cHLPFile> Sets the default HELP file of the application
--------------------------------------------------------------------------------
Icons Commands
<cResName> Is the name of the icon resource if we are loading the icon
from a RC, RES or a DLL.
<cIcoFile> Is the name of a ICO file if we are loading the ICO directly
from disk.
<uClick> Is the action to be performed when the mouse clicks over the
icon.
<cResName> Is the name of the icon resource if we are loading the icon
from a RC, RES or a DLL.
<cIcoFile> Is the name of a ICO file if we are loading the ICO directly
from disk.
CLAUSES
INI Commands
--------------------------------------------------------------------------------
GET <uVar> ;
[ SECTION <cSection> ] ;
[ ENTRY <cEntry> ] ;
[ DEFAULT <uDefault> ] ;
[ OF | INI <oIni> ]
SET ;
[ SECTION <cSection> ] ;
[ ENTRY <cEntry> ] ;
[ TO <uVal> ] ;
[ OF | INI <oIni> ]
ENDINI
<uVar> A variable with the value loaded from the INI file.
This value gets automatically converted to the type
of the variable. So it is important to properly
initialize the variable before loading its value.
DATA
--------------------------------------------------------------------------------
cIniFile INI physical filename
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
Get Retrieves data from the INI file.
Set Writes data into the INI file.
DelEntry Deletes an INI section entry.
DelSection Deletes an entire INI section.
<nRow>, <nCol> The coordinates of the ListBox. They mimic text mode
coordinates.
<oFont> An optional font object to use when painting the ListBox items.
<acBitmaps>
<uBmpSelect>
CLAUSES
DESIGN To let the user move around the control with the mouse.
MULTI |
MULTIPLE | Alows Multiple selection.
MULTISEL
SORT
See Window creating commands, as all the items are the same except:
Constant Purpose
CLAUSES
You must specify the clause MDICHILD to have all the possibilities Windows
MDI offers.
What is MDI ?
Basically MDI environment is a main Window which has several child Windows
inside which can be resized, tiled, cascaded, maximized, created and destroyed
very easily. In fact, a MDI environment is like a whole Window environment
all by itself.
These features, which may seem very common to you, won't work if you
try to get create them using standard Windows. Well, you could do it, but it
would mean a lot of code to be written.
Why MDI ?
Windows keeps an 'invisible' Window which extends the entire the client area
of the 'frame' Window:
+---------------------------------------+
MDI Frame --------->|+-------------------------------------+|
(is the external || +---------------+ ||
and main Window) || | | ||
|| | <-------------- Child Windows
|| | | || | (In fact they
MDI Client ----------------> | +----------------+ || | are children of
(you don't realize || +-----| | || the MDI client
it is there and || | <--------------| Window)
extends the entire || | | ||
internal area of |+-------------------------------------+|
the MDI frame) +---------------------------------------+
The real 'trick' of the MDI programming is the MDI Client Window which Windows
has implemented.
To create the main MDI frame Window we use the standard FiveWin Windows
creation commands. The only difference is that you must specify the
MDI clause. See above.
Now, you start creating the child Windows with the same easy commands.
You don't have to worry about the 'ghost' MDI Client Window.
All that you already know about FiveWin is still the same! You only have
to remember a few items:
A MDI Frame Window Object has 'DATA' named oWndClient, which is another
Windows Object -the 'ghost' MDI Client!-.
In fact, the surface you see inside the MDI frame is the MDI Client!!!
Don't forget that. So, if -for example- you plan to place a bitmap on
the surface of the MDI frame Window, you really have to place it on the
MDI Client. So do this:
if you forget that, and you just do OF oWnd, you will be placing the bitmap
_behind_ the MDI Client, so you will not see the bitmap!!! Remember that!
That is the omly 'trick' about MDI programming.
If you go deeper in FiveWin architecture, you will discover there are some
very powerful Classes supporting all the Windows MDI implementation.
We have developed three main Classes which inherit from base Window Class:
Class TWindow
|
|-- Class TMdiFrame
|-- Class TMdiClient
+-- Class TMdiChild
All of them implement new methods to encapsulate all the power Windows
offers to MDI programming.
Remember this:
oWndClient has a Clipper array with all the Child Windows you create.
The name of that data is aWnd. It is a normal Clipper array. You may use
as you wish.
Most of the MDI Child Windows you will use will be very similar to each other
-once again we stress about business applications development not just
'fancy' programming-. They will have a ButtonBar attached and a main control
which automatically resizes to extend the whole visible area of the
Child Window.
So, we are giving you a really powerful way of developing MDI environments
which is quick and clean:
* Next you start creating -when you need them- the child Windows:
Using the above syntax:
* Now you create a ButtonBar for this Child Window. Use the standard
syntax:
Attach the buttons in a normal way. Every button will have the actions
you define:
...
* The last step is to create a Control -whatever Class of control you need-
and attach it to the Child Window:
And now, we tell the MDI Child to use that control as its main Control:
<oWndChild>:SetControl( <oControl> )
To start using it, you ACTIVATE the Window in the normal way:
Doing it this way you will be mastering MDI programming in a few minutes
without the need to create new Classes or learning very difficult MDI
programming rules.
Let CA-Clipper and FiveWin do the hard work for you. This is the power
of OOPS and xBase!
See the new version of \IDE\IDE.prg for a real full example on MDI
Menus Commands
--------------------------------------------------------------------------------
SEPARATOR [<oMenuItem>]
MENUITEM...
MRU <oMru> ;
[ INI | ININAME | FILENAME | NAME | DISK
<cIniFile> ] ;
[ SECTION <cSection> ] ;
[ SIZE | ITEMS <nItems> ] ;
[ MESSAGE <cMsg> ] ;
[ ACTION <uAction> ]
ENDMENU
<cIniFile> The name of the related INI file to use with a MRU object.
<cSection> The section inside the INI file where to store the MRU items.
CLAUSES
Meter Commands
--------------------------------------------------------------------------------
DESIGN Allows the user to move and resize with the mouse
<uAction>
CLAUSES
<cUser> The name of the user who is going to manage the DataBase.
CLAUSES
Creating a folder
from source code
Pen Control
--------------------------------------------------------------------------------
Printing Commands
--------------------------------------------------------------------------------
PAGE
ENDPAGE
ENDPRINT
See SAMPLES\TestPrn2.prg
PRINT oPrn
DEFINE FONT oFont NAME "Arial" SIZE 0, -8 OF oPrn
PAGE
...
ENDPAGE
ENDPRINT
oFont:End()
CLAUSES
PREVIEW Invokes the FiveWin preview system, which lets the user
interactively preview the printout before sending it to
the printer.
PushButton Commands
--------------------------------------------------------------------------------
<nRow>, <nCol> The coordinates of the Button. They mimic text mode
coordinates.
CLAUSES
DESIGN Allows the user to move and resize with the mouse
CANCEL
RadioButtons Commands
CLAUSES
3D 3D look.
DESIGN Allows the user to move and resize with the mouse.
REPORT [ <oReport> ] ;
[ TITLE <bTitle, ...> [< LEFT | CENTER | CENTERED | RIGHT > ] ];
[ HEADER <bHead, ...> [< LEFT | CENTER | CENTERED | RIGHT > ] ];
[ FOOTER <bFoot, ...> [< LEFT | CENTER | CENTERED | RIGHT > ] ];
[ FONT <oFont, ...> ] ;
[ PEN <oPen, ...> ] ;
[ < SUMMARY > ] ;
[ < FILE | FILENAME | DISK > <cRptFile> ] ;
[ < NAME | RESNAME | RESOURCE > <cResName> ] ;
[ < TO PRINTER > ] ;
[ < PREVIEW > ] ;
[ TO FILE <toFile> ] ;
[ TO DEVICE <oDevice> ] ;
[ CAPTION <cName> ]
GROUP [ <oRptGrp> ] ;
[ ON <bGroup> ] ;
[ HEADER <bHead> ] ;
[ FOOTER <bFoot> ] ;
[ FONT <uFont> ] ;
[ < EJECT > ]
COLUMN [ <oRptCol> ] ;
[ TITLE <bTitle, ...> ] ;
[ AT <nCol> ] ;
[ DATA <bData, ...> ] ;
[ SIZE <nSize> ] ;
[ PICTURE <cPicture, ...> ] ;
[ FONT <uFont> ] ;
[ < TOTAL > [ FOR <bTotalExpr> ] ] ;
[ < LEFT | CENTER | CENTERED | RIGHT > ] ;
[ < SHADOW > ] ;
[ < GRID > [ <nPen> ] ]
Using Resources
--------------------------------------------------------------------------------
After linking your EXE, provide an RC file with all the resource
definitions for your application. The SAMPLES\Build.bat we provide
automatically calls RC.EXE if a RC is defined with the same name as
the .prg you are building with build.bat. Applications requiring
multiple .prgs, must have their own .rmk file or batch file to build
them. Use the above mentioned RC.EXE syntax to embed your resources
into your final .exe
SAY commands
--------------------------------------------------------------------------------
<cColor> The COLOR string for the SAY. Not available yet!
<oFont> The Object font to be used with the SAY. The Font must
be created previously using DEFINE FONT... .
CLAUSES
DESIGN Allows the user to move and resize with the mouse
SHADED
SHADOW
RAISED
CLAUSES
DESIGN Allows the user to move and resize with the mouse
CLAUSES
Timers Commands
--------------------------------------------------------------------------------
...
[ TREE <oSubTree> ]
[ TREEITEM ... ]
[ ... ]
[ ENDTREE ]
ENDTREE
Video Commands
--------------------------------------------------------------------------------
Window Commands
--------------------------------------------------------------------------------
<oMenu> An already created Menu Object. Use MENU ... ENDMENU inside
a function as in examples. This parameter is optional.
We have paid particular attention into the syntax of FiveWin such as using
the same clause to do the same thing in similar circumstances. This means
that as soon as you learn these few rules, you may control a lot of
different FiveWin features.
We will keep extending this basic concept to manage all the different parts
of the Windows API. Having just a unique xBase interface to manage the
Windows API will let you concentrate in the goal of your application and
not in the details.
<Object>:End()
oWnd:End()
To create a cursor:
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
NewAt Constructor from source code at a certain location.
Add Add a BtnBmp to the bar.
AddGroup Adds a new logical group to the bar.
Adjust Adjust the Button bar to the dimensions of its container
window.
AdjMode Changes the BtnBar position to floating
DATA
--------------------------------------------------------------------------------
nX Relative origin coordinates of the picture.
nY Relative origin coordinates of the picture.
hBmpPal Handle and palette of the Bitmap
cBmpFile Name of the BMP file to display
cResName Name of the BMP resource to display
lStretch True if image has to be adjusted to all visible area
lScroll True if image may be scrolled into its own visible area
aHotAreas An array with some hot-areas on the bitmap
nVStep Units to scroll on vertical scroll
nHStep Units to scroll on horizontal scroll
nZoom Units to zoom the picture.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
Define Constructor for resources
ReDefine Constructor for resources
End Ends control and make it disappear
Command Processes WM_COMMAND WinApi messages
Default Default initialization of the Bitmap
Destroy Destroy the bitmap object.
Display Displays the bitmap. Use :Refresh() instead to force it.
GotFocus Action to be performed when getting the focus
HScroll Horizontal ScrollBar messages dispatcher
Init Generic Control initialization method
Inspect Interactive load of Bitmap.
LButtonDown Action to be performed when clicking the mouse.
Load Load the bitmap from resources
LoadBmp Load bitmap from disk.
nHeight Retrieves height of the image.
Note: The ScrollXXX Methods assume that lScroll is TRUE AND that
the BitMap is larger than the visible area
Class TBlock
--------------------------------------------------------------------------------
DATA
cExpression A string with the block expression
bBlock the expression codeblock
--------------------------------------------------------------------------------
METHODS
New Creates a new codeblock
Eval / Exec Executes the codeblock
DATA
--------------------------------------------------------------------------------
bAction CodeBlock for the click event.
cMsg Message bar Text.
lPressed Is button is pressed.
lCaptured Is mouse is captured by the button.
lAdjust If the bitmap has to be resized to cover all its surface
hBmpPal1 The main image of button.
hBmpPal2 The image of button pressed for animated button.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
NewBar Constructor from source code for Button Bar
ReDefine Creates a BtnBmp from resources
Click Mouse left button event handler
FreeBitMaps Releases all the bitmaps associated with this control
cGenPRG Generates the source code of this control
HandleEvent Generic events handler
LButtonDown Behavior when pressing the mouse
LButtonUp Behavior when releasing the mouse click
LoadBitmaps Load the bitmap/s from resources
Paint Draws the Button
MouseMove Behavior when moving the mouse over it
Release Destroy the Button image
SetFile Changes to a different BMP file
DATA
--------------------------------------------------------------------------------
hBrush Handle of the brush.
hBitmap Handle of Bitmap if the brush is an image.
METHODS
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
bAction CodeBlock for the click event.
lDefault The button has default style.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
ReDefine Constructor for resources.
cGetPRG Generates the source code of the button.
Click Mouse left button event handler.
Colors Overrides control Color() management.
cToChar Generates a data template to build a Dialog.
GotFocus Action to be performed when getting the focus.
Init Action to be performed on init.
KeyDown Action to be performed when a key is pressed down.
LostFocus Action to be performed when losing the focus.
MouseMove Action to be performed when moving the mouse over.
DATA
--------------------------------------------------------------------------------
lRegistered Internal. Used to register a new class.
aColumns An array holding all the column objects
aArray Holds the array, when browsing an array
lNoHScroll Don't display the vertical scrollbar
lNoLiteBar Don't use a different color to hilite bar
lNoGrayBar Don't use a different color to lostfocus bar
lLogicDrop Use a combobox when editing a logical value
nAdjColumn Column index to expand to flush table window
lRepaint Bypass paint if false
nFreeze Freeze nFreeze left most columns
oDbf Holds DataBase object when used
oCtx Holds context object when used
lColDrag Allows column exchange by dragging
lLineDrag Allows column width resize with the mouse
nDragCol Column being mouse dragged
METHODS
--------------------------------------------------------------------------------
New Constructor. Creates a new browse from source code .
ReDefine Constructor from resources .
Destroy Specific destroy for these objects. Internally called. .
GotFocus Method to execute on receiving focus event. Internal. .
LostFocus Method to execute on losing focus event. Internal .
BeginPaint Method to execute on beginpaint event. Internal .
Paint Method to execute on paint event. Internal. .
EndPaint Method to execute on Endpaint event. Internal .
Default Performs default initialization of the browse. Internal. .
DrawLine Draws a specific line of the browse. Internally used .
DrawSelect Draws the line that is currently selected. Internal .
DrawHeaders Draws the headers of all visible columns. Internal .
ResetSeek Resets the seek expression on incremental search .
SetOrder Selects a column index tag .
GoDown Select next browse row .
GoUp Select the previous browse row .
Seek Performs an incremental search based on nKey value .
PageUp Goes up one page .
PageDown Goes down one page .
KeyChar Method to handle WM_CHAR events. .
LButtonDown Left mouse click events manager .
LButtonUp Left mouse releasing events manager .
LDblClick Left double click events management .
lEditCol Edits a cell of the browse .
nAtCol Returns the column placed at a specific pixel position .
MouseMove Mouse Movements events manager .
Report Automatically generates a Report from the browse .
Reset Resets all browse navigation associated data .
ResetBarPos Set the scrollBar thumb according to the default tag .
SetArray Browses an array .
SetoDBF Browses a DataBase object .
SetContext Sets a context object to be used .
VertLine Controls the column width mouse resizing .
AddColumn Adds a new column to the browse .
SwitchCols Exchanges two columns without displaying them again .
Exchange Exchange two columns and displays them .
TcColumn
DATA
--------------------------------------------------------------------------------
cHeading Optional Header text
bData Mandatory Code block to return column data
cPicture Optional picture clause
bClrFore Optional Foreground Color block
bClrBack Optional Background Color block
nAlign Optional Alignment DT_LEFT or so on
nWidth Optional Width
lBitMap Optional Bitmap Flag
lEdit True if editing is allowable
lNoLite True to skip cell during SelectlLine()
METHODs
--------------------------------------------------------------------------------
New Method constructor. Creates a new column object .
DATA
--------------------------------------------------------------------------------
None
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
ReDefine Constructor for resources.
Click Mouse left button event handler.
Default Default initialization.
cToChar Generates a data template to build a Dialog.
Init Generic initialization.
MouseMove Action to be performed when moving the mouse over.
Refresh Repaints the control.
cGenPRG Generates the source code of the control.
Class TClipBoard
--------------------------------------------------------------------------------
DATAs
--------------------------------------------------------------------------------
nFormat Type of data placed in Clipboard
oWnd Container object
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
Clear Open, clear Clipboard contents and close it
Close Close the Clipboard to end using it
Empty Clear Clipboard contents if it's open
End Open, clear Clipboard contents and close it
GetData Get the content of Clipboard
GetText Get the text placed in the Clipboard
Open Open the Clipboard to start using it
SetData Set the content of Clipboard
SetText Places text in the Clipboard
DATA
--------------------------------------------------------------------------------
oObject Contained non-visual Object
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
Destroy Destroy the object.
Display Displays the control. Use :Refresh() to force repaint
LDblClick Action to be performed on left double click. Invokes bInspect
Paint Draws the control. This process occurs inside Display.
DATA
--------------------------------------------------------------------------------
aItems Array of Items of the ComboBox
nAt Index of the current select item
aBitmaps Array of Bitmaps of the ComboBox if ownerdraw style used
lOwnerDraw If it is an ownerdraw style ComboBox
nBmpHeight Height to use for painting the ownerdraw bitmaps
nBmpWidth Width to use for painting the ownerdraw bitmaps
bDrawItem CodeBlock to evaluate to select a ownerdraw bitmap to paint
cError Error description when using a ComboBox for browse cell editing
oGet Contained GET for DropDown ComboBoxes if STYLE CBS_DROPDOWN
specified
nStyle internally used when specifying a STYLE CBS_DROPDOWN ComboBox
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor for resources
Add Add an item to the combobox items list
cToChar Generates a data template to build a DialogBox
Change Changed event response
Default Default initialization
DefControl Register the control as a contained child of a container object
Del Deletes an item
Destroy Destroys the control
DrawItem OwnerDraw items painting
FillMeasure Calculates the dimension of an ownerdraw item
Find Checks if a specific string is contained at its items list
FindString Returns the specific index position of an item in its list
Init Generic initialization on DialogBoxes
Insert Insert an item
LostFocus Action to be performed when loosing the focus
lValid ComboBox validation when loosing the focus
Modify Modify the text of an item
MouseMove Action to be performed when moving the mouse over it
Open Opens the ComboBox related list
Refresh Forces the control to be repainted
Reset Empty all contents of the ComboBox and the array aItems
Select To select a string in the list box of a combo box by index
Set To select a string in the list box of a combo box by text
SetBitmaps To set the bitmaps to be used by the ownerdraw
SetItems Changes the items shown in the combobox
ShowTooltip Shows its tooltip
VarGet Retrieves the associated Clipper variable value
DATA
--------------------------------------------------------------------------------
nDevice, nInQueue, nOutQueue, nId, nStop, nBaud, nData, nErr
cParity, cStyle, cChar
aStatus
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
Break Blocks the communication port.
Close Closes the communication port.
Error Shows the errors messages.
Escape Sends the escape sequence.
Flush Leaves empty the communication buffer.
SetUp Setups the communication port.
UnBreak Unlock the communication port.
Write Send a string to the communication port.
METHODS
------------------------------------------------------------------------------
Change Virtual Method to execute when generic changing of the control
.
Click Virtual Method to execute when generic clicking of the control
.
cToChar Control Data to template convertor for creating Dialog Boxes.
Init Generic Control initialization method .
Default Default initialization .
EraseBkGnd Erase Background of control .
FWLostFocus Handle losing focus by control .
GetDlgCode Handle changing of controls .
GetNewId Generates an unique control ID .
GotFocus Action to be performed when getting the focus .
LostFocus Action to be performed when losing the focus .
End Ends control and make it disappear .
HandleEvent Generic control Handle Event method .
DATAs
--------------------------------------------------------------------------------
hCursor Handle of the cursor.
lPredef If it is a Windows system predefined cursor.
METHODs
--------------------------------------------------------------------------------
New Constructor from source code .
End Destroys the cursor object
METHODs
--------------------------------------------------------------------------------
New Constructor
Skip Skips like DbSkip()
Activate Select its workarea as the one currently active
AddIndex Adds a new index
Append Adds a new record
Blank Empties the editing buffer
Bof Checks if beginning of file
Close Closes the workarea
CloseIndex Closes an index
Commit Flushes pending file buffers
Create Creates a new DataBase
CreateIndex Creates a new Index
ClearRelation Clear active relations
DeActivate Closes the database. It acts like DbCloseArea()
DATAs
--------------------------------------------------------------------------------
hStmt The handle of the SQL statement to process.
oOdbc A reference to the related TOdbc session object
aFields Array containing all the DataBase fields description
nRetCode Returned code from the latest operation
cLastComm The latest executed SQL command
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
End Ends control and make it disappear
Cancel Cancels the current in process SQL statement
Execute Execute an SQL statement
GetCurName Gets the current assigned cursor name
GetOptions
InitFields Loads all DataBase fields descriptions into ::aFields
LastCommand Last executed command
DATA
--------------------------------------------------------------------------------
aFields Array of fields objects
aIndexes Array of index objects
oDict related dictionary (Class TDict) object
METHODS
--------------------------------------------------------------------------------
New Constructor
Redefine Constructor from the dictionary (considered as a resource)
AddField Adds a new field description
AddIndex Adds a new index description
ReadFields Load the fields descriptions from the dictionary object
ReadIndexes Load the indexes descriptions from the dictionary object
WriteFields Save the fields descriptions from the dictionary object
WriteIndexes Save the indexes descriptions from the dictionary object
Create Creates the DataBase file DBF from the aFields description
Class TDde
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
nService The service on which to establish the connection.
nTopic The topic on which to establish the connection.
nItem The item on which to establish the connection.
bAction Action to be performed
bEnd Action to perform when ending the DDE link (VALID)
oWndServer Container TWindow object of the TDDE object.
lActive If the DDE connection is still active
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
Activate To initiate a conversation with server applications
responding to the specified application and topic names.
Execute To send a string to the server to be processed as a
series of commands.
End Ends the DDE connection
DATAs
--------------------------------------------------------------------------------
hInst A handle of the DDEML instance session
hConv A handle of the DDEML conversation
cService The name of the service
hService The handle of the service
lConnecting If the server is in the process of connecting with a Client
hSz2 Some processes require to hold a hSZ2 handle stored here
aClients An array with all the attended Clients
bOnConnect The action to perform when connecting to a client
bOnRequest The action to perform on a client request
bOnDisconnect The action to perform when a client disconnects
bOnExecute The action to perform on a Client Execute command
METHODs
--------------------------------------------------------------------------------
New Constructor METHOD
Connect Automatically called when a Client wants to connect
ConnectConfirm Automatically called when a Client has finally connected
Disconnect Automatically called when a Client has disconnected
Execute Automatically called when a Client has sent a command
Request Automatically called when a Client has done a request
Return Use this method to return data to a Client Request
DATAs
--------------------------------------------------------------------------------
hInst A handle of the DDEML instance session
hConv A handle of the DDEML conversation
cService The name of the service
hService The handle of the service
cTopic The name of the topic to keep the conversation about
hTopic The handle of the topic
nTimeOut The timeout to wait for an answer. Default 1000. Use -1 for
ASync.
METHODs
--------------------------------------------------------------------------------
New Constructor METHOD
Connect To connect to a Server
Disconnect To disconnect from the Server
End Disconnects from the Server. Same as above
Execute Sends a command to the Server.
Request Request data from the Server.
METHODS
--------------------------------------------------------------------------------
New Generic constructor method .
Define Alternative constructor .
Activate Starts interaction with the Dialog Box .
Close() Close dialog box .
Command Handle commands sent to dialog box .
cToChar Translate handle to structure item .
DefControl Connect control to dialog box .
Destroy Destroy dialog box .
Display Dialog box .
End End dialog box .
EraseBkGnd Erase background of dialog box .
FocusNext Give focus to next control in dialog box .
GetItem Get the handle of a certain control .
GotFocus Called when dialog receives focus .
HandleEvent Event handler for dialog boxes .
Init() Handle initialization of dialog box .
LostFocus Handles losing focus by dialog box .
QueryEndSession Check if application can be closed .
VbxFireEvent Handling of VBX events by dialog box .
DATAs
--------------------------------------------------------------------------------
aDbfs Array of Dbfs.
aFlds Array of fields.
aIndexes Array of index.
aViews Array of views.
aBrws Array of Browses.
cPath Full path of the data base file.
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
Create Build all dictionary related files
Import Imports files from another data base.
Load Uses a data base file from disk.
Class TField
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
cName Name of the field.
cType Type of the field.
nLen Length in numeric fields.
nDec Number of decimals in numeric fields.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
DATA
--------------------------------------------------------------------------------
cName File name.
hFile Handle of the file
nLen Length of the file
nBufferLen Buffer length.
nMode Opening Mode.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
Create Creates the file.
End Ends control and make it disappear.
AppByte Adds a Byte to the end of the file.
AppStr Adds a String to the end of the file.
AppWord Adds a word to the end of the file.
cGetStr Retrieves a String from the file.
Close Closes the file.
Count Number of times that a string appears in the file. CRLF as
default.
DelBytes Deletes a specified number of bytes from the current position.
GoBottom Go to the bottom of the file.
GoTo Go to a specified file offset.
GoTop Go to the top of the file.
InsBytes Inserts a specified numbers of bytes always from current position.
lBoF True if at the begining of the file.
lEoF True if at the end of the file.
nGetByte Get a byte from the actual file offset.
nGetWord Get a word (two bytes) from the actual file offset.
nRecNo Actual offset position inside the file.
Open Open the file.
PutByte Write a byte at the current file offset.
PutStr Write a String at the current file offset.
PutWord Write a Word (two bytes) at the current file offset.
Seek Search for determinate String. Starts from the current position.
Skip Skips a determinate number of bytes.
DATA
--------------------------------------------------------------------------------
aPrompts Array of Prompts
aDialogs Array of NonModal DialogBox objects
nOption Current selected page
nTabSize Size of the tabs
oFont2 Bold Font type
aEnable Array of enabled pages
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor from Resource
Class TFont
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
cFaceName Typeface name used (i.e.: "Arial" )
hFont The WinApi handle of the font
hFontOld The handle of the font that was selected previously
lBold If it is bold
lItalic If it is italic
lUnderline If it is underline
lStrikeOut If it is strikeout
nHeight The height of the font
nWidth The width of the font
nEscapement The escapement of the font
nOrientation The orientation of the font
nWeight The weight of the font
nCharSet The charset of the font
nOutPrecision The outprecision of the font
nClipPrecision The clipprecision of the font
nQuality The quality of the font
nPitchFamily The pitch family of the font
METHODS
--------------------------------------------------------------------------------
New Constructor method. Builds a new font
Choose Builds a new font interactively
End Finish the use of a font and release it
Activate Set a font as defined for a specific device context
DeActivate Deselects the current font from the device context
DATAs
--------------------------------------------------------------------------------
oGet Standard MsDos Get related object to use its buffer contents
nClrFocusText Color for the get text when receiving focus
nClrFocusPane Color for the get back when receiving focus
nPos Position of the cursor (caret)
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor for resources
Assign Assigns the buffer value to the GET related variable
DATA
--------------------------------------------------------------------------------
No data is added.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
ReDefine Constructor from resource.
cToChar Control Data to template convertor for creating DialogBoxes.
HandleEvent Generic control Handle Event method.
Init Generic Control initialization method.
DATA
--------------------------------------------------------------------------------
cIcoFile *.ICO filename if load it from disk.
cResName Resource name if load it from a resource ( DLL, RES, RC )
hIcon Windows handle of the icon.
METHODS
--------------------------------------------------------------------------------
Class TIndex
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
cDbfName DBF name.
cName Key name.
cTag Tag name.
cExpression Expression to evaluate for Index creation.
lUnique Logical Unique
lDdescending Ascending(default)/Descending
cComments Additional Comments
cType
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
Create Create a physical index file.
DATA
--------------------------------------------------------------------------------
cIniFile INI physical filename
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
Get Retrieves data from the INI file.
Set Writes data into the INI file.
DelEntry Deletes an INI section entry.
DelSection Deletes an entire INI section.
DATA
--------------------------------------------------------------------------------
aTokens Array of string tokens to identify
aIds Array of numeric identifiers for each found token
lSkipBlank To automatic skip spaces
lSkipCRLF To automatic skip carriage-return and line-feed
cToken Last read token string value
cSeparators A string with all separators
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
lEoF Retrieves the total number of lines.
nGetByte Get a byte from the file.
nGetToken Get a token from the file.
SetText //
METHODS
--------------------------------------------------------------------------------
nSignature() Signature of a LIB file
nPageSize() Number of pages inside LIB
nDirPages() Number of pages of LIB dir
aModules() Array with all module names
METHODS
--------------------------------------------------------------------------------
nSignature() Signature of a LIB file
nPageSize() Number of pages inside LIB
nDirPages() Number of pages of LIB dir
aModules() Array with all module names
Windows 95 implements its own 'Tree' control, but thanks to Class TLinkList
and Class TTreeItem (and using a TWBrowse object) we may use trees under
Windows 3.1 and NT 3.51.
<oBrw>:SetTree( <oTree> )
DATAs
--------------------------------------------------------------------------------
METHODs
--------------------------------------------------------------------------------
Add Adds an item to the LinkList
Draw Recalculates all drawing lines of the entire tree
End Destroyes the LinkList object
GetLast Returns the last item of the LinkList (including subtrees)
nCount Total Number of items
OpenAll Open all subtrees
Eval Evals a codeblock for each TreeItem of the LinkList.
DATA
--------------------------------------------------------------------------------
aItems Array of Items of the ListBox
aBitmaps Array of related bitmaps handles for ownerdraw ListBox.
lOwnerDraw If it is a ownerdraw ListBox.
nBmpHeigth Height of bitmaps if ListBox is OwnerDraw
nBmpWidth Width of Bitmaps if Listbox is OwnerDraw
cFileSpec FileSpec to display a fields directory items.
bDrawItem Optional codeblock to select what bitmap to draw on a ownerdraw
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor for resources
Add Add an Item to the list.
aSelections Array with selected items on a MultiSelect ListBox.
cGenPrn Generates the xBase source code of the control
Change Changed event handler.
cToChar Generates a data template to build a DialogBox
Default Default Listbox initialization
Del Deletes an Item.
Destroy Destroys the control. Automatically called.
DrawItem DrawItem event handler.
FillMeasure FillMeasure event handler.
GetItem Retrieves the text of any item.
GetPos Retrieves the index of the currently selected item.
GetSel Index number of the selected item. Zero if no item selected
GetSelCount Retrieves the number of selected items on a multiselect ListBox
GetSelItem Retrieves the current select item as text
GoBottom Go to the last item in the listbox
GoTop Go to the first item in the listbox
Init Generic control initialization
Insert Insert an Item.
IsMultipleSel Check if the ListBox is multiple selection style
Len Retrieves the length of the list.
LostFocus Behavior when losing the focus
Modify Modify the text of an Item.
MouseMove Behavior when moving the mouse over the control
Reset Empties the list.
Select Select an item by its order
Set Select an item by its text
SetBitmaps Sets the ownerdraw related bitmaps
SetItems Changes the items of the listbox
SetSel Selects a different item
DATAs
--------------------------------------------------------------------------------
cSubject Mail subject description
cNoteText Text of the mail
cMsgType
cConversationID
dDate Date of the mail
cTime Time of the mail
lReceipt Has received the mail
lFromUser Interactively select the mail subject, target, etc
aOrigin An array with all origin senders
aRecipients An array with all recipients receivers
aFiles An array with all related files to send attached
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
Activate Start the mail.
End End the mail.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
lOpen Opens the Mci file.
Play Start the reproduction of the file.
cGetError Retrieves any errors.
SetWindow Set the windows for the Mci object.
SendStr Send a Mci string command to the Mci object.
DATA
--------------------------------------------------------------------------------
oWndClient Client TWindow Object of the MDI structure
oControl TControl object that is showed in child window
METHODS
--------------------------------------------------------------------------------
METHODS
--------------------------------------------------------------------------------
New Generic constructor method
Tile Tile Child windows
Cascade Cascade child windows
ArrangeIcons Arrange all minimized document child windows. It does
not affect child windows that are not minimized.
NextWindow Activate the child window immediately behind the
currently active child window and place the currently
active child window behind all other child windows.
GetActive Retrieves the TMDIChild window that is active.
Add Add an TMDIChild object to ::aWnd instance array.
ChildNew Creates an New TMDIChild object an add it to ::aWnd
ChildActivate Activate a different TMDICchild window.
ChildMaximize Maximize a TMDICchild window.
ChildRestore Restore a TMDICchild window.
ChildClose Close a MdiChild window
ChildNext Selects the next MdiChild
Resize Resizes the MdiClient
lCloseAll Closes all the MdiChild Children
IconizeAll Iconizes all the Mdichild windows
KeyDown Behavior when pressing a key
MouseMove Behavior when moving the mouse over
--------------------------------------------------------------------------------
Class TMDIFrame Inherits from Class TWindow
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
oWndClient The TMDIFrame's client window, an instance of TMDIClient.
oWndActive The TMDIFrame's active MDI child window.
METHODS
--------------------------------------------------------------------------------
New Generic constructor method
Tile Tile Child windows
Cascade Cascade child windows
CloseAll Close all the MdiChild windows
IconizeAll Iconizes all the MdiChild windows
ArrangeIcons Arrange all minimized document child windows. It does
not affect child windows that are not minimized.
--------------------------------------------------------------------------------
Class TMenu
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
hMenu The Windows handle of the Menu
aItems An array of MenuItems
oWnd A reference to the container Window of the Menu
lSysMenu If it is a System menu
lPopup If it is a popup menu
nHelpId The help topic identifier of this Menu
cVarName A variable name to identifier this object (visual editor)
METHODS
--------------------------------------------------------------------------------
New Creating a new Menu
Redefine Creates a menu from resource
NewSys Redefining a SysMenu
Activate PopMenu activating method
Add Adding a new menuitem to the Menu
AddEdit Adds standard editing menu options
AddHelp Adds standard help menu options
AddMdi Adds standard MDI menu options
Command Processes the user selection command
DelItems Invoked when destroying the menu. Destroys each menuitem
Destroy Destroys the menu
Disable Disables the entire menu
End Ends the menu
GetMenuItem Retrieves a reference to a MenuItem Object given its Id
GetPopup Retrieves a reference to a contained Popup given its position
HelpTopic Invoked when pressing enter over this menu
Hilite Hilites a specific menuitem
Init Called everytime the menu is going to be shown
Insert Inserts a new menuitem at a specified position
LastItem A reference to last processed MenuItem Object
Load Changes some menu properties based on a binary info
Refresh Repaints the menu
Release Destroy the Menu Object
Reset Reset to the original System Menu of a Window
Save Generates a binary representation of the menu
UnHilite DeHelites a specific menuitem
--------------------------------------------------------------------------------
Class TMenuItem
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
cPrompt The label of the MenuItem
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor from resource
Destroy Called when the menuitem is destroyed.
Disable Disable the item.
Enable Enable the item.
End Ends control and make it disappear.
EveCount Number of total events for this class (used by the Object
Inspector).
Event Retrieve the event from the event array.
Load Set the properties of the menuitem based on a supplied binary
information.
PropCount Number of total property.
Property Retrieves the property from the property array.
Save Generates a binary representation of this object.
SetCheck Enables / Disables check.
SetPrompt Changes the associated menuitem prompt.
__HelpTopic Method invoked when pressing F1 when this menuitem is selected.
Menus Commands
--------------------------------------------------------------------------------
SEPARATOR [<oMenuItem>]
MENUITEM...
MRU <oMru> ;
[ INI | ININAME | FILENAME | NAME | DISK
<cIniFile> ] ;
[ SECTION <cSection> ] ;
[ SIZE | ITEMS <nItems> ] ;
[ MESSAGE <cMsg> ] ;
[ ACTION <uAction> ]
ENDSYSMENU
<cIniFile> The name of the related INI file to use with a MRU object.
<cSection> The section inside the INI file where to store the MRU items.
CLAUSES
--------------------------------------------------------------------------------
Class TMetaFile FROM TControl Windows WMF files management
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
hMeta Handle of the MetaFile.
oPen Reference to a pen object.
nWidth Dimensions
nHeight Dimensions
nXorig Origin in X axis.
nYorig Origin in Y axis.
lZoom if Zoom is enabled.
lShadow If Shadow
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor from resource
Display Displays the control. Use :Refresh() to force repaint
End Ends control and make it disappear
Hide Hides the control.
Paint Draws the control. This process occurs inside Display.
SetCoors
SetFile Name of the metafile.
SetOrg Set the X and Y origin.
--------------------------------------------------------------------------------
Class TMeter Inherits TControl
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
nTotal Total amount to be represented by the Meter
nClrBar RGB color to use for the filled background of the meter
nClrBText RGB color to use for the filled text of the meter
cText The text to show on the meter
lPercentage If the % sign is to be painted
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
ReDefine Constructor from resources.
Default Default meter initialization.
HandleEvent Events dispatcher manager.
Init Control initialization.
Paint Paints the Meter.
Set Changes the value represented and
the value of the variable.
SetTotal
Meter Commands
--------------------------------------------------------------------------------
CLAUSES
DESIGN Allows the user to move and resize with the mouse
--------------------------------------------------------------------------------
Class TMultiGet Inherits from TControl
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
lReadOny If the text does not allows editing
nPos The cursor position inside the control
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor for resources
AdjClient Adjust its dimensions to its container object
Copy Copy the selected text into the clipboard
Create Specific interface to WinApi CreateWindow
cToChar Generates a data template to build a Dialog
Cut Deletes the selected text and copies it into Clipboard
Default Default object initialization
DelLine Deletes the specified line number. Default current one
Find Standard search text DialogBox
GetLine Retrieves the specified line number. Default current one
GetLineCount Retrieves the number of text lines
GetCol Retrieves the current cursor col
GetRow Retrieves the current cursor row
GotFocus Action to perform when getting the focus
Init Generic initialization
LostFocus Action to perform when losing the focus
MouseMove Action to perform when moving the mouse over it
Refresh Updates the text shown and forces repainting
Save Save the text into the associated variable
GET Commands
--------------------------------------------------------------------------------
Creating a GET from @ <nRow>, <nCol> GET [ <oGet> VAR ] <uVar> ;
source code [ OF | WINDOW | DIALOG <oWnd> ] ;
[ PICTURE <cPict> ] ;
[ VALID <ValidFunc> ] ;
[ WHEN <WhenFunc> ] ;
[ COLOR | COLORS <nClrFore>;
[,<nClrBack>] ] ;
[ SIZE <nWidth>, <nHeight> ];
[ FONT <oFont> ] ;
[ HSCROLL ] ;
[ CURSOR <oCursor> ] ;
[ PIXEL ] ;
[ MESSAGE <cMsg> ] ;
[ UPDATE ] ;
[ WHEN <WhenFunc> ] ;
[ CENTER | CENTERED> ] ;
[ RIGHT ] ;
[ READONLY | NO MODIFY ] ;
[ DESIGN ] ;
[ ON CHANGE <uChange> ] ;
[ PASSWORD ] ;
CLAUSES
DESIGN Allows the user to move and resize with the mouse
--------------------------------------------------------------------------------
Class TMru
--------------------------------------------------------------------------------
MRU means: "Most Recent Used" and let you automatically manage
MRU lists on your menus !!! See SAMPLES\TestMru.prg for a test!
DATA
--------------------------------------------------------------------------------
aItems Array of MenuItems
nMaxItems Max Number of Items in the list.
cIniFile Name of the associated ini file.
cSection Section in the ini file
cMsg Message for all MRU MenuItems
oMenu oMenu container of the MRU list
oSeparator A reference of the SEPARATOR menuitem created above the Mru
nMenuPos oMenu container position of the MRU list
bAction Action to perform when selecting any of the MRU MenuItems
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
Save Add a new element to the MRU list.
Clear Clear all Mru items and also release the INI related section
--------------------------------------------------------------------------------
Class TMsgBar FROM TWindow
--------------------------------------------------------------------------------
DATAs
--------------------------------------------------------------------------------
cMsgDef The default message to show
lCentered If the message should look centered at screen
lInset If the message bar should look inset
lActive Activate the Msgbar
lDate If the message bar should look Date
lClock If the message bar should look Clock
lKbd If the message bar should look Keyboard status
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
AddItem Adds n Item to the MsgBar.
Adjust Adjust the MsgBar dimensions to its container window
ClockOff Turn off the clock.
ClockOn Turn on the clock.
DateOff Turn off the date.
DateOn Turn on the date.
Default Default initialization
DelItem Deletes an Item from the MsgBar.
Destroy Destroys the MsgBar. Automatically called.
GetItem Retrieves the number of items of the MsgBar.
Height Retrieves the MsgBar Height.
KeybOff Turn the keyboard off.
KeybOn Turn the Keyboard on.
LButtonDown Action to be performed when clicking the mouse
Paint Draws the control. This process occurs inside Display.
Refresh Repaints the control
SetMsg Set the text of the MsgBar
ShowMsgBar
--------------------------------------------------------------------------------
Class TMsgItem TMsgBar items objects
--------------------------------------------------------------------------------
DATAs
--------------------------------------------------------------------------------
oMsgBar Reference to its MsgBar container object.
cMsg shown text.
nSize width of the MsgItem.
nClrFore Foreground color as a RGB number.
nClrBack Background color as a RGB number.
nId Id number for the MsgItem.
bMsg Optional codeblock to evaluate to generate the cMsg text.
bAction Action to be preformed when clicking on it.
oFont Font object used.
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
Click Action to be performed when clicking the mouse.
Refresh Repaints the item
SetFont Set the font for the MsgItem.
SetText Set the message for the MsgItem.
Show Makes the item visible
--------------------------------------------------------------------------------
Class TObjFile FROM TFile
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
nRecId Record Identifier.
nRecLen Record Length.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
Compiler Writes the compiler name into the OBJ
ExtDef Writes a External definition record inside the OBJ
GrpDef Writes a Group definition record inside the OBJ
LeData Writes a Data block record inside the OBJ
LNames Writes the list of the local names of the OBJ
ModEnd Writes the end of file record of the OBJ
PubDef Writes a Public definition record inside the OBJ
SegDef Writes a segment definition record inside the OBJ
SkipRec Go to next record inside the OBJ
THeadr Writes the header record of the OBJ
--------------------------------------------------------------------------------
Class TOdbc ODBC session management
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
hEnv The handle of the environment used by the ODBC.
hDbc The handle of the DataBase connection used by the ODBC.
cConnect An optional connect string description provided.
cDSN The Data Server Name or the DataBases directory path
cUser An optional user name provided.
cPassword An optional password provided.
METHODs
--------------------------------------------------------------------------------
New Creates a new ODBC object
METHOD New( cDSN, cUser, cPassword, cConnect, lDlg ) CONSTRUCTOR
--------------------------------------------------------------------------------
Class TPages Multiple DialogBox Pages management
--------------------------------------------------------------------------------
DATAs
--------------------------------------------------------------------------------
METHODs
--------------------------------------------------------------------------------
New Method Constructor from source code
Redefine Method Constructor from resources
Init Generic control initialization
Default Control default initialization. Called from Init
Destroy Generic destructor method
SetOption Sets a different selected page
GoPrev Selects the previous page to the current one selected
GoNext Selects the next page to the current one selected
--------------------------------------------------------------------------------
Class TPanel FROM TControl
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
--------------------------------------------------------------------------------
Class TParser
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
aRules Array of Rules.
METHODs
--------------------------------------------------------------------------------
New Constructor from source code.
Add Adds a new rule to the aRules.
--------------------------------------------------------------------------------
CLASS TPen Pen management as objects
--------------------------------------------------------------------------------
DATAs
--------------------------------------------------------------------------------
hPen The handle of the pen
nStyle The Pen style
Values
#define PS_SOLID 0
#define PS_DASH 1
#define PS_DOT 2
#define PS_DASHDOT 3
#define PS_DASHDOTDOT 4
#define PS_NULL 5
#define PS_INSIDEFRAME 6
METHODs
--------------------------------------------------------------------------------
New Constructor Method
New Constructor Method
--------------------------------------------------------------------------------
Parameters:
Values
#define PS_SOLID 0
--------------------------------------------------------------------------------
Class TPrinter
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
hDC Handle of the Device Context of the Printer
hDCOut Handle of the current metafile in use if file output specified
aMeta Arrays of metafiles names generated in disk
cDevice The name of the output device
cDocument The name of the spooler document
cDriver The name of the printer driver in use
cModel Alternative printer to use
cPort The name of the port used
cDir The path for the metafiles storage. By default TEMP
nPage The page currently printed
nXOffset Coordinates of the virtual page origin
nYOffset Coordinates of the virtual page origin
lMeta If the output has to go to metafiles in disk
lModified If the printer device handle should be initialized again
lStarted If the printing already started
oFont Default font to use for printing
METHODS
--------------------------------------------------------------------------------
New Constructor from source code .
End Destroys the current printer object .
EndPage Ends the actual printed page. .
FillRect Fills a rectangle with a specified brush object. .
Box Draws a box. .
Cmtr2Pix Converts a centimeters coordinates into pixels coordinates .
DraftMode Select the draft mode for speed up the printing .
GetOrientation Retrieves the printer orientation. .
GetPhySize Retrieves the paper physical dimensions .
GetTextHeight Retrieves text Height for a specific font object .
GetTextWidth Retrieves text Width for a specific font object .
ImportWMF Imports a Windows metafile to be used as template .
Inch2Pix Converts a inches coordinates into pixels coordinates .
Line Draws a line. .
nHorzRes Retrieves the horizontal resolution. .
nHorzSize Retrieves the width of the physical dimensions .
nLogPixelX Retrieves the number of pixels per logical inch .
nLogPixelY Retrieves the number of pixels per logical inch .
--------------------------------------------------------------------------------
Class TRadio Inherits from TControl
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
lChecked If the radio control is currently selected
oRadMenu Its related container TRadMenu Object
nPos Relative position within respect to the other Menu Radios
buttons
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
ReDefine Constructor from resource.
Click Mouse left button event handler.
cToChar Generates a data template to build a Dialog
Default Default control initialization.
Init Generic control initialization.
KeyDown Action to be performed when pressing a key.
lIsChecked Retrieves its current logical value
MouseMove Behavior when moving the mouse over it.
Refresh Repaints the control
SetCheck Changes its select/deselected state.
--------------------------------------------------------------------------------
Class TRadMenu Manages a group of TRadio controls
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor from resources
nOption SETGET Method which simulates the nOption DATA
Refresh Forces the whole control to be repainted
Set3DLook Activates the 3D look if its container is a window
End End all the radio elements
Disable Disables all the radio elements
Enable Enables all the radio elements
SetOption Changes the current selected radio option
Select Select a different radio element
GoPrev Skips to previous radio element
GoNext Skips to next radio element
--------------------------------------------------------------------------------
Class TRColumn
-------------------------------------------------------------------------------
DATA
oReport Its TReport object container.
aData An array with all data codeblocks.
aTitle An array with all titles codeblocks.
aPicture An array with all pictures.
bDataFont A codeblock that returns the font to use for the data.
bTitleFont A codeblock that returns the font to use for the title.
bTotalFont A codeblock that returns the font to use for the total.
bTotalExpr A codeblock to return when a total must be calculated.
cTotalPict A string holding the PICTURE to use for the data.
nWidth The width of the column in pixels.
nDataHeight The height of the column data.
nTitleHeight The height of the column title.
nTotal The accumulated total already calculated for the column.
nCol The column position if defined.
nSize The width in characters in pixels if defined by the user.
nPad The relative position inside the column: LEFT, CENTER, RIGHT
nPen The Report pen elements to use
lTotal If the column has total
lShadow If the column has to be filled with a shadow background
lGrid If the column has to be bordered with lines
-------------------------------------------------------------------------------
METHODS
New Method constructor: creates a new column.
Stabilize Stabilizes the column. It is called by the report stabilize.
SayTitle Prints its title.
SayData Prints its data.
SayTotal Prints its total.
-------------------------------------------------------------------------------
Class TRect
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
nTop Coordinates of the rect
METHODS
--------------------------------------------------------------------------------
DATAs
-------------------------------------------------------------------------------
oDevice The target device where to print
oTitle A TRLine object which contains the report title
oHeader A TRLine object which contains the report header
oFooter A TRLine object which contains the report footer
oRptWnd The related report window
oBrush An optional brush to use at the report
aGroups An array with all the report TRGroups objects defined
aColumns An array with all the report TRColumns objects defined
aFont An array with all the report TFont objects defined
aCols Internally used while printing. Don't use them!
aText Internally used while printing. Don't use them!
aData Internally used while printing. Don't use them!
aPen An arrays of pens to use with the report
bFor A codeblock which holds the FOR clause. By default: {|| .t. }
bWhile A codeblock which holds the WHILE clause. By default: {|| .not.
EOF() }
bInit A codeblock which holds the ON INIT clause.
bEnd A codeblock which holds the ON END clause.
bStartLine A codeblock which holds the ON NEWLINE clause.
bEndLine A codeblock which holds the ON ENDLINE clause.
bStartPage A codeblock which holds the ON NEWPAGE clause.
bEndPage A codeblock which holds the ON ENDPAGE clause.
bStartGroup A codeblock which holds the ON NEWGROUP clause.
bEndGroup A codeblock which holds the ON ENDGROUP clause.
bSkip A codeblock which holds how to skip to the next report line.
bStdFont A codeblock which returns the default report font order to use.
bPreview An optional codeblock to evaluate on the preview of the report
bChange A codeblock which holds the ON CHANGE clause
cRptFile -not available yet- The Data-driven file which holds the report.
cResName -not available yet- The resource name which holds the report.
cTotalChr The character to use for drawing the report total lines. Default:
"="
cGroupChr The character to use for drawing the report group totals. Default:
"-"
cTitleUpChr The character to use for drawing the report column title up line.
Default: "="
cTitleDnChr The character to use for drawing the report column title down line.
Default: "="
cFile -not available yet- The name of the target file to produce.
cName The name of the document to generate.
cPageTotal
cGrandTotal
nWidth The width of the target device. Pixels per inch.
nHeight The height of the target device. Pixels per inch.
nMargin The report left margin after stabilizing the report.
nRow The current report row being printed.
nPage The current report page being printer.
METHODs
-------------------------------------------------------------------------------
New Method constructor: creates a new report. .
BackLine .
BackLine
-------------------------------------------------------------------------------
Play .
Play
-------------------------------------------------------------------------------
Margin Modify any of the top, left, bottom & right report margins. .
Margin Modify any of the top, left, bottom & right report margins.
-------------------------------------------------------------------------------
Modify any of the top, left, bottom & right report margins.
LEFT 1
TOP 4
RIGHT 2
BOTTOM 5
INCHES 1
CENTIMETERS 2
xText
nFont
nPad
nRow
nRow
nCol
cBitmap
nWidth
nHeight
nScale
nRow
nCol
nBottom
nRight
nPen
nScale
nTop
nLeft
nBottom
nRight
nPen
KillShadow .
KillShadow
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Class TRColumn
-------------------------------------------------------------------------------
DATA
oReport Its TReport object container.
aData An array with all data codeblocks.
aTitle An array with all titles codeblocks.
aPicture An array with all pictures.
bDataFont A codeblock that returns the font to use for the data.
bTitleFont A codeblock that returns the font to use for the title.
bTotalFont A codeblock that returns the font to use for the total.
bTotalExpr A codeblock to return when a total must be calculated.
cTotalPict A string holding the PICTURE to use for the data.
nWidth The width of the column in pixels.
nDataHeight The height of the column data.
nTitleHeight The height of the column title.
nTotal The accumulated total already calculated for the column.
nCol The column position if defined.
nSize The width in characters in pixels if defined by the user.
nPad The relative position inside the column: LEFT, CENTER, RIGHT
nPen The Report pen elements to use
lTotal If the column has total
lShadow If the column has to be filled with a shadow background
lGrid If the column has to be bordered with lines
-------------------------------------------------------------------------------
METHODS
New Method constructor: creates a new column.
Stabilize Stabilizes the column. It is called by the report stabilize.
SayTitle Prints its title.
SayData Prints its data.
SayTotal Prints its total.
DATAs
--------------------------------------------------------------------------------
cDraw Contains the draw characters for this item.
cPrompt Contains the associated text label of the item.
oPrev Reference to previous TreeItem object.
oNext Reference to next TreeItem object.
oTree Reference to a contained tree object.
lOpened If the contained tree object is opened or not.
nLevel Ident level of the item.
hBmpOpen Handle of the bitmap for opened state.
hBmpClose Handle of the bitmap for closed state.
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
End Ends control and make it disappear
Add Adds a new following item.
Close Closes the the treeitem.
ColSizes Returns an array with colsizes to use for painting the browse
row.
Delete Deletes treeitem.
Draw Draws the item.
GetLabel Retrieves the treeitem label.
GetNext Retrieves the next treeitem.
GetPrev Retrieves the previus treeitem.
GetText Retrieves the treeitem prompt.
Open Opens the optional tree contained by the TreeItem.
SetNext Set a new value for the next treeitem.
SetText Set a new prompt for the current treeitem.
Skip Goes to the next treeitem.
Toggle Change the treeitem status if it's open closes it, else opens
it.
-------------------------------------------------------------------------------
Class TRGroup FiveWin Report Engine Group objects
-------------------------------------------------------------------------------
DATAs
-------------------------------------------------------------------------------
oReport Its TReport object container.
aTotal An array of numeric totals, one for each report column.
bGroup A codeblock which holds the group expression.
bHeader A codeblock that returns the header of the group.
bFooter A codeblock that returns the footer of the group.
bHeadFont A TFont object to use to print the group header.
bFootFont A TFont object to use to print the group footer.
cValue It keeps the latest group evaluated expression.
nCounter
lEject If eject is to be performed on each group change.
METHODs
-------------------------------------------------------------------------------
New Method constructor: creates a new TRGroup object. .
DATAs
-------------------------------------------------------------------------------
oReport Its TReport object container.
aLine An array of codeblocks with all the line data elements.
aFont An array of codeblocks with all the fonts to be used. .
aRow Internally used during printing.
aWidth An array with each line element width.
aPad An array with each line element pad type: LEFT, CENTER, RIGHT
nCol Internally used to print the line.
nHeight The height of the line.
nWidth The largest width defined of its elements.
METHODs
-------------------------------------------------------------------------------
New Method constructor: creates a new TRLine object. .
Stabilize Stabilizes the line. Called by the report stabilize method. .
Say Prints the line. .
-------------------------------------------------------------------------------
Class TSay Inherits from TControl
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
l3D If the say has to be painted with 3D effects
cPicture The PICTURE to use when showing the SAY
bGet A codeblock which returns the text to draw
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor for resources
Default Default initialization process
cGenPrg Generates a string with the source code of the SAY
HandleEvent Specific SAY HandleEvent method
cToChar Generates a data template to build a Dialog
Init Generic initialization
Refresh Forces the SAY to be repainted
SetText Changes the text of the SAY
-------------------------------------------------------------------------------
METHODS
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
nPort socket port number
cIPAddr socket IP address
nTimeOut connection timeout value
nBackLog listen backlog value
nSocket socket handle
hFile handle of a file transmited in chunks
bAccept codeblock to evaluate on accept event.
bRead codeblock to evaluate on read event.
bWrite codeblock to evaluate on write event.
bClose codeblock to evaluate on close event.
bConnect codeblock to evaluate on connect event.
METHODS
--------------------------------------------------------------------------------
New( nPort ) Constructor. nPort = port to use for the socket.
Accept( nSocket ) Constructor. Builds a new socket to accept a incomming
connection
End() Generic destructor.
HandleEvent() manages asyncronous connections events.
GetData() Retrieves incomming data.
--------------------------------------------------------------------------------
METHODs
--------------------------------------------------------------------------------
New() CONSTRUCTOR
AddMember( cName, nType, nLen ) Adds a new struct member
SetMember( nMember, uData ) Changes a struct member value
GetMember( nMember ) Retrieves a struct member value
SizeOf() INLINE Len( ::cBuffer ) Retrieves the struct total length
OnError( cMsg, nError ) ERROR HANDLER
--------------------------------------------------------------------------------
Class TTabs FROM TControl
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
aPrompts Label of tab.
aSizes Size of tab.
nOption Number of tab.
bAction CodeBlock.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor from resources
AddItem Add an item to the folder.
Default Default initialization
DelItem Delete an item from the folder.
Display Displays the control. Use :Refresh() to force repaint
GetHotPos Returns the tabs option that matches a specified HotKey char
Init Generic Control initialization method
LButtonDown Action to be performed when clicking the mouse
Paint Draws the control. Internally used by Display method
SetOption Select the active tab option.
SetTabs Set the array of tabs and option. Default "One", "Two" and
"Three".
SysCommand Behavior when pressing Alt+... combinations
--------------------------------------------------------------------------------
DATAs
--------------------------------------------------------------------------------
nTime time value as a numeric long
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
System Constructor from computer system time
AddHours Adds a specified number of hours.
AddMinutes Adds a specified number of Minutes.
AddSeconds Adds a specified number of Seconds.
cAdd Adds another time and returns the result as a string
cGetTime Retrieves current time as a string.
cSub Returns the difference, as a string, from another time
SysChange Change system time.
--------------------------------------------------------------------------------
Class TTimer
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
bAction The action to be performed on each interval
lActive If the timer is currently active
nId The API identifier of the timer
nInterval The interval of each action in 1/1000 secs
hWndOwner The handle of the window container of the timer
METHODs
--------------------------------------------------------------------------------
New Constructor method
TTimer:New( nInterval, bAction, oWnd )
--------------------------------------------------------------------------------
Class TTxtEdit Ascii files visual editing. Inherits from TControl
--------------------------------------------------------------------------------
DATAs
--------------------------------------------------------------------------------
aLines An array holding all the text lines
aDelLines An array to store the deleted lines
aRDelLines An array where to store the undo actions
nDelLines Max. number of deleted lines to store
nVisLines Number of lines that fit in screen
nLineTop First line visible on screen
lInsert Logical cursor insert mode
lChanged Text has changed
cFileName Name of the related physical filename
cOperators A string with all the operators (i.e.: "+-*/:.,;" )
cSeparators A string with all the separators (i.e.: " " + Chr( 9 ) )
METHODS
--------------------------------------------------------------------------------
New Constructor method
Change Always executed when there is a change in the text
DelBlock Deletes the current marked block
DelCurLine Deletes the current selected line
Delete Response to Del Key
DelLine Deletes any line
DrawLine Draws any line
DrawCurLine Draws the current selected line
Display Shows all the text lines
GoUp Try to go to the previous text line
GoDown Try to go to the next text line
InsLine Insert a text line
Load Loads the text file from disk
nGetTokenColor Retrieves the defined color for a specified token
nLine Index line inside aLines array
Paint Automatically called from inside Display method
SelFile Interactively select a new file to edit
GotFocus Action performed when getting the focus
LostFocus Action performed when losing the focus
KeyChar Action performed when generating a keystroke
KeyDown Action performed when pressing a key
LButtonDown Action performed when left clicking the mouse
GoPrevLine Go to the previous text line
GoNextLine Go to the next text line
GoPrevChar Go to the previous character
GoNextChar Go to the next character
GoBeginLine Go to the beginning of the text line
GoEndLine Go to the end of the text line
GoPrevWord Go to the previous word
--------------------------------------------------------------------------------
Class TTxtFile Ascii files management as objects
--------------------------------------------------------------------------------
DATAs
--------------------------------------------------------------------------------
cLine The latest ascii line read from the file
nTLines The number of lines contained inside the ascii file
nLine Current ascii line number
nMaxLineLength The maximum ascii line size permitted to be read. Default 1024
nOffset The binary position inside the ascii file
METHODs
--------------------------------------------------------------------------------
New Constructor method
Add Adds a new line to the ascii file
AppendLn Adds a new line to the ascii file
Advance Skips to the next ascii line
DelLine Deletes an ascii line
GetValue Retrieves an ascii INI file section and key value
GoTo Jumps to a specific ascii line number
GoTop Jumps to the beginning of the ascii file
GoBottom Jumps to the end of the ascii file
InsLine Insert an ascii line in the current line position
LastRec Returns number of ascii text lines
nRecno Returns the current ascii line number
ReadLine Returns the current ascii line text
ReadLn Returns the current ascii line text
RecCount Returns the number of ascii text lines
RecNo Returns the current ascii line number
RepLine Duplicates the current ascii text line
Rewind Skips to a previous line position
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
DATAs
--------------------------------------------------------------------------------
oMci A reference to a contained MCI Object
cAviFile The name of the associated AVI file.
METHODs
--------------------------------------------------------------------------------
New Constructor from source code
ReDefine Constructor from resources
Init Generic Control initialization method
Play Start playing the AVI file.
--------------------------------------------------------------------------------
Class TWBrowse Inherits from TControl
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
aActions An array of codeblocks actions for clicking header .
lRegistered A CLASSDATA value. See TWindow:lRegistered.
METHODS
--------------------------------------------------------------------------------
New Constructor from source code .
ReDefine Constructor from resources .
SetArray Automatically sets an array to be browsed .
SetTree Automatically sets a tree to be browsed .
lCloseArea Closes the associated area of the browse .
LDblClick Left double click events management .
Default Default initialization .
VertLine Vertical resizing of the columns .
BugUp Corrects the painting when very few records are browsed .
lEditCol Edits a cell of the browse .
GetDlgCode Returns the GetDlgCode associated .
GoUp Goes up one line .
GoDown Goes down one line .
GoLeft Goes left one column .
GoRight Goes right one column .
GoTop Goes to the first element browsed .
GoBottom Goes to the last element browsed .
HandleEvent Specific browses HandleEvent METHOD .
HScroll Horizontal scrollbars events manager .
Init Initialization process .
PageUp Goes up one page .
PageDown Goes down one page .
KeyDown Method to handle WM_KEYDOWN events. .
KeyChar Method to handle WM_CHAR events. .
LButtonDown Left mouse click events manager .
LButtonUp Left mouse releasing events manager .
MouseMove Mouse Movements events manager .
Paint Painting method .
VScroll Vertical scrollbar events manager .
Skip Moves the cursor up or down. .
DrawLine Redraws a specific row without input focus look .
DrawSelect Redraws cursor row with input focus look .
--------------------------------------------------------------------------------
Class TWebServer InterNet WEB pages and Proxy server
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
nPort socket port number
cIPAddress socket IP address
nTimeOut connection timeout value
nBackLog listen backlog value
nSocket socket handle
METHODS
--------------------------------------------------------------------------------
New Constructor from source code.
ReDefine Constructor for resources.
cGetPRG Generates the source code of the button.
New( nPort ) Constructor. nPort specifies the port to use
Accept Constructor. Creates a clone from the listening host socket
End Closes the connection
GetText Retrives the data that arrives to the socket
SenData Sends data throught the socket
Listen Turns the socket into a listening host socket
--------------------------------------------------------------------------------
Class TWindow Main base Class
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
hWnd window handle hWnd
nOldProc Old window procedure when SubClassing
bInit Code Block to execute on initialization
bMoved Code Block to execute after moving the window
bLClicked Code Block to execute when left clicking with the mouse
bKeyDown Code Block to execute when pressing a key
bPainted Code Block to execute when painting the Window
bRClicked Code Block to execute when right clicking with the mouse
bResized Code Block to execute after resizing a Window
bLDblClick Code Block to execute when left double clicking the mouse
bWhen Code Block for WHEN clause
bValid Code Block for VALID clause
bKeyChar Code Block to execute when pressing a no-control key
bMMoved Code Block to execute when moving the mouse
bGotFocus Code Block to execute when receiving the focus
bLostFocus Code Block to execute when losing the focus
cCaption The caption of the Window
cPS Paint structure meanwhile painting
nPaintCount N. of times painting procedure has been invoked
cMsg The text for the default message on the MsgBar
Cargo Standard Clipper general purpose user defined DATA
hDC window Device Context handle while painting
nId Numeric identifier of the Window
METHODS
--------------------------------------------------------------------------------
New Constructor of window class .
Activate Activates a Window .
AddControl Adds a new child control .
BeginPaint It is automatically called before painting .
Box Draws a Box on the Window
.
Capture Capture all the Mouse activity for the Window .
Center Centers the window on the screen .
Command Process a generic command .
Circle Draws a circle .
CoorsUpdate Updates the coordinates of the window .
Copy Places a copy of the window image at the clipboard .
Create Generic new Window Class creation .
CtlColor Set color of control. .
cTitle The caption of the Window .
DdeInitiate Initiate DDE session from the window .
DdeAck Acknowledge DDE. .
DdeExecute Execute DDE command .
DdeTerminate Terminate DDE session .
Destroy() Destroy a window .
Disable Disables the Window .
DrawItem Draw item .
DropFiles Handle files dropped on this window .
Enable Enable Window activity .
End End Activity .
EndPaint Automatically called when ending painting .
EraseBkGnd Erase background of window .
FloodFill Fill area from startpoint with color .
--------------------------------------------------------------------------------
Class TYacc FiveWin YACC Machine
--------------------------------------------------------------------------------
DATA
--------------------------------------------------------------------------------
oLex AS OBJECT TLex object
lDebug AS LOGICAL Debug mode
nErrors AS NUMERIC
nErrFlag AS NUMERIC
nToken AS NUMERIC Last token
nTheState AS NUMERIC Actual state
nState AS NUMERIC INIT 1 Index into aStates
nValue AS NUMERIC INIT 1 Index into aValues
aStates AS ARRAY INIT {}
aLen AS ARRAY N. of rules of each state
aValues AS ARRAY INIT {}
aDefRed AS ARRAY INIT {}
aShift AS ARRAY
aReduce AS ARRAY
aSIndex AS ARRAY Array of shift indexes
aRIndex AS ARRAY Array of reduce indexes
aGIndex AS ARRAY Array of goto indexes
aDGoto AS ARRAY
aTable AS ARRAY
aLHS AS ARRAY Left hand side
aCheck AS ARRAY
aRules AS ARRAY
uLValue Last left value
uValue Last right value
bShift AS BLOCK
bReduce AS BLOCK
METHODS
--------------------------------------------------------------------------------
New Constructor from source code
Parse Starts processing an input stream (file or string)
Shift Shifts to a new state
Reduce Reduces from a state and executes the production rule if
defined
Error Error manager.
ProdValue Returns the value of a production member.
Accept General acceptacion process when parsing is completed.
--------------------------------------------------------------------------------
OBJECTS engine .
--------------------------------------------------------------------------------
OBJECTS Syntax
#include "Objects.ch"
[ EXPORT | PUBLIC ] \
[ PROTECTED | READONLY ] | Scope clauses
[ LOCAL | HIDDEN ] /
ENDCLASS
<TMyClass> Is the name of the new Class we are going to create. It may
not exceed from ten characters.
<DataName> They are the name of the Data elements (instance variables)
we want to have for the Objects of this new Class.
Clauses
--------------------------------------------------------------------------------
SETGET They are for calculated Data. This means we will manipulate
this name of a method like a Data.
BLOCK Extremely fast and easy to code, use this clause when you
want to declare 'inline' methods just from the definition
of the Class. We use a lot of them in FiveWin Classes. You
have to specify as first parameter 'Self'.
Methods codification
--------------------------------------------------------------------------------
return
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
This function add a font resource to the Windows font table. Any
application can then use the font.
Parameters:
Returns:
--------------------------------------------------------------------------------
aGetWorkAreas() Returns an array with all available work areas
--------------------------------------------------------------------------------
Parameters: None.
Returns:
--------------------------------------------------------------------------------
Parameters:
Returns:
Observations Normally all the data that you capture from MsDos
into a DBF is stored as OEM text. In this situation
you may call OemToAnsi() to properly review it from
inside Windows.
Parameters:
Returns:
Observations: None.
--------------------------------------------------------------------------------
Arc() Draws an elliptical arc
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
ASend() Send an OOP message to an array of Objects
--------------------------------------------------------------------------------
local n
Returns: nil
--------------------------------------------------------------------------------
aTreeBmps() Returns an array with the default tree bitmaps
--------------------------------------------------------------------------------
Parameters: None
Returns:
Source code:
See also:
--------------------------------------------------------------------------------
BarAdjust() Adjust the bar to the new dimension of its container
--------------------------------------------------------------------------------
Parameters:
Returns: Nil
See also:
--------------------------------------------------------------------------------
BeginPaint() Prepares a window for start painting
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SOURCE\\CLASSES\\Window.prg
Parameters:
Returns:
--------------------------------------------------------------------------------
Browse() Automatic full featured FiveWin browse
--------------------------------------------------------------------------------
Parameters:
Sample:
USE NAME
See also:
--------------------------------------------------------------------------------
BtnPaint() Paints the contents of a bitmapbutton
--------------------------------------------------------------------------------
Parameters:
<hWnd> The handle of the window which is painting
<hBmpPal1> Special FiveWin handle ( bitmap + palette together )
of the normal bitmap.
<hBmpPal2> Special FiveWin handle ( bitmap + palette together )
of the pressed bitmap.
<lPressed> If the button is being pressed.
<lAdjust> If the bitmap has to be adjusted on the surface.
Returns: Nothing.
--------------------------------------------------------------------------------
BuildCommDCB() Translates a device string into a control block
--------------------------------------------------------------------------------
Parameters:
See also:
--------------------------------------------------------------------------------
CallDll() Calls a function placed into a DLL
Parameters:
--------------------------------------------------------------------------------
CallWindowProc() Passes messages information to a specific procedure
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
cArgV() Retrieves a certain command line parameter
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cCtrl2Chr() Generates a string with the control structure
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
cGetExpression() General build expression DialogBox
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cGetFile() File selection standard DialogBox
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
CloseZipFile() Closes the ZIP file
--------------------------------------------------------------------------------
Parameters None
Returns Nothing.
Sample: SAMPLES\\TestZip.prg
--------------------------------------------------------------------------------
CurDrive() Retrieves the default drive selected letter
Parameters None
Returns
Example
MsgInfo( CurDrive() )
--------------------------------------------------------------------------------
GetHelpFile() Retrieves the default help file selected
--------------------------------------------------------------------------------
Syntax
Parameters
None
Returns
Description
Example
Source: HELP.C
--------------------------------------------------------------------------------
GetHelpTopic() Retrieves the default help Topic
--------------------------------------------------------------------------------
Syntax
GetHelpTopic( [ ncTopic ] )
Parameters
Returns
Nothing
Description
Example
GetHelpTopic( "Use_of_help" )
Source: HELP.C
--------------------------------------------------------------------------------
C2Hex() Converts a byte into a hex string (2 chars) .
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
nFileCrc() Returns a CRC checksum for an entire file contents
--------------------------------------------------------------------------------
Parameters:
Returns:
Parameters:
Returns:
--------------------------------------------------------------------------------
cFileExt() Retrieves the extension from a filename
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cFileMask() Retrieves the mask from a filename if specified
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cFileName() Retrieves the filename without its path
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cFileNoExt() Retrieves the filename without path and extension
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cFileNoPath() Retrieves the filename without path (as cFileName()) .
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cFilePath() Retrieves the path from a filename with path
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cFileSubDir() Retrieves the subdir name from a filename
--------------------------------------------------------------------------------
Parameters:
Returns:
<cDirName> Just the path name specified inside the full filename,
excluding the drive name.
--------------------------------------------------------------------------------
cNewFileName() Retrieves a new filename using a rootname
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cFileNoExt() Retrieves the filename without path and extension
--------------------------------------------------------------------------------
Parameters:
Returns:
Parameters:
Returns:
--------------------------------------------------------------------------------
cFilePath() Retrieves the path from a filename with path
--------------------------------------------------------------------------------
Parameters:
Returns:
<cPath> Just the path name specified inside the full filename.
--------------------------------------------------------------------------------
cFileSubDir() Retrieves the subdir name from a filename
--------------------------------------------------------------------------------
Parameters:
Returns:
<cDirName> Just the path name specified inside the full filename,
excluding the drive name.
--------------------------------------------------------------------------------
cNewFileName() Retrieves a new filename using a rootname
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
cTempFile() Retrieves a temporary new filename
--------------------------------------------------------------------------------
Parameters: None.
Returns:
--------------------------------------------------------------------------------
FSize() Retrieves the size of a filename without opening it
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
ChangeProc() Changes the procedure of a Window
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
Chord() Draws a chord .
--------------------------------------------------------------------------------
Returns:
--------------------------------------------------------------------------------
ChooseColor() Color selection standard DialogBox
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
ChooseFont() Font selection standard DialogBox
--------------------------------------------------------------------------------
Parameters:
#define LF_HEIGHT 1
#define LF_WIDTH 2
#define LF_ESCAPEMENT 3
#define LF_ORIENTATION 4
#define LF_WEIGHT 5
#define LF_ITALIC 6
#define LF_UNDERLINE 7
#define LF_STRIKEOUT 8
#define LF_CHARSET 9
#define LF_OUTPRECISION 10
#define LF_CLIPPRECISION 11
#define LF_QUALITY 12
#define LF_PITCHANDFAMILY 13
#define LF_FACENAME 14
Returns:
--------------------------------------------------------------------------------
ClientToScreen() Converts client coordinates into screen coordinates
--------------------------------------------------------------------------------
Parameters:
? aPoint[ 1 ]
? aPoint[ 2 ]
--------------------------------------------------------------------------------
CloseClipboard() Closes the clipboard
--------------------------------------------------------------------------------
Parameters: None.
Returns:
Parameters:
Returns:
--------------------------------------------------------------------------------
cNtxKey() Returns the index expression of a NTX index file
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
CreateDC() Creates a device context for the given device
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
CreateDlg() Creates a modeless DialogBox from resources
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
CreateDlgIndirect() Creates a modeless DialogBox from memory resources
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
CreateFont() Creates a logical font with specific characteristics
--------------------------------------------------------------------------------
Parameters:
#define LF_HEIGHT 1
#define LF_WIDTH 2
#define LF_ESCAPEMENT 3
#define LF_ORIENTATION 4
#define LF_WEIGHT 5
#define LF_ITALIC 6
#define LF_UNDERLINE 7
#define LF_STRIKEOUT 8
#define LF_CHARSET 9
#define LF_OUTPRECISION 10
#define LF_CLIPPRECISION 11
#define LF_QUALITY 12
Returns:
--------------------------------------------------------------------------------
CreateHatch() Creates a brush with the specified hatched pattern
--------------------------------------------------------------------------------
Parameters:
Value Meaning
Returns:
--------------------------------------------------------------------------------
CreatePattern() Creates a brush with the specified pattern bitmap
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
CreatePen() Creates a pen with the specified style, width & color
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestRpt5.prg
--------------------------------------------------------------------------------
CreateSolidBrush() Creates a brush that has a specified solid color
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
CreateWindow() Creates an overlapped, pop-up or child window
--------------------------------------------------------------------------------
Parameters:
<hWndOwner> The handle of the window owner (if any) of the new
window.
Returns:
--------------------------------------------------------------------------------
CursorArrow() Select the Windows default arrow cursor
--------------------------------------------------------------------------------
Parameters: None.
Returns: Nothing.
Sample: SAMPLES\\TestCurs.prg
--------------------------------------------------------------------------------
CursorCatch() Selects the FiveWin hand catching cursor
--------------------------------------------------------------------------------
Parameters: None.
Returns: Nothing.
Sample: SAMPLES\\TestCurs.prg
--------------------------------------------------------------------------------
CursorHand() Selects the FiveWin hand cursor
--------------------------------------------------------------------------------
Parameters: None.
Returns: Nothing.
Sample: SAMPLES\\TestCurs.prg
--------------------------------------------------------------------------------
CursorIbeam() Selects the Windows default IBeam cursor
--------------------------------------------------------------------------------
Parameters: None.
Returns: Nothing.
Sample: SAMPLES\\TestCurs.prg
--------------------------------------------------------------------------------
CursorSize() Selects the Windows default Size cursor
--------------------------------------------------------------------------------
Parameters: None.
Returns: Nothing.
Sample: SAMPLES\\TestCurs.prg
--------------------------------------------------------------------------------
CursorWait() Selects the Windows default wait cursor
--------------------------------------------------------------------------------
Parameters: None.
Returns: Nothing.
Sample: SAMPLES\\TestCurs.prg
--------------------------------------------------------------------------------
Parameters: None.
Returns: Nothing.
Sample: SAMPLES\\TestCurs.prg
--------------------------------------------------------------------------------
cValToChar() Converts any value into a string
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DDEAck() DDE Acknowledge FiveWin management function
--------------------------------------------------------------------------------
Parameters:
Returns: Nothing.
--------------------------------------------------------------------------------
DDECommand() DDE command FiveWin management function
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DDEGetCommand() DDE GetCommand FiveWin management function
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DDETerminate() DDE Terminate FiveWin management function
--------------------------------------------------------------------------------
Parameters:
Returns: nothing
Observations:
--------------------------------------------------------------------------------
Decrypt() Decrypts a string with an optional key
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DelDbfMdx() Resets the MDX file existence at a DBFMDX Dbf file
--------------------------------------------------------------------------------
Parameters:
<cDbfFileName> The name of the DBF file to reset its MDX flag.
Returns:
--------------------------------------------------------------------------------
DeleteDC() Deletes the given device context
--------------------------------------------------------------------------------
Parameters:
Returns:
Parameters:
Returns:
--------------------------------------------------------------------------------
DestroyCursor() Destroys a cursor created with Create... or Load...
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DestroyWindow() Destroys the specified window
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DialogBox() Creates a modal dialog box from resources
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DialogBoxIndirect() Creates a modal dialog box from memory resources
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DibDraw() FiveWin DIB drawing function
--------------------------------------------------------------------------------
Returns:
--------------------------------------------------------------------------------
DibFromBitmap() Creates a DIB from a bitmap
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DibHeight() Returns the height of a DIB
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DibPalette() Returns the palette handle of a DIB
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
DibRead() Reads a DIB from disk
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DibWidth() Returns the width of a DIB
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
DibWrite() Saves a DIB to disk
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
DPToLP() Converts device coordinates into logical coordinates
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DrawBitmap() FiveWin drawing bitmaps 16 colors function
--------------------------------------------------------------------------------
Parameters:
Returns: Nothing
Sample: SAMPLES\\Install.prg
See also:
--------------------------------------------------------------------------------
DrawIcon() Draws an Icon
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
DrawText() Draws formatted text into a given rectangle
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
Ellipse() Draws an ellipse
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
EmptyClipboard() Empties the clipboard
--------------------------------------------------------------------------------
Parameters: None.
Returns:
--------------------------------------------------------------------------------
EnableWindow() Enables or disables mouse and keyboard activity
--------------------------------------------------------------------------------
Parameters:
Source code:
--------------------------------------------------------------------------------
Encrypt() Encrypts a string with an optional key
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
EndDialog() Finish a modal DialogBox
--------------------------------------------------------------------------------
Parameters:
Returns: Nothing.
--------------------------------------------------------------------------------
EndPage() Ends printing a page
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
EndPaint() Ends painting a window
--------------------------------------------------------------------------------
Parameters:
Returns: Nothing.
--------------------------------------------------------------------------------
ExitWindowsExec() Exit Windows, runs a MsDos program, and restart windows
--------------------------------------------------------------------------------
Parameters:
"/c batfile.bat"
Returns:
--------------------------------------------------------------------------------
ExtractIcon() Retrieves an icon handle from EXE, DLL or ICO
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
ExtTextOut() Writes a character string into a rectangular region
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
FillRect() Fills a given rectangle with a specified brush
--------------------------------------------------------------------------------
Parameters:
Returns: Nothing.
--------------------------------------------------------------------------------
FloodFill() Fills an area of the screen
--------------------------------------------------------------------------------
Returns:
--------------------------------------------------------------------------------
FlushComm() Flushes all characters from transmision or receiving
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestComm.prg
--------------------------------------------------------------------------------
FreeLibrary() Free a DLL library in use or decrements its counter use
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
FWBitmap() Creates the FiveWin own icon-alike bitmap
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
FWBrushes() Creates any of the predefined FiveWin bitmaps
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
__GenGPF() Generates a GPF for testing purpouses
--------------------------------------------------------------------------------
Returns: Nil
Sample: SAMPLES\\TestTool.prg
--------------------------------------------------------------------------------
GetActiveWindow() Retrieves the window handle of the active window
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetASyncKey() Determines whether a key is up or down
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetCapture() Retrieves the window handle that has the mouse captured
--------------------------------------------------------------------------------
Parameters: None.
Returns:
--------------------------------------------------------------------------------
GetCaretPos() Retrieves the current position of the caret
--------------------------------------------------------------------------------
Parameters: None.
Returns:
{ nRow, nCol }
--------------------------------------------------------------------------------
GetClassName() Retrieves the class name of a window
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetClientRect() Retrieves the client coordinates of a window
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetClpData() Retrieves the handle of the current clipboard data
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
GetCommError() Retrieves the most recent comm error value
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestComm.prg
--------------------------------------------------------------------------------
GetCoors() Returns an array with four coordinates values
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetDC() Retrieves the handle of a device context
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetDesktopWindow() Retrieves the handle of the desktop window
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetDeviceCaps() Retrieves device-specific information
--------------------------------------------------------------------------------
Parameters:
Returns:
Value Meaning
Value Meaning
Value Meaning
Value Meaning
Value Meaning
Value Meaning
/* TEXTCAPS */
/* CLIPCAPS */
#define CP_NONE 0x0000
#define CP_RECTANGLE 0x0001
#define CP_REGION 0x0002
/* RASTERCAPS */
#define RC_NONE
#define RC_BITBLT 0x0001
#define RC_BANDING 0x0002
#define RC_SCALING 0x0004
#define RC_BITMAP64 0x0008
#define RC_GDI20_OUTPUT 0x0010
#define RC_GDI20_STATE 0x0020
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetFirstInZip() Retrieves info for the first file in the ZIP file
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestZip.prg
--------------------------------------------------------------------------------
GetDlgItem() Retrieves the handle of a control
--------------------------------------------------------------------------------
Parameters:
Returns:
Source code:
--------------------------------------------------------------------------------
GetFTime() Retrieves the time and date of a file
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetFocus() Retrieves the handle of the window that has focus
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetFontInfo() Retrieves font height, width and bold
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetFreeSpace() Scans the global heap for memory size available
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetInstance() Returns the application handle instance value
--------------------------------------------------------------------------------
Parameters: None.
Returns:
--------------------------------------------------------------------------------
GetKeyStat() Retrieves the state of the specified virtual key
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetLocal() Retrieves any local variable from the stack
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetMapMode() Retrieves the current mapping mode
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetNextInZip() Retrieves info for the next file in the ZIP file
--------------------------------------------------------------------------------
Parameters: None
Returns:
Sample: SAMPLES\\TestZip.prg
--------------------------------------------------------------------------------
GetParam() Retrieves any parameter value from the stack
Parameters:
Returns:
--------------------------------------------------------------------------------
GetParent() Retrieves the window handle of a window parent
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetPixel() Retrieves the RGB color of a pixel
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
GetPrintDC() DialogBox to retrieves the printer device context
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetPrinter() Retrieves the printer device context without DlgBox
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetProcAddress() Retrieves the address of the given module function
--------------------------------------------------------------------------------
Parameters:
#define VOID 0
#define BYTE 1
#define CHAR 2
#define WORD 3
#define _INT 4 // conflicts with Clipper
Int()
#define BOOL 5
#define HDC 6
#define LONG 7
#define STRING 8
#define LPSTR 9
#define PTR 10
#define _DOUBLE 11 // conflicts with BORDER
DOUBLE
Returns:
Sample: SAMPLES\\CallDll.prg
--------------------------------------------------------------------------------
GetProfInt() Retrieves the value of a integer Win.ini file entry
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestIni.prg
--------------------------------------------------------------------------------
GetProfStr() Retrieves the value of a string Win.ini file entry
--------------------------------------------------------------------------------
Returns:
Sample: SAMPLES\\TestIni.prg
--------------------------------------------------------------------------------
GetProp() Retrieves a data handle from the Windows property list
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetPvpProfile() Retrieves the value of a integer private INI file entry
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestIni.prg
--------------------------------------------------------------------------------
GetPvpProfString() Retrieves the value of a string private INI file
--------------------------------------------------------------------------------
Returns:
Sample: SAMPLES\\TestIni.prg
--------------------------------------------------------------------------------
GetStockObject() Retrieves the handle of a predefined stock pens
--------------------------------------------------------------------------------
Parameters:
#define OEM_FIXED_FONT 10
#define ANSI_FIXED_FONT 11
#define ANSI_VAR_FONT 12
#define SYSTEM_FONT 13
#define DEVICE_DEFAULT_FONT 14
#define DEFAULT_PALETTE 15
#define SYSTEM_FIXED_FONT 16
#define WHITE_PEN 6
#define BLACK_PEN 7
#define NULL_PEN 8
Returns:
--------------------------------------------------------------------------------
GetSysDir() Retrieves the Windows system directory path
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetTextHeight() Retrieves the height of a selected font
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetTextWidth() Retrieves the width of a selected font
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetVersion() Retrieves the Windows and MsDos versions numbers
--------------------------------------------------------------------------------
Parameters: None
Returns:
Sample: SOURCE\\FUNCTION\\ErrorSysW.prg
--------------------------------------------------------------------------------
GetWinDir() Retrieves the Windows directory path
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetWindow() Retrieves the handle of a window
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetWindowText() Retrieves the window associated text
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetWindowWord() Retrieves a word value at the specified offset
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GetWndApp() Returns the FiveWin main application window object
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetWndFrame() Returns the FiveWin main frame application window
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
GetWndRect() Retrieves the window all area coordinates
--------------------------------------------------------------------------------
Parameters:
Returns:
Parameters:
Returns:
--------------------------------------------------------------------------------
GlobalAddAtom() Adds a string to the Windows atom table system
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
GlobalFree() Frees the given global memory object
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
HelpIndex() Shows the default help file index
--------------------------------------------------------------------------------
Syntax
HelpIndex()
Parameters
None
Returns
Nothing
Description
HelpIndex() Shows the main index of the default selected Help file.
Source: SOURCE\\WINAPI\\HELP.C
--------------------------------------------------------------------------------
HelpPopup() Shows the context popup help
--------------------------------------------------------------------------------
Syntax
HelpPopup()
Parameters
None
Returns
Nothing
Description
HelpPopup() Shows the help context popup of the selected help file.
Source: SOURCE\\WINAPI\\HELP.C
--------------------------------------------------------------------------------
HelpSearch() Search DialogBox in the default Help file
-------------------------------------------------------------------------------
-
Syntax
HelpSearch( [ cString ] )
Returns
Nothing
Description
Example
HelpSearch( "Hello" )
Source: HELP.C
--------------------------------------------------------------------------------
HelpSetPos() Changes the position of the WinHelp Window
-------------------------------------------------------------------------------
-
Syntax
Parameters
Returns
Nothing.
Description
Example
Source: HELP.C
--------------------------------------------------------------------------------
HelpSetTopic() Selects a help default topic
-------------------------------------------------------------------------------
-
Syntax
HelpSetTopic( cTopic )
Parameters
Returns
Nothing
Description
Example
HelpSetTopic( "Use_of_help" )
Source: HELP.C
--------------------------------------------------------------------------------
HelpTopic() Reviews a Topic
--------------------------------------------------------------------------------
Syntax
HelpTopic( [ ncTopic ] )
Parameters
Returns
None.
Description
Example
HelpTopic( "Use_of_help" )
Source: HELP.C
--------------------------------------------------------------------------------
I2Hex() Converts a word (2 bytes) into a hex string (4 chars)
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
InportByte() Reads a byte from a hardware port
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
InportWord() Reads a word (2 bytes) from a hardware port
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
InterruptRegister() Installs a user defined GPFs controller
--------------------------------------------------------------------------------
Parameters:
Sample: SAMPLES\\TestTool.prg
--------------------------------------------------------------------------------
InterruptUnRegister() Uninstalls a user defined GPFs controller
--------------------------------------------------------------------------------
Parameters: None.
Returns:
Sample: SAMPLES\\TestTool.prg
--------------------------------------------------------------------------------
InvalidateRect() Forces a rectangle to be repainted
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
InvertRect() Inverts the colors of a window rectangle
--------------------------------------------------------------------------------
Parameters:
Returns: nil.
--------------------------------------------------------------------------------
IsCdRom() Checks if a drive is a CdRom
--------------------------------------------------------------------------------
Parameters:
Returns:
See SAMPLES\\TestDrvs.prg
--------------------------------------------------------------------------------
IsDiskette() Checks if a drive is a floppy disk
--------------------------------------------------------------------------------
Parameters:
Returns:
See SAMPLES\\TestDrvs.prg
--------------------------------------------------------------------------------
IsIconic() Checks if a window is iconized
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
IsZip() Checks a valid ZIP file
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestZip.prg
Parameters:
Returns:
--------------------------------------------------------------------------------
IsWindow() Checks if a window handle is valid
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
IsWindowVisible() Checks if a window is visible
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
KillTimer() Removes the specified timer
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestTime.prg
--------------------------------------------------------------------------------
L2Hex() Converts a long (4 bytes) into a hex string (8 chars)
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
lAnd() Retrieves the logical AND of some numeric values
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
LbxGetItem() Retrieves an item of a listbox
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
lChDir() Changes from one directory to another
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
lIsDir() Checks the existence of a directory
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
lMkDir() Creates a new directory
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
LineTo() Draws a line from the current position up to another
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
LoadBitmap() Load the specified resource bitmap
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
LoadCursor() Load the specified resource cursor
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
LoadIcon() Load the specified resource icon
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\Install.prg
--------------------------------------------------------------------------------
LoadLibrary() Load a Dynamic link library to use it
--------------------------------------------------------------------------------
Parameters:
Returns:
The return value is the instance handle of the loaded library module if the
function is successful. Otherwise, it is an error value less than
HINSTANCE_ERROR.
Errors
Value Meaning
Comments
LoadLibrary increments the reference count for a library module each time
an application calls the function. When it has finished using the module, the
application should use the FreeLibrary function to decrement (decrease by one)
the reference count.
--------------------------------------------------------------------------------
LoadString() Load the specified resource string
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
LPToDP() Converts logical coordinates into device coordinates
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
lSaveObject() Saves an object/array to disk
--------------------------------------------------------------------------------
Parameters:
<nOpenMode> Is the DOS File mode in which the file shall be opened.
The default value is FO_WRITE and FO_COMPAT
--------------------------------------------------------------------------------
lWRunning() Checks if the main FiveWin events-looping is working
--------------------------------------------------------------------------------
Parameters: None
Returns:
--------------------------------------------------------------------------------
LZCopyFile() Copy and expands a Windows compressed file
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\Install.prg
--------------------------------------------------------------------------------
MapDialogRect() Converts dialogbox units into screen units (pixels)
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
MakeIntResource() Converts an integer resource ID in a Windows format
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
MeasureItem() FiveWin function to dispatch WM_MEASUREITEM msgs
--------------------------------------------------------------------------------
Parameters:
--------------------------------------------------------------------------------
MemStat() Returns a Dialog with all memory values
--------------------------------------------------------------------------------
Parameters: None
Returns: nil
Sample: SAMPLES\\Memory.prg
--------------------------------------------------------------------------------
MenuAddItem() Adds a menuitem to a menu. Internally used.
--------------------------------------------------------------------------------
Parameters:
Sample: SAMPLES\\TestMenu.prg
--------------------------------------------------------------------------------
MenuBegin() Begins a new menu definition. Internally used.
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestMenu.prg
--------------------------------------------------------------------------------
MenuEnd() Ends a menu definition. Internally used.
--------------------------------------------------------------------------------
Parameters: None
Returns:
Sample: SAMPLES\\TestMenu.prg
--------------------------------------------------------------------------------
MessageBeep() Plays a system alert level waveform sound or a tone
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
MessageBox() Creates, displays and operates a MessageBox window
--------------------------------------------------------------------------------
Parameters:
Value Meaning
Value Meaning
#define IDOK 1
#define IDCANCEL 2
#define IDABORT 3
#define IDRETRY 4
#define IDIGNORE 5
#define IDYES 6
#define IDNO 7
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
MeterPaint() Paints the FiveWin meter
--------------------------------------------------------------------------------
Parameters:
Returns: Always 0
Sample: SAMPLES\\Install.prg
Parameters:
Returns:
Sample: SAMPLES\\Lines.prg
--------------------------------------------------------------------------------
MoveWindow() Changes the position /and dimensions of a window
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
MsgAbout() MessageBox about style
--------------------------------------------------------------------------------
Parameters:
Returns: nil
MyApp.rc
1 ICON "MyApp.ico"
and then:
rc -K MyApp.rc MyApp.exe
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
MsgAlert() MessageBox alert style
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: SAMPLES\\TestMsg.prg
Parameters: None
Returns: nil
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
MsgGet() General one-line input message
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestMsg.prg
Parameters:
Returns: nil
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
MsgLogo() Shows a floating logo, typically used at start
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: IDE\\Ide.exe
--------------------------------------------------------------------------------
MsgMeter() General meter progress dialog
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: SAMPLES\\TestMMt.prg
--------------------------------------------------------------------------------
MsgPaint() FiveWin MessageBar painting function
--------------------------------------------------------------------------------
Returns: nil
--------------------------------------------------------------------------------
MsgRun() Shows a DialogBox with a msg and executes an action
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
MsgStop() MessageBox stop style
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
MsgToolBar() General Tool-bar style Dialog
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
MsgWait() Shows a DialogBox with a msg and waits some time
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
MsgNoYes() MessageBox YesNo style with default No .
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
MsgYesNo() MessageBox YesNo style
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
nAnd() Generates a numeric AND value from some numbers
--------------------------------------------------------------------------------
Parameters:
Returns:
1 AND 1 = 1
// 15 = '00001111'
// 2 = '00000010'
//================
// 2 = '00000010'
--------------------------------------------------------------------------------
nArgC() Returns the number of the command line parameters
--------------------------------------------------------------------------------
Parameters: None
Returns:
Sample: SAMPLES\\TestArgs.prg
--------------------------------------------------------------------------------
nColorToN() Returns the numeric color equivalent of an xBase color
--------------------------------------------------------------------------------
Parameters:
Returns:
Parameters:
Returns:
--------------------------------------------------------------------------------
nGetFileFilter() Returns the FileSelect DialogBox selected type
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: IDE\\Ide.prg
--------------------------------------------------------------------------------
nGetBackRgb() Returns the numeric value of an xBase back color
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
nGetForeRGB() Returns the numeric value of an xBase fore color
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
nIcons() Returns the number of icons
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: IDE\\SOURCE\\Icons.prg
--------------------------------------------------------------------------------
nOr() Generates a numeric OR value from some numbers
--------------------------------------------------------------------------------
Parameters:
Returns:
1 OR 1 = 1
1 OR 0 = 1
0 OR 1 = 1
0 OR 0 = 0
// 15 = '00001111'
// 2 = '00000010'
//================
// 15 = '00001111'
--------------------------------------------------------------------------------
nRandom() Generates a random number
--------------------------------------------------------------------------------
Parameters:
Returns:
Parameters:
Returns:
--------------------------------------------------------------------------------
nStrHash() Returns a unique hash value for a string
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample:
--------------------------------------------------------------------------------
nWRow() Returns a certain row number of a window
--------------------------------------------------------------------------------
Returns:
--------------------------------------------------------------------------------
NextDlgTabItem() Retrieves the handle of the next WS_TABSTOP control
--------------------------------------------------------------------------------
Parameters:
Returns:
Parameters:
Returns:
--------------------------------------------------------------------------------
nHiWord() Returns the HiWord of a long (four bytes)
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
nLoByte() Returns the Low byte of a word (two bytes)
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
nLoWord() Returns the Low word of a long (four bytes)
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
nMakeLong() Generates a long (4bytes) from two words (2bytes)
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
nMsgBox() Generic MessageBox quick access
--------------------------------------------------------------------------------
Returns:
Sample: SAMPLES\\TestMsg.prg
--------------------------------------------------------------------------------
NtxPos() Retrieves the relative index position of a record
--------------------------------------------------------------------------------
Parameters:
Returns:
SEEK <Expression>
if Found()
<oBrowse>:oVScroll:SetPos( ;
NtxPos( IndexOrd(), RecNo() ) )
endif
Parameters:
Returns:
--------------------------------------------------------------------------------
OemToAnsi() Translates a OEM MsDos string into a Windows string
--------------------------------------------------------------------------------
Parameters:
Returns:
Obervations Normally all the data that you capture from MsDos
into a DBF is stored as OEM text. In this situation
you may call OemToAnsi() to properly review it from
inside Windows.
--------------------------------------------------------------------------------
OpenClipboard() Open the Windows clipboard to start using it
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestClip.prg
--------------------------------------------------------------------------------
OpenComm() Open the communication port to start using it
--------------------------------------------------------------------------------
Parameters:
Returns:
Value Meaning
Sample: SAMPLES\\TestComm.prg
--------------------------------------------------------------------------------
OutportByte() Sends a byte to a hardware port
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
OutportWord() Sends a word (2 bytes) to a hardware port
--------------------------------------------------------------------------------
Parameters:
Returns: nil.
--------------------------------------------------------------------------------
OutputDebugString() Displays a debugging msg at Microsoft dbwin.exe
--------------------------------------------------------------------------------
Parameters:
Returns: nil.
--------------------------------------------------------------------------------
OSend() Generic messages Object sending function
--------------------------------------------------------------------------------
Parameters:
Returns:
<oObj>:XXX
--------------------------------------------------------------------------------
Paint3D() Displays text with 3D look
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
PalBmpDraw() Displays a FiveWin combined bitmap and palette handle
--------------------------------------------------------------------------------
Parameters:
PalBmpFree( <hPalBmp> )
Code Description
Values
Returns: Nothing
--------------------------------------------------------------------------------
ParamCount() Returns the number of parameters of a process
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
PeekMessage() Extract a message from the message queue
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
Pie() Draws a graphic pie
--------------------------------------------------------------------------------
Parameters
Returns
Comments The center of the arc drawn by the Pie function is the
Sample: SAMPLES\\TestPie.prg
--------------------------------------------------------------------------------
PolyPolygon() Draws several polygons
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
PostMessage() Places a message at the end of the queue
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
PostQuitMessage() Generic finishing application function
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
ReadBitmap() Reads a bitmap from disk
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\FwBrow.prg
--------------------------------------------------------------------------------
ReadComm() Read the contents of the communication port
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestComm.prg
--------------------------------------------------------------------------------
Rectangle() Draws a graphic rectangle
--------------------------------------------------------------------------------
Returns:
--------------------------------------------------------------------------------
RegisterClass() Register a new Windows class
--------------------------------------------------------------------------------
Value Meaning
Returns:
--------------------------------------------------------------------------------
ReleaseCapture() Let the other applications use the mouse
--------------------------------------------------------------------------------
Returns: nil
Sample: SAMPLES\\NewHelp.prg
--------------------------------------------------------------------------------
ReleaseDC() Finish using a device context
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
RemoveFont() Removes a font from the available fonts list
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
RemoveProp() Removes a previous stored window prop
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
Report() Generic FiveWin automatic-reporting function
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: SAMPLES\\FwBrow.prg
--------------------------------------------------------------------------------
RestProc() Restores a window procedure -internally used-
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
Say3D() Displays a 3D look text
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Parameters:
? aPoint[ 1 ]
? aPoint[ 2 ]
--------------------------------------------------------------------------------
ScrollWindow() Scroll a region of a window
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
SelectObject() Select a GDI object to be used in a device context
--------------------------------------------------------------------------------
Returns:
Sample: SAMPLES\\Lines.prg
--------------------------------------------------------------------------------
SendMessage() Sends a Windows message to a window
--------------------------------------------------------------------------------
Returns:
Sample: SAMPLES\\EndApp.prg
--------------------------------------------------------------------------------
SetActiveWindow() Changes the current active window
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
SetBlackPen() Selects the black pen for painting
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
SetClipboardData() Places some data at the clipboard
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestClip.prg
--------------------------------------------------------------------------------
SetIdleAction() Set/removes the FiveWin background process
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
SetWhitePen() Selects the white pen for painting
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
SetCapture() Captures all the mouse activity for a window
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\NewHelp.prg
Parameters:
Value Meaning
Returns:
--------------------------------------------------------------------------------
SetClpData() Changes the contents of the clipboard
--------------------------------------------------------------------------------
Parameters:
Sample: SAMPLES\\TestClip.prg
--------------------------------------------------------------------------------
SetCommState() Selects the state of the communication port
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestComm.prg
--------------------------------------------------------------------------------
SetCursor() Changes the Windows active cursor
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestCurs.prg
--------------------------------------------------------------------------------
SetDate() Changes the date of the system
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestDate.prg
--------------------------------------------------------------------------------
SetDeskWallPaper() Changes the desktop bitmap
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\FwBrow.prg
--------------------------------------------------------------------------------
SetFDate() Set a different time and date for a file
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
SetFocus() Selects a window as focused
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
SetHandleCount() Changes the maximum number of available files
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\AutoLay.prg
--------------------------------------------------------------------------------
SetHelpFile() Selects the default Help File
-------------------------------------------------------------------------------
-
Sintax
SetHelpFile( cHelpFile )
Parameters
Returns
Nothing
Description
Example
SetHelpFile( "FiveWin.hlp" )
Source: HELP.C
Parameters:
Value Meaning
Returns:
--------------------------------------------------------------------------------
SetParent() Changes the parent of a window
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestFold.prg
--------------------------------------------------------------------------------
SetPixel() Draws a pixel
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
SetProp() Store a window property in the Windows prop list
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
SetTextAlign() Selects the kind of text aligment
--------------------------------------------------------------------------------
Parameters:
Value Meaning
Value Meaning
Value Meaning
--------------------------------------------------------------------------------
SetTime() Changes the time of the system
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestDate.prg
--------------------------------------------------------------------------------
SetTimer() Installs a system timer
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestTime.prg
Parameters:
Returns:
MM_HIENGLISH
MM_HIMETRIC
MM_LOENGLISH
MM_LOMETRIC
MM_TEXT
MM_TWIPS
--------------------------------------------------------------------------------
SetWindowExt() Sets the X and Y extents of a device context
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
SetWindowOrigin() Changes the window origin of the DC of a window
-------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
SetWindowPos() Changes the position of a Window
--------------------------------------------------------------------------------
Value Meaning
Value Meaning
Returns:
Sample: SAMPLES\\TestTop.prg
--------------------------------------------------------------------------------
SetWindowText() Changes the caption of a Window
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
ShellAbout() Displays the typical Windows about DialogBox
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: SAMPLES\\Install.prg
--------------------------------------------------------------------------------
ShowWindow() Make the window show on the screen
--------------------------------------------------------------------------------
Parameters:
Value Meaning
#define SW_HIDE 0
#define SW_SHOWNORMAL 1
#define SW_NORMAL 1
#define SW_SHOWMINIMIZED 2
#define SW_SHOWMAXIMIZED 3
#define SW_MAXIMIZE 3
#define SW_SHOWNOACTIVATE 4
#define SW_SHOW 5
#define SW_MINIMIZE 6
#define SW_SHOWMINNOACTIVE 7
#define SW_SHOWNA 8
#define SW_RESTORE 9
Returns:
--------------------------------------------------------------------------------
SndPlaySound() Plays a WAV sound file from resources
--------------------------------------------------------------------------------
Parameters:
MyApp.rc
or
#define SND_SYNC 0
#define SND_ASYNC 1
#define SND_NODEFAULT 2
#define SND_MEMORY 4
#define SND_LOOP 8
#define SND_NOSTOP 16
Returns:
Sample: SAMPLES\\Lolo.prg
--------------------------------------------------------------------------------
SndPlaySound() Plays a WAV sound file
--------------------------------------------------------------------------------
#define SND_SYNC 0
#define SND_ASYNC 1
#define SND_NODEFAULT 2
#define SND_MEMORY 4
#define SND_LOOP 8
#define SND_NOSTOP 16
Returns:
Sample: SAMPLES\\TestBmp2.prg
--------------------------------------------------------------------------------
StartDoc() Start generating a new printing document
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
StartPage() Start prinitng a new page
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
nStrCrc() Returns a CRC checksum for a text
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
StrToken() Returns a token from a string
Parameters:
Returns:
Sample: SAMPLES\\DbfBuild.prg
--------------------------------------------------------------------------------
SysRefresh() Lets Windows process all pending messages
--------------------------------------------------------------------------------
Parameters: None.
Returns:
Sample: SAMPLES\\TestMMT.prg
Parameters:
Returns: nil
--------------------------------------------------------------------------------
TextOut() Draws text to a specified location
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
TimerCount() Returns the ellapsed time since the app started
--------------------------------------------------------------------------------
Parameters: None
Returns:
Samples: SAMPLES\\TestTool.prg
--------------------------------------------------------------------------------
TreeBegin() FiveWin trees function support
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: IDE\\SOURCE\\Menu.prg
--------------------------------------------------------------------------------
_TreeItem() FiveWin trees function support
--------------------------------------------------------------------------------
Returns:
Sample: IDE\\SOURCE\\Menu.prg
--------------------------------------------------------------------------------
TreeEnd() FiveWin trees function support
-------------------------------------------------------------------------------
Parameters: None
Returns: nil
Sample: IDE\\SOURCE\\Menu.prg
--------------------------------------------------------------------------------
uCharToVal() Converts any value into a character string
--------------------------------------------------------------------------------
Parameters:
Returns:
Parameters:
Returns:
extern TWindow
--------------------------------------------------------------------------------
UnZipFile() UnZips a file from the ZIP file
--------------------------------------------------------------------------------
Parameters:
Returns:
#define ZIP_OK 0
#define ZIP_FILEERROR -1
#define ZIP_INTERNALERROR -2
#define ZIP_NOMOREITEMS 1
Sample: SAMPLES\\TestZip.prg
--------------------------------------------------------------------------------
UpdateWindow() Updates the client area of a window
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: SOURCE\\CLASSES\\Window.prg
--------------------------------------------------------------------------------
uValBlank() Returns the correspondent blank value of any variable
--------------------------------------------------------------------------------
Parameters:
Returns:
--------------------------------------------------------------------------------
WaitRun() Executes another Windows application and waits
--------------------------------------------------------------------------------
Returns:
Sample: SAMPLES\\FwBrow.prg
--------------------------------------------------------------------------------
WBrwScroll() Scroll some text lines in a window
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
WindowFromPoint() Retrieves the window which is at certain position
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\NewHelp.prg
--------------------------------------------------------------------------------
WinExec() Executes another Windows application
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\FwBrow.prg
--------------------------------------------------------------------------------
WinHelp() Activates Windows WinHelp program
--------------------------------------------------------------------------------
Sintax
Parameters
Descrption
Code: SOURCE\\WINAPI\\Help.c
--------------------------------------------------------------------------------
WndBox() Draws a box around
--------------------------------------------------------------------------------
Parameters:
Returns: Nil
Sample: SAMPLES\\ToolTip.prg
--------------------------------------------------------------------------------
WndBoxIn() Draws a inset 3D box
--------------------------------------------------------------------------------
Parameters:
Returns: Nil
Sample: SAMPLES\\ToolTip.prg
--------------------------------------------------------------------------------
WndBoxRaised() Draws a box raised
--------------------------------------------------------------------------------
Parameters:
Returns: Nil
Sample: SAMPLES\\ToolTip.prg
--------------------------------------------------------------------------------
WndCenter() Centers a window on the screen
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
WndCopy() Copy a window image to the clipboard
--------------------------------------------------------------------------------
Parameters:
Returns: nil
--------------------------------------------------------------------------------
WndPrint() Prints the image of a window
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Parameters:
Returns: nil
--------------------------------------------------------------------------------
WNetBrowse() Shows a DialogBox to browse resources in a Net
--------------------------------------------------------------------------------
Parameters:
#define TYPE_DRIVE 1
#define TYPE_FILE 2
#define TYPE_PRINTER 3
#define TYPE_COMM 4
Returns:
<nRetCode>
Sample: SAMPLES\\TestNet.prg
--------------------------------------------------------------------------------
WNetError() Retrieves the latest Net error
--------------------------------------------------------------------------------
Parameters: None.
Returns:
Sample: SAMPLES\\TestNet.prg
--------------------------------------------------------------------------------
WNetGetUser() Retrieves the actual local Net user
--------------------------------------------------------------------------------
Parameters: None
Returns:
Sample: SAMPLES\\TestNet.prg
--------------------------------------------------------------------------------
WritePProString() Writes an entry in a private INI file
--------------------------------------------------------------------------------
Returns:
Sample: SAMPLES\\TestIni.prg
--------------------------------------------------------------------------------
WriteProfString() Writes an entry in WIN.INI public file
--------------------------------------------------------------------------------
Returns:
Sample: SAMPLES\\TestIni.prg
--------------------------------------------------------------------------------
WQOut() FiveWin QOut() replacement
--------------------------------------------------------------------------------
Parameters:
Returns: nil
Sample: SAMPLES\\TestBVbx.prg
--------------------------------------------------------------------------------
WriteComm() Writes to the communication port
--------------------------------------------------------------------------------
Parameters:
Returns:
Sample: SAMPLES\\TestComm.prg
Parameters:
Returns: nil
Sample: SOURCE\\CLASSES\\WBrowse.prg
--------------------------------------------------------------------------------
xPadL() Left fills a string up to a certain pixel dimension
--------------------------------------------------------------------------------
Parameters:
Sample: SOURCE\\CLASSES\\WBrowse.prg
--------------------------------------------------------------------------------
xPadC() Center fills a string up to a certain pixel
--------------------------------------------------------------------------------
Parameters:
Sample: SOURCE\\CLASSES\\WBrowse.prg
--------------------------------------------------------------------------------
xPadR() Right fills a string up to a certain pixel dimension
--------------------------------------------------------------------------------
Parameters:
Sample: SOURCE\\CLASSES\\WBrowse.prg
--------------------------------------------------------------------------------
FiveWin Functions - classified by cathegory
--------------------------------------------------------------------------------
Clipboard
OpenClipboard() Open the Windows clipboard before use .
CloseClipboard() Closes the clipboard .
SetClpData() Places data at the clipboard .
GetClpData() Retrieves the handle of the current clipboard data .
EmptyClipboard() Empties the clipboard .
Color
ChooseColor() Color selection standard DialogBox .
nColorToN() Convert color string to DOS color number .
nRGB() Generates a RGB value .
nGetForeRGB() Returns the RGB Fore value of a color string .
Communications
OpenComm() Open the communication port before use .
CloseComm() Closes the communication device and frees memory .
ReadComm() Read the contents of the communication port .
FlushComm() Flushes all characters from transmision or receiving .
GetCommError() Retrieves the most recent comm error value .
BuildCommDCB() Translates a device string into a control block .
WriteComm() Writes to the communication port .
EnableCommNotification() Enables the automatic notification of msgs .
Date / Time
SetDate() Changes the date of the system .
SetTime() Changes the time of the system .
Debugging facilities
LogFile() Saves information to a log file .
OutputDebugString() Displays a debugging msg at Microsoft dbwin.exe .
WinInspect() Sets a codeblock to eval on each Windows API msg .
DialogBoxes
CreateDlg() Creates a modeless DialogBox from resources .
CreateDlgIndirect() Creates a modeless DialogBox from memory resources .
DialogBox() Creates a modal dialog box from resources .
DialogBoxIndirect() Creates a modal dialog box from memory resources .
EndDialog() Closes a modal DialogBox and frees resources .
GetDialogBaseUnits() Returns the DialogBox base units used to create it .
GetDlgItem() Retrieves the handle of a control .
MapDialogRect() Converts dialogbox units into screen units (pixels) .
nDlgBox() Automatic DialogBox testing function. .
Directories maintenance
CurDrive() Returns the current selected drive as a letter A,B,C..
aDrives() Returns an array with all the valid drives ids .
IsCdRom() Checks if a drive is a CdRom .
IsDiskette() Checks if a drive is a floppy disk .
lChDir() Changes from one directory to another .
lIsDir() Checks the existence of a directory .
lMkDir() Creates a new directory .
lRmDir() Removes a directory .
GetWinDir() Retrieves the Windows directory path .
GetSysDir() Retrieves the Windows system directory path .
DLLs
LoadLibrary() Load a Dynamic link library to use it .
FreeLibrary() Free a DLL library in use or decrements its counter use
GetProcAddress() Retrieves the address of the given module function .
CallDll() Calls a function placed into a DLL .
Drawing
Arc() Draws an elliptical arc .
Chord() Draws a chord .
Ellipse() Draws an ellipse .
Files management
cFileDisk() Retrieves the drive from a filename with path .
cFileExt() Retrieves the extension from a filename .
cFileMask() Retrieves the mask from a filename if specified .
cFileName() Retrieves the filename without its path .
cFileNoExt() Retrieves the filename without path and extension .
cFileNoPath() Retrieves the filename without path (as cFileName()) .
cFilePath() Retrieves the path from a filename with path .
cFileSubDir() Retrieves the subdir name from a filename .
cNewFileName() Retrieves a new filename using a rootname .
cTempFile() Retrieves a temporary new filename .
FSize() Retrieves the size of a filename without opening it .
LzCopyFile() Copies and expands a Windows compressed file .
GetFTime() Retrieves the time and date of a file .
SetFTime() Set a different time and date for a file .
SetHandleCount() Increases the max number of files to open .
Icons
nIcons() Returns the number of icons .
LoadIcon() Load the specified resource icon .
ExtractIcon() Retrieves an icon handle from EXE, DLL or ICO .
DrawIcon() Draws an Icon .
INI Files
GetProfInt() Retrieves the value of a integer Win.ini file entry .
GetProfStr() Retrieves the value of a string Win.ini file entry .
GetPvpProfile() Retrieves the value of a integer private INI file entry
GetPvpProfString() Retrieves the value of a string private INI file .
WriteProfS() Writes an entry in WIN.INI public file .
WritePProString() Writes an entry in a private INI file .
Keyboard
GetASyncKeyState() Returns whether a key is up or down .
Memory/Variables use
MemMax() Returns the highest dynamic memory consumed .
MemUsed() Returns the actual dynamic memory consumed .
nStatics() Returns the total number of statics variables .
Static() Returns any static variable of the application .
GetLocal() Retrieves any local variable from the stack .
GetParam() Retrieves any parameter value from the stack .
nFreeStack() Returns the remaining Clipper stack available .
Mouse
SetCapture() Captures all the mouse activity for a window .
ReleaseCapture() Let the other applications use the mouse .
GetCapture() Retrieves the window handle that has the mouse captured
Numeric manipulation
B2Bin() Converts a byte into a string 1 byte len .
C2Hex() Converts a byte into a hex string (2 chars) .
D2Bin() Converts a float into a string 8 bytes len .
I2Hex() Converts a word (2 bytes) into a hex string (4 chars).
L2Hex() Converts a long (4 bytes) into a hex string (8 chars).
lAnd() Retrieves the logical AND of some numeric values .
nAnd() Generates a numeric AND value from some numbers .
nOr() Generates a numeric OR value from some numbers .
nHiByte() Returns the High Byte of a word (two bytes) .
nLoByte() Returns the Low byte of a word (two bytes) .
nHiWord() Returns the HiWord of a long (four bytes) .
nLoWord() Returns the Low word of a long (four bytes) .
nMakeLong() Generates a long (4bytes) from two words (2bytes) .
MakeIntResource() Converts an integer resource ID in a Windows format .
nStrHash() Returns a hasing algorithm on a string .
nRandom() Generates a random number .
OemAnsi
AnsiToOem() Windows string to OEM conversion .
IsAnsi() Is it an ansi string .
IsOem() Is it an oem string .
OemToAnsi() OEM string to Windows string .
OOPS
aOData() Returns an array with all an Object Class DATA names .
OClone() Retrieves a duplicated Clipper object .
OSend() Generic messages Object sending function .
ASend() Generic messages array of Objects sending function .
lSaveObject() Saves an object to disk .
uLoadObject() Restores an object from disk .
lSaveVar() Saves an array to disk .
uLoadVar() Restores an array from disk .
Security/Copy Protection
nStrCRC() Returns the checksum of a text .
nFileCRC() Returns the checksum of a file .
Encrypt() Encrypts a text with an optional key .
Sound
MessageBeep() Plays a system alert level waveform sound or a tone .
MsgBeep() MessageBeep beep tone .
SndPlaySound() Plays a WAV sound file .
SndPlayRes() Plays a WAV sound file from resources .
Strings
cValToChar() Converts any value into a string .
OemToAnsi() Translates a OEM MsDos string into a Windows string .
AnsiToOem() Translates a Window string into the OEM MsDos .
xPadL() Left fills a string up to a certain pixel dimension .
xPadC() Center fills a string up to a certain pixel " .
xPadR() Right fills a string up to a certain pixel dimension .
B2Bin() Converts a byte into a string 1 byte len .
StrCapFirst() Uppercase first char and lowercase the rest .
StrChar() Extract a single char from a string .
StrToken() Extract a token from inside a string .
System
InportByte() Reads a byte from a hardware port .
InportWord() Reads a word from a hardware port .
nPeekByte() Reads a memory byte .
nPeekWord() Reads a memory word .
nPokeByte() Writes a memory byte .
nPokeWord() Writes a memory word .
OutportByte() Sends a byte to a hardware port .
OutportWord() Sends a word to a hardware port .
SysRefresh() Let Windows system process pending messsages .
GetTasks() Returns an array with all active tasks names .
IsWinNT() Checks for Windows NT .
Timers
SetTimer() Installs a system timer .
KillTimer() Removes the specified timer .
--------------------------------------------------------------------------------
Colors.ch Color constants definitions
--------------------------------------------------------------------------------
// FiveWin Graphical Enviroments RGB colors management
#ifndef _COLORS_CH
#define _COLORS_CH
//----------------------------------------------------------------------------//
// Low Intensity colors
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// High Intensity Colors
//----------------------------------------------------------------------------//
#endif
--------------------------------------------------------------------------------
Constant.ch Text to Graphics constants definitions
--------------------------------------------------------------------------------
#ifndef _CONSTANT_CH
#define _CONSTANT_CH
//----------------------------------------------------------------------------//
// FiveWin MsDos-Text coordinates simulation values
//----------------------------------------------------------------------------//
// Group
#define GRP_CHARPIX_H 14 // height of a char in pixels
#define GRP_CHARPIX_W 7 // width of a char in pixels
// Bitmaps
#define BMP_CHARPIX_H 14
#define BMP_CHARPIX_W 8
// ComboBox
#define CMB_CHARPIX_H 14
#define CMB_CHARPIX_W 8
// Dialog
#define DLG_CHARPIX_H 15.1
#define DLG_CHARPIX_W 7.9
// Get
#define GET_CHARPIX_H 13
#define GET_CHARPIX_W 8
// Icon
#define ICO_CHARPIX_H 14
#define ICO_CHARPIX_W 8
// ListBox
#define LST_CHARPIX_H 14
#define LST_CHARPIX_W 8
// MdiChild
#define MDIC_CHARPIX_H 16
#define MDIC_CHARPIX_W 8
// MdiFrame
#define MDIF_CHARPIX_H 16
#define MDIF_CHARPIX_W 8
// Meter
#define MTR_CHARPIX_H 14
#define MTR_CHARPIX_W 8
// MGet
#define MGET_CHARPIX_H 13
#define MGET_CHARPIX_W 8
// Radio
#define RAD_CHARPIX_H 13
#define RAD_CHARPIX_W 7
// Say
#define SAY_CHARPIX_H 13
#define SAY_CHARPIX_W 8
// Scrollbar
#define SCRL_CHARPIX_H 14
#define SCRL_CHARPIX_W 8
// Video
#define VID_CHARPIX_H 14
#define VID_CHARPIX_W 8
#endif
--------------------------------------------------------------------------------
DDE.ch Commands for Dynamic Data Exchange
--------------------------------------------------------------------------------
#ifndef _DDE_CH
#define _DDE_CH
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
#endif
--------------------------------------------------------------------------------
Dialog.ch Dialog Boxes
--------------------------------------------------------------------------------
#ifndef _DIALOG_CH
#define _DIALOG_CH
//----------------------------------------------------------------------------//
// Microsoft 3D Look
#xcommand SET <look_3d: 3DLOOK, LOOK3D, LOOK 3D, 3D LOOK> <on:ON,OFF,&> => ;
Set3DLook( Upper(<(on)>) == "ON" )
//----------------------------------------------------------------------------//
// Resources
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// Loading strings/or other Types from Resources
//----------------------------------------------------------------------------//
#endif
--------------------------------------------------------------------------------
DLL.ch Dynamic Linking Libraries calling at RunTime
--------------------------------------------------------------------------------
// Copyright FiveTech 1993-7
#ifndef _DLL_CH
#define _DLL_CH
#ifndef _C_TYPES
#define _C_TYPES
#define VOID 0
#define BYTE 1
#define CHAR 2
#define WORD 3
#define _INT 4 // conflicts with Clipper Int()
#define BOOL 5
#define HDC 6
#define LONG 7
#define STRING 8
#define LPSTR 9
#define PTR 10
#define _DOUBLE 11 // conflicts with BORDER DOUBLE
#define DWORD 12
#endif
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
#endif
//----------------------------------------------------------------------------//
--------------------------------------------------------------------------------
FiveWin.ch FiveWin main header file
--------------------------------------------------------------------------------
FiveWin main Header File */
Running multiple instances of a FiveWin EXE */
ACCESSING / SETTING Variables */
Default parameters management */
DO ... UNTIL support */
Idle periods management */
DataBase Objects */
General release command */
Brushes */
Pens */
ButtonBar Commands */
Icons */
PUSHBUTTON */
CHECKBOX */
COMBOBOX */
LISTBOX */
LISTBOX - BROWSE */
RADIOBUTTONS */
BITMAP */
SAY */
GET */
SCROLLBAR */
BOX - GROUPS */
Meter */
MetaFile Controls */
Cursor Commands */
Window Commands */
MESSAGE BAR */
CLIPBOARD */
Timer */
Visual Basic VBX Controls Support */
Different used commands */
Commands & functions not supported */
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// FiveWin Dialog TPages Class
#endif
--------------------------------------------------------------------------------
Font.ch Fonts management
--------------------------------------------------------------------------------
#ifndef _FONT_CH
#define _FONT_CH
#define LF_HEIGHT 1
#define LF_WIDTH 2
#define LF_ESCAPEMENT 3
#define LF_ORIENTATION 4
#define LF_WEIGHT 5
#define LF_ITALIC 6
#define LF_UNDERLINE 7
#define LF_STRIKEOUT 8
#define LF_CHARSET 9
#define LF_OUTPRECISION 10
#define LF_CLIPPRECISION 11
#define LF_QUALITY 12
#define LF_PITCHANDFAMILY 13
#define LF_FACENAME 14
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
#endif
--------------------------------------------------------------------------------
Ini.ch INI Files
--------------------------------------------------------------------------------
#ifndef _INI_CH
#define _INI_CH
#endif
--------------------------------------------------------------------------------
Mail.ch Windows MAPI email support
--------------------------------------------------------------------------------
// FiveWin - Windows MAPI - mail services - xBase Commands
#ifndef _MAIL_CH
#define _MAIL_CH
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
#endif
--------------------------------------------------------------------------------
Menu.ch Managing Menus
--------------------------------------------------------------------------------
#ifndef _MENU_CH
#define _MENU_CH
//----------------------------------------------------------------------------//
// Creating PullDown Menus from source code
//----------------------------------------------------------------------------//
// Creating PullDown Menus from resources
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// PopUps Management
//----------------------------------------------------------------------------//
// Using Window System Menu
//----------------------------------------------------------------------------//
#endif
--------------------------------------------------------------------------------
Objects.ch Object Oriented Engine of FiveWin
--------------------------------------------------------------------------------
/*
+---------------------------------------------------------------+
| Objects.ch |
| |
| Clipper 5.x header file for Objects.lib V 4.0 |
| Fecha: Junio 1995 |
| |
| (c) 1993-4-5 Francisco Pulp.n y Antonio Linares |
+---------------------------------------------------------------+
#ifndef _OBJECTS_CH
#define _OBJECTS_CH
#define _FuncType_
// Declaraciones de Metodos.
// =========================
#xcommand _GEN_METHOD_ <Met> <code: EXTERN, CFUNC, CMETHOD> <udf> [<*x*>] => ;
EXTERNAL _AsName_( <udf> ) ;;
_ObjAddMet( nClassH, __SCOPE__, .f., 0, _AsStr_(<Met>), _AsStr_( <udf>
) )
// PreAmbitos
#xcommand __ST__ <st: METHOD, MESSAGE, VAR, INSTVAR, DATA, CLASSVAR, CLASSDATA
> <*x*> ;
=> <st> <x>
#xcommand EXPORT <*x*> => __ST__ <x> PUBLIC
#xcommand HIDE <*x*> => __ST__ <x> HIDDEN
#xcommand PROTECT <*x*> => __ST__ <x> PROTECTED
// Self
// ======
#xtranslate :: => Self:
#endif // _OBJECTS_CH
//---------------------------
--------------------------------------------------------------------------------
ODBC.ch Open DataBase connectivity support
--------------------------------------------------------------------------------
#ifndef _ODBC_CH
#define _ODBC_CH
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
#endif
--------------------------------------------------------------------------------
Print.ch Using the Printer
--------------------------------------------------------------------------------
#ifndef _PRINT_CH
#define _PRINT_CH
//----------------------------------------------------------------------------//
// Printer
//----------------------------------------------------------------------------//
#endif
--------------------------------------------------------------------------------
Report.ch Report engine
--------------------------------------------------------------------------------
/*
+- Programa ---------------------------------------------------------------+
| Aplication: Header file for class TReport |
| File: REPORT.CH |
| Author: Ignacio Ortiz de Z..iga Echeverr.a |
| CIS: Ignacio Ortiz (100042,3051) |
| Date: 07/28/94 |
| Time: 20:20:07 |
| Copyright: 1994 by Ortiz de Zu.iga, S.L. |
#define RPT_LEFT 1
#define RPT_RIGHT 2
#define RPT_CENTER 3
#define RPT_TOP 4
#define RPT_BOTTOM 5
#define RPT_INCHES 1
#define RPT_CMETERS 2
#define RPT_NOLINE 0
#define RPT_SINGLELINE 1
#define RPT_DOUBLELINE 2
#xcommand ENDREPORT ;
=> ;
END REPORT
// EOF
--------------------------------------------------------------------------------
SQL.ch ODBC header
--------------------------------------------------------------------------------
//algunos codigos de retorno
#define SQL_ERROR -1
#define SQL_INVALID_HANDLE -2
#define SQL_NEED_DATA 99
#define SQL_NO_DATA_FOUND 100
#define SQL_SUCCESS 0
#define SQL_SUCCESS_WITH_INFO 1
#define SQL_DROP 1
//tipos de campos
#define SQL_CHAR 1
#define SQL_NUMERIC 2
#define SQL_DECIMAL 3
#define SQL_INTEGER 4
#define SQL_SMALLINT 5
#define SQL_FLOAT 6
#define SQL_REAL 7
#define SQL_DOUBLE 8
#define SQL_DATE 9
#define SQL_TIME 10
#define SQL_TIMESTAMP 11
#define SQL_VARCHAR 12
#define SQL_DATABASE_NAME 16
#define SQL_DBMS_NAME 17
#define SQL_DBMS_VER 18
#define SQL_ACCESSIBLE_TABLES 19
#define SQL_ACCESSIBLE_PROCEDURES 20
#define SQL_PROCEDURES 21
#define SQL_CONCAT_NULL_BEHAVIOR 22
#define SQL_CURSOR_COMMIT_BEHAVIOR 23
#define SQL_CURSOR_ROLLBACK_BEHAVIOR 24
#define SQL_DATA_SOURCE_READ_ONLY 25
#define SQL_DEFAULT_TXN_ISOLATION 26
#define SQL_EXPRESSIONS_IN_ORDERBY 27
#define SQL_IDENTIFIER_CASE 28
#define SQL_IDENTIFIER_QUOTE_CHAR 29
#define SQL_MAX_COLUMN_NAME_LEN 30
#define SQL_MAX_CURSOR_NAME_LEN 31
#define SQL_MAX_OWNER_NAME_LEN 32
#define SQL_MAX_PROCEDURE_NAME_LEN 33
#define SQL_MAX_QUALIFIER_NAME_LEN 34
#define SQL_MAX_TABLE_NAME_LEN 35
#define SQL_MULT_RESULT_SETS 36
#define SQL_MULTIPLE_ACTIVE_TXN 37
#define SQL_OUTER_JOINS 38
#define SQL_OWNER_TERM 39
#define SQL_PROCEDURE_TERM 40
#define SQL_CONVERT_FUNCTIONS 48
#define SQL_NUMERIC_FUNCTIONS 49
#define SQL_STRING_FUNCTIONS 50
#define SQL_SYSTEM_FUNCTIONS 51
#define SQL_TIMEDATE_FUNCTIONS 52
#define SQL_CONVERT_BIGINT 53
#define SQL_CONVERT_BINARY 54
#define SQL_CONVERT_BIT 55
#define SQL_CONVERT_CHAR 56
#define SQL_CONVERT_DATE 57
#define SQL_CONVERT_DECIMAL 58
#define SQL_CONVERT_DOUBLE 59
#define SQL_CONVERT_FLOAT 60
#define SQL_CONVERT_INTEGER 61
#define SQL_CONVERT_LONGVARCHAR 62
#define SQL_CONVERT_NUMERIC 63
#define SQL_CONVERT_REAL 64
#define SQL_CONVERT_SMALLINT 65
#define SQL_CONVERT_TIME 66
#define SQL_CONVERT_TIMESTAMP 67
#define SQL_CONVERT_TINYINT 68
#define SQL_CONVERT_VARBINARY 69
#define SQL_CONVERT_VARCHAR 70
#define SQL_CONVERT_LONGVARBINARY 71
#define SQL_TXN_ISOLATION_OPTION 72
#define SQL_ODBC_SQL_OPT_IEF 73
--------------------------------------------------------------------------------
TcBrowse.ch Column based new Browse
--------------------------------------------------------------------------------
** Last revision: May 29, 1995 at 10:03
/***************************************************************************
I have only added a little spit and polish. Harry Van Tassell
***************************************************************************/
/*
The include file for my Table [Traditional] Column Browse class
NOTE this is quite long and contains several different types of Columns
*/
//------------------------------------------------------------------------//
//------------------------------------------------------------------------//
//-------------------------------------------------------------------------//
//------------------------------------------------------------------------//
//------------------------------------------------------------------------//
//------------------------------------------------------------------------//
//------------------------------------------------------------------------//
#define DT_LEFT 0
#define DT_CENTER 1
#define DT_RIGHT 2
//-------------------------------------------------------------------------//
//-------------------------------------------------------------------------//
--------------------------------------------------------------------------------
Tree.ch Trees support
--------------------------------------------------------------------------------
// Trees for FiveWin !!! Incredible powerfull !!!
#ifndef _TREE_CH
#define _TREE_CH
#endif
--------------------------------------------------------------------------------
Video.ch Video media AVI Support
--------------------------------------------------------------------------------
#ifndef _VIDEO_CH
#define _VIDEO_CH
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
#endif
--------------------------------------------------------------------------------
VKey.ch Windows keys values
--------------------------------------------------------------------------------
/* Virtual key codes */
/* C.digos de teclas Virtuales */
/* VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' */
/* VK_A hasta VK_Z se corresponden con los valores ASCII : de 'A' a 'Z' */
/* VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '9' */
/* VK_0 hasta VK_9 se corresponden con los valores ASCII : de '0' a '9' */
/* To accelerators functions */
/* Para las funciones de acceleradores */
--------------------------------------------------------------------------------
WinApi.ch Windows API definitions
--------------------------------------------------------------------------------
#ifndef _WINAPI_CH
#define _WINAPI_CH
//----------------------------------------------------------------------------//
#define IDOK 1
#define ID_OK 1
#define IDCANCEL 2
#define BN_CLICKED 0
#define ES_LEFT 0
#define ES_RIGHT 2
#define ES_MULTILINE 4
#define ES_AUTOHSCROLL 128 // 0x0080
#define ES_WANTRETURN 4096 // 0x1000
#define DS_SYSMODAL 2
#define DS_MODALFRAME 128 // 0x80
// Dialogs
#define DLGC_WANTARROWS 1
#define DLGC_WANTTAB 2
#define DLGC_WANTALLKEYS 4
#define DLGC_WANTCHARS 128
// ListBox Styles
// ComboBox Styles
// ScrollBar
#define SB_LINEUP 0
#define SB_LINELEFT 0
#define SB_LINEDOWN 1
#define SB_LINERIGHT 1
#define SB_PAGEUP 2
#define SB_PAGELEFT 2
#define SB_PAGEDOWN 3
#define SB_PAGERIGHT 3
#define SB_THUMBPOSITION 4
#define SB_THUMBTRACK 5
#define SB_TOP 6
#define SB_LEFT 6
#define SB_BOTTOM 7
#define SB_RIGHT 7
#define SB_ENDSCROLL 8
#define SBS_HORZ 0
#define SBS_VERT 1
// CheckBox
#define BS_PUSHBUTTON 0
#define BS_DEFPUSHBUTTON 1
#define BS_CHECKBOX 2
#define BS_AUTOCHECKBOX 3 // 0x00000003
#define BS_GROUPBOX 7
#define BS_AUTORADIOBUTTON 9
/* Pen Styles */
#define PS_SOLID 0
#define PS_DASH 1
#define PS_DOT 2
#define PS_DASHDOT 3
#define PS_DASHDOTDOT 4
#define PS_NULL 5
#define PS_INSIDEFRAME 6
// VBX Support
// ZIPs Support
#endif
--------------------------------------------------------------------------------
ClipApi.h Clipper internal management declarations
--------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
// Clipper API ver 1.0 Fco.Pulp.n, A.Linares //
////////////////////////////////////////////////////////////////////////////////
#ifndef _CLIPAPI_H
#define _CLIPAPI_H
#endif
#endif
#ifdef __FLAT__
#define CLIPPER void // _System
#define PARAMS void * params
#define _parc( x ) PARC( x, params )
#else
#define CLIPPER void pascal
#define PARAMS void
#endif
typedef struct
{
WORD wType;
WORD w2;
WORD w3;
LPBYTE pPointer1;
LPBYTE pPointer2;
} CLIPVAR; // sizeof( CLIPVAR ) --> 14 bytes
typedef struct
{
WORD wFloat[ 4 ];
} CLIP_FLOAT;
typedef struct
{
WORD wType;
LONG lDummy1;
CLIP_FLOAT fFloat;
} CLV_FLOAT;
typedef struct
{
WORD wType;
LONG lDummy;
WORD wWord; // for LOGICAL clipvars -> Casting to (BOOL)
WORD wDummy[ 3 ];
} CLV_WORD;
typedef struct
{
WORD wType;
WORD wLen;
WORD wDummy[ 5 ];
} CLV_CHAR;
typedef struct
{
WORD wType;
WORD w2;
WORD w3;
PCLIPVAR pClipVar;
LPBYTE pVoid;
} REF_CLIPVAR;
typedef struct
{
BYTE cName[ 11 ];
BYTE cType;
LPBYTE pSymbol; // Is a LPCLIPSYMBOL. You must cast.
} CLIPNAME; // 16 bytes
typedef struct
{
BYTE Dummy[ 8 ];
PCLIPNAME pName;
PCLIPFUNC pFunc;
} CLIPSYMBOL; // 16 bytes
#ifndef __FLAT__
extern LPSTR _parc( WORD wParam, ... );
#else
LPSTR PARC( WORD wParam, void * );
#endif
// Retrieves any parameter checking type. Use ALLTYPES #define for no test.
extern PCLIPVAR _param( WORD wParam, WORD wType );
// Number of parameters
extern WORD _pcount;
typedef struct
{
BYTE Red, Green, Blue, Attr; // Four bytes
} RGB;
//////////////////////////////////////////////////////
// COLOR Module - Colors Control //
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// GT Module - General Terminal //
//////////////////////////////////////////////////////////////////
typedef struct
{
WORD wTop;
WORD wLeft;
WORD wHeight;
WORD wWidth; // so there is no conflict with Windows.h rect
} gtRECT; // as. no hay conflicto con el rect de windows.h
typedef struct
{
WORD wTop, wLeft, wHeight, wWidth;
BYTE RGBColor[ 8 ];
LONG lDummy1;
WORD wDummy2;
WORD wDummy3;
LPBYTE p34Bytes;
BYTE bDummy2[ 10 ];
} WINDOW;
// extended GT - RUNsoft
void _gtShadow( WORD wTop, WORD wLeft, WORD wBottom, WORD wRight );
void _gtClrReverse( WORD wColor );
void _gtSayHot( WORD wRow, WORD wCol, LPSTR szText, WORD wClrNormal, WORD
wClrHot );
WORD _gtClrGet( WORD wColor );
//////////////////////////////////////////////////////////////////
// FILESYS Module - Low level Files Management
//////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
// STACK and OM Module - Clipper internal stack and ClipVars management //
////////////////////////////////////////////////////////////////////////////
// _lbase + 1 --> Self from within Methods ! Reach it with _par...( 0, ... ) !
// _lbase + 2 --> First parameter
// _lbase + 3 --> Second parameter
// ...
extern PCLIPVAR _lbase; // LOCAL BASE
// statics
extern PCLIPVAR _sbase; // STATIC BASE
// executing CodeBlocks
// _PutSym( _symEVAL );
extern void _xEval( WORD wNumberOfParameters );
// Strings
// Creates a new String. Stores a CLIPVAR at _eval
extern void pascal _BYTESNEW( WORD wLenBytes );
// Gets the LPSTR of the String. It must be locked before with _VSTRLOCK
extern LPSTR pascal _VSTR( PCLIPVAR vString );
#ifndef __FLAT__
#ifndef _BC5
WORD strlen( LPSTR szText );
// Arrays
// Retrieves the Len of an array
extern WORD pascal _VARRAYLEN( PCLIPVAR vArray );
// Resizes an Array
// Parameters must be placed usign _tos
// pcount must be updated
extern void pascal ASIZE( void );
////////////////////////////////////////////////////////
// SEND Module - OOPS Management !
////////////////////////////////////////////////////////
/*********************************************************/
// executes a CodeBlock
// lbase + 1 --> CodeBlock
// lbase + 2 --> First parameter
//////////////////////////////////////////////
// EVENT Module - Clipper internally is event-driven !!!
//////////////////////////////////////////////
typedef struct
{
WORD wDymmy;
WORD wMessage;
} EVENT;
///////////////////////////////////////////////////////////
// BEEP Module - Terminal Driver Module
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// DYNC Module - Dynamic Linking Modules
///////////////////////////////////////////////////////////
typedef struct
{
WORD AX, BX, CX, DX;
} DLM_PARAMS;
// ERROR
void _ierror( WORD wError ); // generates an internal error message and quit.
// TB Module
LPSTR _tbname( PCLIPVAR, WORD ); // Same as ProcName. 2. param no matter
// 1 param is _ActInfo( WORD )
// LAS "DATE"
// "DATE" ones
// gets the date at _tos, returns
extern void _year( void ); // recibe fecha en _tos, retorna
// (CLV_LONG) a.o en _tos
// (CLV_LONG) year at _tos
extern void _month( void ); // idem.
extern void _day( void ); // idem.
/*****
CLIPPER MiYear()
{
// copiamos el VITEM Fecha en la primera posici.n libre
// del STACK.
_year();
}
*****/
// TERM
#endif
--------------------------------------------------------------------------------
WinTen.h To avoid conflicts with Windows API Pascal names
--------------------------------------------------------------------------------
#ifndef _WINTEN_H
#define _WINTEN_H
#ifndef __FLAT__
// If you are going to develop some new C function to conect the API,
// check that it is here, if length 10 characters or less, and include
// it here if not
// ODBC Support
// ZIP management
// WinSock management
// OLE2 Management
#endif
#endif
--------------------------------------------------------------------------------