8/11/2019 [ADVPL] - Exemplos Funes
1/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
/*
!short: FiveWin main Header File */
#ifndef _FIVEWIN_CH
#define _FIVEWIN_CH
#define FWVERSION "FiveWin 1.9.2 - November 1996"
#define FWCOPYRIGHT "(c) FiveTech, 1993-6"
#include "Dialog.ch"
#include "Font.ch"
#include "Ini.ch"
#include "Menu.ch"
#include "Print.ch"
#ifndef CLIPPER501
#include "Colors.ch"
#include "DLL.ch"
#include "Folder.ch"
#include "Objects.ch"#include "ODBC.ch"
#include "DDE.ch"
#include "Video.ch"
#include "VKey.ch"
#include "Tree.ch"
#include "WinApi.ch"
#endif
#define CRLF Chr(13)+Chr(10)
/*----------------------------------------------------------------------------//!short: Running multiple instances of a FiveWin EXE */
#xcommand SET MULTIPLE => SetMultiple( Upper() == "ON" )
/*----------------------------------------------------------------------------//
!short: ACCESSING / SETTING Variables */
#xtranslate bSETGET() => ;
{ | u | If( PCount() == 0, , := u ) }
/*----------------------------------------------------------------------------//!short: Default parameters management */
#xcommand DEFAULT := ;
[, := ] => ;
:= If( == nil, , ) ;;
[ := If( == nil, , ); ]
/*----------------------------------------------------------------------------//
!short: DO ... UNTIL support */
#xcommand DO => while .t.
#xcommand UNTIL => if ; exit; end; end
/*----------------------------------------------------------------------------//
!short: Idle periods management */
-1-
8/11/2019 [ADVPL] - Exemplos Funes
2/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
#xcommand SET IDLEACTION TO => SetIdleAction( )
/*----------------------------------------------------------------------------//
!short: DataBase Objects */
#xcommand DATABASE => := TDataBase():New()
/*----------------------------------------------------------------------------//
!short: General release command */
#xcommand RELEASE [,] ;
=> ;
Iif( NIL , ( :End(), := NIL),) ;
[ ; Iif ( NIL, ( :End(), := NIL),) ]
/*----------------------------------------------------------------------------//
!short: Brushes */
#xcommand DEFINE BRUSH [ ] ;[ STYLE ] ;
[ COLOR ] ;
[ ] ;
[ ] ;
=> ;
[ := ] TBrush():New( [ Upper() ], ,;
, )
#xcommand SET BRUSH ;
[ OF ] ;
[ TO ] ;=> ;
:SetBrush( )
/*----------------------------------------------------------------------------//
!short: Pens */
#xcommand DEFINE PEN ;
[ STYLE ] ;
[ WIDTH ] ;
[ COLOR ] ;
[ ] ;=> ;
:= TPen():New( , , , )
#xcommand ACTIVATE PEN => :Activate()
/*----------------------------------------------------------------------------//
!short: ButtonBar Commands */
#xcommand DEFINE BUTTONBAR [ ] ;
[ , ] ;
[ ] ;
[ ] ;
[ ] ;
[ CURSOR ] ;
=> ;
-2-
8/11/2019 [ADVPL] - Exemplos Funes
3/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[ := ] TBar():New( , , , ,;
[ Upper() ], )
#xcommand @ , BUTTONBAR [ ] ;
[ SIZE , ] ;
[ BUTTONSIZE , ] ;
[ ] ;
[ ] ;
[ ] ;
[ CURSOR ] ;
=> ;
[ := ] TBar():NewAt( , , , ,;
, , , , [ Upper() ],;
)
#xcommand DEFINE BUTTON [ ] ;
[ ] ;
[ ;
[,[,] ] ] ;
[ ;[,[,] ] ] ;
[ ] ;
[ ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ TOOLTIP ] ;
[ ] ;
[ ON DROP ] ;
[ AT ] ;
[ PROMPT ] ;[ FONT ] ;
[ ] ;
=> ;
[ := ] TBtnBmp():NewBar( , ,;
, , , [{|This|}],;
, , , ,;
, , [\{||\}], [\"\"], ,;
, , [], [], [!] )
#xcommand REDEFINE BTNBMP [] ;
[ ID ] ;[ ] ;
[ ;
[,[,] ] ] ;
[ ;
[,[,] ] ] ;
[ ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ ] ;
[ TOOLTIP ] ;
[ PROMPT ] ;
[ FONT ] ;
=> ;
[ := ] TBtnBmp():ReDefine( , , ,;
-3-
8/11/2019 [ADVPL] - Exemplos Funes
4/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
, , , [{|Self|}],;
, , , , ,;
, , [], [] )
#xcommand @ , BTNBMP [] ;
[ [,] ] ;
[ [,] ] ;
[ SIZE , ] ;
[ ACTION ] ;
[ ] ;
[ MESSAGE ] ;
[ WHEN ] ;
[ ] ;
[ ] ;
=> ;
[ := ] TBtnBmp():New( , , , ,;
, , , ,;
[{|Self|}], , , , ,;
)
/*----------------------------------------------------------------------------//
!short: Icons */
#xcommand @ , ICON [ ] ;
[ ] ;
[ ] ;
[ ] ;
[ ON CLICK ] ;
[ ] ;
[ ] ;
[ WHEN ] ;[ COLOR [,] ] ;
=> ;
[ := ] TIcon():New( , , ,;
, , , , ,;
, , )
#xcommand REDEFINE ICON ;
[ ID ] ;
[ ] ;
[ ] ;
[ ON CLICK ] ;[ ] ;
[ ] ;
[ WHEN ] ;
=> ;
[ := ] TIcon():ReDefine( , , ,;
, , , )
#xcommand DEFINE ICON ;
[ ] ;
[ ] ;
[ WHEN ] ;
=> ;
:= TIcon():New( ,, , , )
/*----------------------------------------------------------------------------//
-4-
8/11/2019 [ADVPL] - Exemplos Funes
5/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
!short: PUSHBUTTON */
#xcommand @ , BUTTON [ PROMPT ] ;
[ SIZE , ] ;
[ ACTION ] ;
[ ] ;
[ ] ;
[ ] ;
[ FONT ] ;
[ ] ;
[ ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ VALID ] ;
[ ] ;
=> ;
[ := ] TButton():New( , , , ,;
, , , , , ,;
, , , , ,;, )
#xcommand REDEFINE BUTTON [ ] ;
[ ID ] ;
[ ACTION ] ;
[ ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ VALID ] ;
[ PROMPT ] ;[ ] ;
=> ;
[ := ] TButton():ReDefine( , [\{||\}], ,;
, , , , ,;
, )
/*----------------------------------------------------------------------------//
!short: CHECKBOX */
#xcommand REDEFINE CHECKBOX [ VAR ] ;
[ ID ] ;[ ] ;
[ ] ;
[ ];
[ VALID ] ;
[ [,] ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
=> ;
[ := ] TCheckBox():ReDefine( , bSETGET(),;
, , [], , ,;
, , , )
#xcommand @ , CHECKBOX [ VAR ] ;
[ PROMPT ] ;
-5-
8/11/2019 [ADVPL] - Exemplos Funes
6/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[ ] ;
[ SIZE , ] ;
[ ] ;
[ FONT ] ;
[ ] ;
[ VALID ] ;
[ [,] ] ;
[ ] ;
[ ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
=> ;
[ := ] TCheckBox():New( , , ,;
[bSETGET()], , , , ,;
[], , , , ,;
, , , , )
/*----------------------------------------------------------------------------//
!short: COMBOBOX */
#xcommand @ , COMBOBOX [ VAR ] ;
[ ] ;
[ SIZE , ] ;
[ ] ;
[ ] ;
[ ON CHANGE ] ;
[ VALID ] ;
[ [,] ] ;
[ ] ;
[ FONT ] ;[ ] ;
[ MESSAGE ] ;
[ WHEN ] ;
[ ] ;
[ BITMAPS ] ;
[ ON DRAWITEM ] ;
=> ;
[ := ] TComboBox():New( , , bSETGET(),;
, , , , ,;
[{|Self|}], , , ,;
, , , , ,;, , [{|nItem|}] )
#xcommand REDEFINE COMBOBOX [ VAR ] ;
[ ] ;
[ ID ] ;
[ ] ;
[ ] ;
[ ON CHANGE ] ;
[ VALID ] ;
[ [,] ] ;
[ ] ;
[ MESSAGE ] ;
[ WHEN ] ;
[ BITMAPS ] ;
[ ON DRAWITEM ] ;
-6-
8/11/2019 [ADVPL] - Exemplos Funes
7/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[ STYLE ] ;
[ PICTURE ];
[ ON EDIT CHANGE ] ;
=> ;
[ := ] TComboBox():ReDefine( , bSETGET(),;
, , , , [{|Self|}],;
, , , , ,;
, [{|nItem|}], , ,;
[] )
/*----------------------------------------------------------------------------//
!short: LISTBOX */
#xcommand REDEFINE LISTBOX [ VAR ] ;
[ ] ;
[ ] ;
[ ID ] ;
[ ON CHANGE ] ;
[ ON [ LEFT ] DBLCLICK ] ;
[ ] ;[ ] ;
[ VALID ] ;
[ [,] ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ BITMAPS ] ;
[ ON DRAWITEM ] ;
=> ;
[ := ] TListBox():ReDefine( , bSETGET(), ,;
[\{||\}], , , ,;, , , ,;
, , , ,;
[{|nItem|}] )
#xcommand @ , LISTBOX [ VAR ] ;
[ ] ;
[ SIZE , ] ;
[ ON CHANGE ] ;
[ ON [ LEFT ] DBLCLICK ] ;
[ ] ;
[ VALID ] ;[ [,] ] ;
[ ] ;
[ ] ;
[ FONT ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ BITMAPS ] ;
[ ON DRAWITEM ] ;
[ ] ;
[ ] ;
[ ON RIGHT CLICK ] ;
=> ;
[ := ] TListBox():New( , , bSETGET(),;
, , , , , ,;
-7-
8/11/2019 [ADVPL] - Exemplos Funes
8/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
, , , , ,;
, , , , ,;
[{|nItem|}], , ,;
[\{|nRow,nCol,nFlags|\}] )
/*----------------------------------------------------------------------------//
!short: LISTBOX - BROWSE */
// Warning: SELECT ==> Must be the Field key of the current INDEX !!!
#xcommand REDEFINE LISTBOX [ ] FIELDS [] ;
[ ALIAS ] ;
[ ID ] ;
[ ] ;
[ ] ;
[ ] ;
[ SELECT FOR [ TO ] ] ;
[ ON CHANGE ] ;
[ ON [ LEFT ] CLICK ] ;
[ ON [ LEFT ] DBLCLICK ] ;
[ ON RIGHT CLICK ] ;[ FONT ] ;
[ CURSOR ] ;
[ [,] ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ VALID ] ;
[ ACTION ] ;
=> ;
[ := ] TWBrowse():ReDefine( , ;
[\{|| \{ \} \}], ,; [ \{\}], [\{\}],;
, , ,;
[],;
[\{|nRow,nCol,nFlags|\}],;
[\{|nRow,nCol,nFlags|\}],;
, , , , , ,;
, , ,;
[\{|nRow,nCol,nFlags|\}], [\{\}] )
#xcommand @ , LISTBOX [ ] FIELDS [] ;
[ ALIAS ] ;[ ] ;
[ ] ;
[ SIZE , ] ;
[ ] ;
[ SELECT FOR [ TO ] ] ;
[ ON CHANGE ] ;
[ ON [ LEFT ] CLICK ] ;
[ ON [ LEFT ] DBLCLICK ] ;
[ ON RIGHT CLICK ] ;
[ FONT ] ;
[ CURSOR ] ;
[ [,] ] ;
[ MESSAGE ] ;
[ ] ;
[ ] ;
-8-
8/11/2019 [ADVPL] - Exemplos Funes
9/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[ WHEN ] ;
[ ] ;
[ VALID ] ;
[ ACTION ] ;
=> ;
[ := ] TWBrowse():New( , , , ,;
[\{|| \{ \} \}], ;
[\{\}], [\{\}], ;
, , , ,;
[],;
[\{|nRow,nCol,nFlags|\}],;
[\{|nRow,nCol,nFlags|\}],;
, , , , ,;
, , , ,;
, , ,;
[\{\}] )
/*----------------------------------------------------------------------------//
!short: RADIOBUTTONS */
#xcommand @ , RADIO [ VAR ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ COLOR [,] ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ SIZE , ] ;
[ VALID ] ;[ ] ;
[ ] ;
[ ] ;
=> ;
[ := ] TRadMenu():New( , , {},;
[bSETGET()], , [{}], ,;
, , , , ,;
, , , , ,;
)
#xcommand REDEFINE RADIO [ VAR ] ;[ ID ] ;
[ ] ;
[ ] ;
[ ] ;
[ COLOR [,] ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ VALID ] ;
=> ;
[ := ] TRadMenu():Redefine( [bSETGET()],;
, [{}], \{ \}, , ,;
, , , , )
/*----------------------------------------------------------------------------//
-9-
8/11/2019 [ADVPL] - Exemplos Funes
10/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
!short: BITMAP */
#xcommand @ , BITMAP [ ] ;
[ ] ;
[ ] ;
[ ] ;
[ SIZE , ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ CURSOR ] ;
[ ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ VALID ] ;
[ ] ;
=> ;[ := ] TBitmap():New( , , , ,;
, , , ,;
[\{ |nRow,nCol,nKeyFlags| \} ],;
[\{ |nRow,nCol,nKeyFlags| \} ], ,;
, , , ,;
, , , )
#xcommand REDEFINE BITMAP [ ] ;
[ ID ] ;
[ ] ;
[ ] ;[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ CURSOR ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ VALID ] ;
=> ;[ := ] TBitmap():ReDefine( , , ,;
, [\{ |nRow,nCol,nKeyFlags| \}],;
[\{ |nRow,nCol,nKeyFlags| \}],;
, , , , ,;
, )
#xcommand DEFINE BITMAP [] ;
[ ] ;
[ ] ;
[ ] ;
=> ;
[ := ] TBitmap():Define( , , )
/*----------------------------------------------------------------------------//
!short: SAY */
-10-
8/11/2019 [ADVPL] - Exemplos Funes
11/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
#xcommand REDEFINE SAY [] ;
[ ] ;
[ PICTURE ] ;
[ ID ] ;
[ ] ;
[ [, ] ] ;
[ ] ;
[ FONT ] ;
=> ;
[ := ] TSay():ReDefine( , , , ;
, , , , )
#xcommand @ , SAY [ ] ;
[ PICTURE ] ;
[ ] ;
[ FONT ] ;
[ ] ;
[ ] ;
[ ] ;[ ] ;
[ [, ] ] ;
[ SIZE , ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
=> ;
[ := ] TSay():New( , , ,;
[], [], , , , ,;, , , , ,;
, , , , )
/*----------------------------------------------------------------------------//
!short: GET */
#xcommand REDEFINE GET [ VAR ] ;
[ ] ;
[ ID ] ;
[ ] ;
[ ] ;[ [,] ] ;
[ FONT ] ;
[ CURSOR ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ ] ;
[ VALID ] ;
[ ON CHANGE ] ;
=> ;
[ := ] TMultiGet():ReDefine( , bSETGET(),;
, , , , , ,;
, , , , ,;
[\{|nKey, nFlags, Self| \}] )
-11-
8/11/2019 [ADVPL] - Exemplos Funes
12/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
#xcommand REDEFINE GET [ VAR ] ;
[ ID ] ;
[ ] ;
[ ] ;
[ VALID ] ;
[ PICTURE ] ;
[ [,] ] ;
[ FONT ] ;
[ CURSOR ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ ON CHANGE ] ;
[ ] ;
=> ;
[ := ] TGet():ReDefine( , bSETGET(), ,;
, , , , ,;
, , , , ,;
[ \{|nKey,nFlags,Self| \}], )
#command @ , GET [ VAR ] ;
[ ] ;
[ ] ;
[ [,] ] ;
[ SIZE , ] ;
[ FONT ] ;
[ ] ;
[ CURSOR ] ;
[ ] ;
[ MESSAGE ] ;
[ ] ;[ WHEN ] ;
[ ] ;
[ ] ;
[ ] ;
[ VALID ] ;
[ ON CHANGE ] ;
[ ] ;
[ ] ;
[ ] ;
=> ;
[ := ] TMultiGet():New( , , bSETGET(),;[], , , , ,;
, , , ,;
, , , ,;
, , ,;
[\{|nKey, nFlags, Self| \}], ,;
[], [] )
#command @ , GET [ VAR ] ;
[ ] ;
[ PICTURE ] ;
[ VALID ] ;
[ [,] ] ;
[ SIZE , ] ;
[ FONT ] ;
[ ] ;
-12-
8/11/2019 [ADVPL] - Exemplos Funes
13/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[ CURSOR ] ;
[ ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ ] ;
[ ] ;
[ ON CHANGE ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
=> ;
[ := ] TGet():New( , , bSETGET(),;
[], , , , ,;
, , , ,;
, , , , ,;
, ,;
[\{|nKey, nFlags, Self| \}], ,;
, [], )
/*----------------------------------------------------------------------------//
!short: SCROLLBAR */
#xcommand @ , SCROLLBAR [ ] ;
[ ] ;
[ ] ;
[ RANGE , ] ;
[ PAGESTEP ] ;
[ SIZE , ] ;
[ ] ;[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ [,] ] ;
[ OF ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ VALID ] ;[ ] ;
=> ;
[ := ] TScrollBar():New( , , , , ,;
(.not.) [.or. ], , , ,;
[], [], [], ;
[], [\{|nPos| \}], [],;
, , , , , ,;
)
// for 'non-true ScrollBars' ( when using WS_VSCROLL or WS_HSCROLL styles )
#xcommand DEFINE SCROLLBAR [ ] ;
[ ] ;
[ ] ;
[ RANGE , ] ;
-13-
8/11/2019 [ADVPL] - Exemplos Funes
14/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[ PAGESTEP ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ [,] ] ;
[ ] ;
[ MESSAGE ] ;
[ ] ;
[ WHEN ] ;
[ VALID ] ;
=> ;
[ := ] TScrollBar():WinNew( , , , ;
(.not.) [.or. ], , [],;
[], [], ;
[], [\{|nPos| \}],;
, , , , , )
#xcommand REDEFINE SCROLLBAR [ ] ;[ ID ] ;
[ RANGE , ] ;
[ PAGESTEP ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ [,] ] ;
[ OF ] ;
[ MESSAGE ] ;[ ] ;
[ WHEN ] ;
[ VALID ] ;
=> ;
[ := ] TScrollBar():Redefine( , , , ,;
, [], [], [], ;
[], [\{|nPos| \}], ,;
, , , , )
/*----------------------------------------------------------------------------//
!short: BOX - GROUPS */
#xcommand @ , [ GROUP ] TO , ;
[ ] ;
[ OF ] ;
[ COLOR [,] ] ;
[ ] ;
[ ] ;
=> ;
[ := ] TGroup():New( , , , ,;
, , , , ,;
[] )
#xcommand REDEFINE GROUP [ ] ;
[ ] ;
[ ID ] ;
-14-
8/11/2019 [ADVPL] - Exemplos Funes
15/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[ ] ;
[ COLOR [,] ] ;
=> ;
[ := ] TGroup():ReDefine( , , ,;
, )
/*----------------------------------------------------------------------------//
!short: Meter */
#xcommand @ , METER [ VAR ] ;
[ TOTAL ] ;
[ SIZE , ];
[ OF ] ;
[ ] ;
[ ] ;
[ FONT ] ;
[ PROMPT ] ;
[ ] ;
[ , ] ;
[ BARCOLOR , ] ; [ ] ;
=> ;
[ := ] TMeter():New( , , bSETGET(),;
, , , , , ;
, , , ,;
, , , , )
#xcommand REDEFINE METER [ VAR ] ;
[ TOTAL ] ;
[ ID ];
[ OF ] ;[ ] ;
[ FONT ] ;
[ PROMPT ] ;
[ ] ;
[ , ] ;
[ BARCOLOR , ] ;
=> ;
[ := ] TMeter():ReDefine( , bSETGET(),;
, , , , , , ;
, , , )
/*----------------------------------------------------------------------------//
!short: MetaFile Controls */
#xcommand @ , METAFILE [] ;
[ ] ;
[ ] ;
[ SIZE , ] ;
[ [,] ] ;
=> ;
[ := ] TMetaFile():New( , , , ,;
, , , )
#xcommand REDEFINE METAFILE [] ;
[ ID ] ;
[ ] ;
-15-
8/11/2019 [ADVPL] - Exemplos Funes
16/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[ ] ;
[ [,] ] ;
=> ;
[ := ] TMetaFile():Redefine( , , ,;
, )
/*----------------------------------------------------------------------------//
!short: Cursor Commands */
#xcommand DEFINE CURSOR ;
[ ] ;
[ ] ;
=> ;
:= TCursor():New( , [ Upper() ] )
/*----------------------------------------------------------------------------//
!short: Window Commands */
#xcommand DEFINE WINDOW [] ;[ MDICHILD ] ;
[ FROM , TO , ] ;
[ TITLE ] ;
[ BRUSH ] ;
[ CURSOR ] ;
[ MENU ] ;
[ ICON ] ;
[ OF ] ;
[ ] ;
[ ] ;
[ [,] ] ;[ ] ;
[ STYLE ] ;
[ ] ;
[ BORDER ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
=> ;
[ := ] TMdiChild():New( , , , ,;
, , , , , , ,;, , , , ,;
, [Upper()], !, !,;
!, !, )
#xcommand DEFINE WINDOW ;
[ FROM , TO , ] ;
[ TITLE ] ;
[ STYLE ] ;
[ MENU ] ;
[ BRUSH ] ;
[ ICON ] ;
[ MDI ] ;
[ [,] ] ;
[ ] ;
[ ] ;
-16-
8/11/2019 [ADVPL] - Exemplos Funes
17/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[ MENUINFO ] ;
[ [ BORDER ] ] ;
[ OF ] ;
[ ] ;
=> ;
:= TMdiFrame():New( , , , ,;
, , , , , ,;
, [], [], ,;
[Upper()], , [] )
#xcommand DEFINE WINDOW ;
[ FROM , TO , [] ] ;
[ TITLE ] ;
[ [,] ];
[ OF ] ;
[ BRUSH ] ; // Contained Objects
[ CURSOR ] ;
[ ICON ] ;
[ MENU ] ;
[ STYLE ] ; // Styles[ BORDER ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
=> ;
:= TWindow():New( , , , ,;
, , , , , ,;
[], [], , , ,;[Upper()], !, !,;
!, !, )
#xcommand ACTIVATE WINDOW ;
[ ] ;
[ ON [ LEFT ] CLICK ] ;
[ ON LBUTTONUP ] ;
[ ON RIGHT CLICK ] ;
[ ON MOVE ] ;
[ ON RESIZE ] ;
[ ON PAINT ] ;[ ON KEYDOWN ] ;
[ ON INIT ] ;
[ ON UP ] ;
[ ON DOWN ] ;
[ ON PAGEUP ] ;
[ ON PAGEDOWN ] ;
[ ON LEFT ] ;
[ ON RIGHT ] ;
[ ON PAGELEFT ] ;
[ ON PAGERIGHT ] ;
[ ON DROPFILES ] ;
[ VALID ] ;
=> ;
:Activate( [ Upper() ],;
:bLClicked [ := \{ |nRow,nCol,nKeyFlags|
-17-
8/11/2019 [ADVPL] - Exemplos Funes
18/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
\} ], ;
:bRClicked [ := \{ |nRow,nCol,nKeyFlags|
\} ], ;
:bMoved [ := ], ;
:bResized [ := ], ;
:bPainted [ := \{ | hDC, cPS | \} ], ;
:bKeyDown [ := \{ | nKey | \} ],;
:bInit [ := \{ | Self | \} ],;
[], [], [], [],;
[], [], [], [],;
[], [\{|nRow,nCol,aFiles|\}],;
:bLButtonUp [ := ] )
/*----------------------------------------------------------------------------//
!short: MESSAGE BAR */
#xcommand SET MESSAGE [ OF ] ;
[ TO ] ;
[ ] ;
[ ] ;[ ] ;
[ ] ;
[ FONT ] ;
[ [, ] ] ;
[ ] ;
=> ;
:oMsgBar := TMsgBar():New( , , ,;
, , ,;
, , ,;
[!] )
#xcommand DEFINE MESSAGE [ BAR ] [] ;
[ OF ] ;
[ PROMPT ] ;
[ ] ;
[ ] ;
[ ] ;
[ ] ;
[ FONT ] ;
[ [, ] ] ;
[ ] ;
=> ;[:=] :oMsgBar := TMsgBar():New( , , ,;
, , ,;
, , ,;
[!] )
#xcommand DEFINE MSGITEM [] ;
[ OF ] ;
[ PROMPT ] ;
[ SIZE ] ;
[ FONT ] ;
[ [, ] ] ;
[ ACTION ] ;
=> ;
[:=] TMsgItem():New( , , ,;
, , , .t.,;
-18-
8/11/2019 [ADVPL] - Exemplos Funes
19/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
[] )
/*----------------------------------------------------------------------------//
!short: CLIPBOARD */
#xcommand DEFINE CLIPBOARD ;
[ FORMAT ] ;
[ OF ] ;
=> ;
:= TClipBoard():New( [Upper()], )
#xcommand ACTIVATE CLIPBOARD => :Open()
/*----------------------------------------------------------------------------//
!short: Timer */
#xcommand DEFINE TIMER [ ] ;
[ INTERVAL ] ;
[ ACTION ] ;
[ ] ;=> ;
[ := ] TTimer():New( , [\{||\}], )
#xcommand ACTIVATE TIMER => :Activate()
/*----------------------------------------------------------------------------//
!short: Visual Basic VBX Controls Support */
#xtranslate _PARM_BLOCK_10_( ) => ;
\{ |bp1,bp2,bp3,bp4,bp5,bp6,bp7,bp8,bp9,bp10| \}
#xcommand @ , VBX [] ;
[ OF ] ;
[ SIZE , ] ;
[ ] ;
[ CLASS ] ;
[ ON ;
[ ON ] ] ;
[ WHEN ] ;
[ VALID ] ;
[ ] ;
[ ] ;=> ;
[ := ] TVbControl():New( , , , ,;
, , , ;
\{ [ , _PARM_BLOCK_10_( ) ] ;
[,, _PARM_BLOCK_10_( ) ] ;
\}, [], [], , )
#xcommand REDEFINE VBX [] ;
[ ID ] ;
[ OF ] ;
[ COLOR [,] ] ;
[ ON ;
[ ON ] ] ;
=> ;
[ := ] TVbControl():ReDefine( , ,;
-19-
8/11/2019 [ADVPL] - Exemplos Funes
20/20
C:\Documents and Settings\S&W\Desktop\FW192.CH tera-feira, 21 de julho de 2009 22:27
, , ;
\{ [ , _PARM_BLOCK_10_( ) ] ;
[,, _PARM_BLOCK_10_( ) ] ;
\} )
/*----------------------------------------------------------------------------//
!short: Different used commands */
#xcommand CLS => InvalidateRect( GetActiveWindow(), 0, .t. )
#xcommand CLEAR SCREEN => InvalidateRect( GetActiveWindow(), 0, .t. )
#command ? [ ] => WQout( [ \{ \} ] )
#command ?? [ ] => WQout( [ \{ \} ] )
/*----------------------------------------------------------------------------//
!short: Commands & functions not supported */
#xcommand READ =>
#xcommand SAVE SCREEN [ TO ] =>
#xcommand RESTORE SCREEN [ FROM ] =>
#xcommand SaveScreen( ) => ;
MsgAlert( OemToAnsi( "SaveScreen() not available in FiveWin" ) )
#xcommand RestScreen( ) => ;
MsgAlert( OemToAnsi( "RestScreen() not available in FiveWin" ) )
#xcommand @ , PROMPT =>
#xcommand MENU TO =>
//----------------------------------------------------------------------------//
#endif