FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Al crear lib SBrowseX marca error Scroll.c
Posts: 418
Joined: Wed Nov 26, 2008 06:33 PM
Al crear lib SBrowseX marca error Scroll.c
Posted: Wed Dec 17, 2008 02:52 PM

Saludos.

Estoy tratando de crear todas las librerias con FWH 8.11, xH 1.1, bcc 5.5, ya que usaba fw24, xH 0.9, bcc 5.5, al crea la sbrowsex.lib (TSBrowse 8.0) todo me liga bien exepto el programa Scroll.c ue me marca un error al compilar y como nunca he usado lenguaje C no se donde este el problema:
(indico con /// ERROR en donde me lo marca)

Compilando TSPOINT.PRG...
Compilando BTNDOWN.PRG...
Compilando SCRLLBAR.PRG...
Compilando TSBROWSE.PRG...
Compilando TSBTNGET.PRG...
Compilando TSCOLUMN.PRG...
Compilando TSCOMBO.PRG...
Compilando TSFGET.PRG...
Compilando TSGET.PRG...
Compilando TSMULTI.PRG...
Compilando GETBTN.C...
Compilando TSBFUNCS.C...
Compilando SCROLL.C...
Error E2451 SCROLL.C 126: Undefined symbol 'params' in function GETSCROLLR
Warning W8065 SCROLL.C 126: Call to function 'STORNI' with no prototype in function GETSCROLLR
Warning W8065 SCROLL.C 127: Call to function 'STORNI' with no prototype in function GETSCROLLR
Construyendo librería sbrowsex.lib...
Warning: 'C:\Autosys\Prgs\xEdit\SCROLL.obj' file not found
13 Files, 3 Warnings, 1 Errors

el programa es:

// Modificado por José Gimenez para desplegar las barras de scroll proporcionales (tipo W95/98/2000)
// Modified by Manuel Mercado for TSBrowse, last update: February 27th, 2002

include <WinTen.h> // set proper path if needed

include <Windows.h>

include <ClipApi.h> // set proper path if needed

ifndef FLAT

ifndef HARBOUR

typedef struct
{
DWORD cbSize ;
DWORD fMask ;
long nMin ;
long nMax ;
DWORD nPage ;
long nPos ;
long nTrackPos ;
} SCROLLINFO ;
typedef SCROLLINFO FAR * LPSCROLLINFO ;

#define SIF_RANGE           1
#define SIF_PAGE            2
#define SIF_POS             4
#define SIF_DISABLENOSCROLL 8

#define SIF_TRACKPOS 16

endif

endif

//----------------------------------------------------------------------------//

static BOOL SetScrInfo( HWND hWnd, int nScrollBar, LPSCROLLINFO si, BOOL lRedraw)
{
#ifndef HARBOUR
typedef BOOL ( WINAPI * FN )( HWND, int, LPSCROLLINFO, BOOL ) ;

  FN p = ( FN ) GetProcAddress( GetModuleHandle( "USER" ), "SetScrollInfo" ) ;

  if( p )
     return ( p( ( HWND ) hWnd, nScrollBar, si, lRedraw ) ) ;
  else
     return ( FALSE ) ;

#else
return SetScrollInfo( hWnd, nScrollBar, si, lRedraw ) ;
#endif
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_SETSCROLLRANGE( PARAMS ) // ( hWnd, nFlags, nMin, nMax, lRepaint, lDisable, l32Bit )

else

CLIPPER SETSCROLLR( PARAMS ) // ANGE()

endif

{
SCROLLINFO si ;

si.cbSize = sizeof( si ) ;
si.fMask = SIF_RANGE ;
si.nMin = _parni( 3 ) ;
si.nMax = _parni( 4 ) ;

if (_parl(6))
si.fMask = SIF_RANGE + SIF_DISABLENOSCROLL ;

if (_parl(7))
_retl( SetScrInfo( ( HWND ) _parnl( 1 ), _parni( 2 ), &si, _parl( 5 ) ) ) ;
else // NT does not support SetScrollInfo() API function
_retni( SetScrollRange( ( HWND ) _parnl( 1 ), // its hWnd
_parni( 2 ), // Scroll Bar flags
_parni( 3 ), // Min
_parni( 4 ), // Max
_parl( 5 ) ) ) ; // ReDraw
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_SETSCROLLPOS( PARAMS ) // ( hWnd, nFlags, nPos, lRepaint, lDisable, l32Bit )

else

CLIPPER SETSCROLLP( PARAMS ) // OS

endif

{
SCROLLINFO si;

si.cbSize = sizeof( si );
si.fMask = SIF_POS;
si.nPos = _parni( 3 );

if (_parl(5))
si.fMask = SIF_POS + SIF_DISABLENOSCROLL ;

if ( _parl( 6 ) )
_retl( SetScrInfo( ( HWND ) _parnl( 1 ), _parni( 2 ), &si, _parl( 4 ) ) ) ;
else // NT does not support SetScrollInfo() API function
_retl( SetScrollPos( ( HWND ) _parnl( 1 ), // its hWnd
_parni( 2 ), // Scroll Bar flags
_parni( 3 ), // new Position
_parl( 4 ) ) ) ; // repaint
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_GETSCROLLRANGE( PARAMS ) // ( hWnd, nFlags )

else

CLIPPER GETSCROLLR( PARAMS ) // ANGE

endif

{
int iMin = 0, iMax = 0 ;

#ifdef FLAT
#ifndef HARBOUR
#define _storni( x, y, z ) STORNI( x, params, y, z )
#endif
#endif

GetScrollRange( ( HWND ) _parnl( 1 ), // its hWnd
_parni( 2 ), // Scroll bar flags
&iMin,
&iMax ) ;

_reta( 2 ) ; // { nMin, nMax }

_storni( iMin, -1, 1 ) ; /// ERROR
_storni( iMax, -1, 2 ) ; /// ERROR
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_GETSCROLLPOS( PARAMS ) // ( hWnd, nFlags )

else

CLIPPER GETSCROLLP( PARAMS ) // OS

endif

{
_retni( GetScrollPos( ( HWND ) _parnl( 1 ), // its hWnd
_parni( 2 ) ) ) ; // Scroll bar flags
}

//----------------------------------------------------------------------------//

ifdef HARBOUR

HB_FUN_SETSCROLLINFO( PARAMS ) // ( hWnd, nFlags, nSize, lRedraw, lShowDisabled )

else

CLIPPER SETSCROLLI( PARAMS ) // NFO()r

endif

{
SCROLLINFO si;

si.cbSize = sizeof( si );
si.fMask = SIF_PAGE ;
si.nPage = _parni( 3 );

if ( _parl( 5 ) )
si.fMask += SIF_DISABLENOSCROLL ;

_retl( SetScrInfo( ( HWND ) _parnl( 1 ), _parni( 2 ), &si, _parl( 4 ) ) ) ;
}

//----------------------------------------------------------------------------//

Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com

Continue the discussion