home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 4
/
BUGCD1997_05.BIN
/
aplic
/
clip4win
/
clip4win.exe
/
C4W30E.HUF
/
SOURCE
/
WBTDEMO.ZIP
/
WBMACH6.PRG
< prev
Wrap
Text File
|
1994-08-28
|
3KB
|
92 lines
/*
WBMACH6.PRG -- Jason Massey 5-3-94 9:00pm
For use with MACHSIX and Wbrowse(s)
These functions proportionately update the scroll bar when filtering records
using MachSix and a fully optimized Filter.
Be sure to Include "MACHSIX.CH" in your .PRG files.
You can check Optimization level with (m6_IsFilter()==OPT_FULL).
**************** COMPILER NOTE (The .LIB order is important) ***************
With Version 1.5 of the Six Drivers:
link /se:1200 /NOE myapp+Mach6six+Machsix,,nul,SIXCDX+MACHSIX+CLIP4WIN+WBROWSES
With Version Pre-Release 2.0 you get GPF's, so don't use it:
*****************************************************************************
USAGE: Case nMsg == WM_INITDIALOG
**After you create your browse object as oB**
oB:goTopBlock :={||M6_TopBlock(oB)}
oB:goBottomBlock :={||M6_BottBlock(oB)}
oB:skipBlock :={|oB,nSkip|M6_Skip(oB,nSkip)}
Be aware that if your using MachSix and shared database files,
you need to call M6_RefreshFilter() when your filter changes,
otherwise your filters won't work.
*/
#include "SIXCDX.CH"
#include "MACHSIX.CH"
FUNCTION M6_Skip( o, nSkip )
LOCAL hM6,aM6
dbSkip(nSkip)
DO CASE
CASE BOF()
o:nCurRec:=1
o:nCrecNo:=recno()
o:hitTop := .T.
o:hitBottom := EOF()
CASE EOF()
hM6:=m6_GetAreaFilter()
aM6:=m6_FiltInfo(hM6)
o:nCurRec:=if(M6_isfilter()==OPT_FULL,;
aM6[INFO_COUNT]+1,recno())
o:nCrecNo:=recno()-1
o:nMaxRec:=if(M6_isfilter()==OPT_FULL,;
aM6[INFO_COUNT],o:nMaxRec)
o:hitBottom := .T.
o:hitTop := BOF()
OTHERWISE
o:nCurRec += nSkip
o:nCrecNo := RECNO()
o:hitTop := .F.
o:hitBottom := .F.
return nSkip
ENDCASE
RETURN (0)
Function M6_TopBlock(o)
local hM6,aM6
hM6:=m6_GetAreaFilter()
aM6:=m6_FiltInfo(hM6)
go top
o:hitTop:=.t.
o:hitBottom:=eof()
o:rowPos:=1
o:nCurRec:=1
o:nCrecNo:=recno()
o:nMaxRec:=if(M6_isfilter()==OPT_FULL,;
aM6[INFO_COUNT],reccount())
SetCursor(LoadCursor(,IDC_ARROW))
return NIL
Function M6_BottBlock(o)
local hM6,aM6
hM6:=m6_GetAreaFilter()
aM6:=m6_FiltInfo(hM6)
go bottom
o:hitTop:=bof()
o:hitBottom:=.t.
o:rowPos:=o:nMaxLines
o:nCurRec:=if(M6_isfilter()==OPT_FULL,;
aM6[INFO_COUNT],recno())
o:nCrecNo:=recno()
o:nMaxRec:=if(M6_isfilter()==OPT_FULL,;
aM6[INFO_COUNT],reccount())
SetCursor(LoadCursor(,IDC_ARROW))
return NIL