Aqui podeis descargar un ejemplo de scroll de controles:
http://hyperupload.com/download/ed4de01 ... l.zip.html
#include "FWCE.ch"
#define GWL_STYLE (-16)
#define WS_VSCROLL 0x00200000
//----------------------------------------------------------------------------//
function Main()
local oWnd, oSay
local cName := Space( 20 ), cAddress := Space( 30 )
DEFINE WINDOW oWnd TITLE "Scroll"
@ 10, 10 SAY oSay PROMPT "" OF oWnd ;
SIZE oWnd:nWidth() - 18, oWnd:nHeight() - 40;
PIXEL BORDER COLOR "N/BG*"
@ 6, 3.8 SAY "Name:" OF oSay SIZE 40, 15
@ 7, 8 GET cName OF oSay SIZE 100, 18
@ 7.8, 2.1 SAY "Address:" OF oSay SIZE 50, 15
@ 9, 8 GET cAddress OF oSay SIZE 120, 18
SetWindowLong( oSay:hWnd, GWL_STYLE,;
nOr( GetWindowLong( oSay:hWnd, GWL_STYLE ), WS_VSCROLL ) )
ACTIVATE WINDOW oWnd
return nil
// FWPPC Class TSay (C) FiveTech Software 2005
#include "FiveWin.ch"
...
CLASS TSay FROM TControl
...
DATA nStart, nEnd
METHOD VScroll( nWParam, nLParam )
...
METHOD New( ... ) CLASS TSay
...
::nStart = 0
::nEnd = -1000
return Self
...
METHOD VScroll( nWParam, nLParam ) CLASS TSay
local nScrollCode := nLoWord( nWParam )
do case
case nScrollCode == SB_LINEUP
if ::nStart < 0
ScrollWindow( ::hWnd, 0, 10 )
::nStart += 10
endif
case nScrollCode == SB_LINEDOWN
if ::nStart > ::nEnd
ScrollWindow( ::hWnd, 0, -10 )
::nStart -= 10
endif
endcase
return 0
BOOL ScrollWindow( HWND hWnd, int XAmount, int YAmount, CONST RECT *lpRect,
CONST RECT *lpClipRect )
{
return ScrollWindowEx( hWnd, XAmount, YAmount, lpRect, lpClipRect, NULL, NULL, SW_ERASE | SW_SCROLLCHILDREN );
}
Return to FiveWin para Pocket PC
Users browsing this forum: No registered users and 22 guests