// FiveWin for Pocket PC -
#include "FWCE.ch"
#define SHFS_SHOWTASKBAR 1 // 0x0001
#define SHFS_HIDETASKBAR 2 // 0x0002 //2
#define SHFS_SHOWSIPBUTTON 4 // 0x0004
#define SHFS_HIDESIPBUTTON 8 // 0x0008 //8
#define SHFS_SHOWSTARTICON 16 // 0x0010
#define SHFS_HIDESTARTICON 20 // 0x0020 //32
#DEFINE TRUE .T.
#DEFINE FALSE .F.
//SIZE 240,320
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oBtnEnde
local oWnd
local oTmy
local oPanel1
local oBtnShow
set default to (cFilePath( GetModuleFileName( GetInstance() ) ))
if IsExeRunning( cFileName( HB_ArgV( 0 ) ) )
MsgInfo( "The application is already running" )
return nil
endif
set deleted on
DEFINE WINDOW oWnd TITLE "Next"
oPanel1 := TPanel():New(105,1,230,240,oWnd,.T.,CLR_BLACK, CLR_YELLOW)
oPanel1:oVScroll:SetRange( 0, 0 )
oPanel1:bPainted = { | hDC | opanel1:Say( 195,169 ,"TEST" , RGB(250,28,3) , , , .T., .T. ) }
@ 1, 177 BUTTON oBtnEnde PROMPT "Ende" SIZE 50, 15 ACTION ownd:end() PIXEL
@ 1, 17 BUTTON oBtnShow PROMPT "show" SIZE 50, 15 ACTION oPanel1:Refresh() PIXEL
ShFullScreen(oWnd:hwnd,SHFS_HIDESTARTICON )
ShFullScreen(oWnd:hwnd,SHFS_HIDETASKBAR )
ShFullScreen(oWnd:hwnd,SHFS_HIDESIPBUTTON )
ACTIVATE WINDOW oWnd ON INIT ( MoveWindow(oWnd:hWnd,0,0,240,320),;
SHOWWINDOW( FINDWINDOW( 0, "Next" ), 9 ),;
SETFOREGROUNDWINDOW( FINDWINDOW( 0, "Next" ) ),;
oWnd:Setfocus(),oPanel1:Refresh())
return nil
//----------------------------------------------------------------------------//
// TPanel Class. Mainly used for Automatic Alignment techniques
#include "WinApi.ch"
#define SYS_COLOR_INDEX_FLAG 0x40000000
#define COLOR_BTNFACE nOr( 15, SYS_COLOR_INDEX_FLAG )
//----------------------------------------------------------------------------//
CLASS TPanel FROM TControl
DATA nStart, nEnd
CLASSDATA lRegistered AS LOGICAL
METHOD New( nTop, nLeft, nBottom, nRight, oWnd ) CONSTRUCTOR
METHOD Paint()
METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint()
METHOD Notify( nIdCtrl, nPtrNMHDR ) INLINE ::oWnd:Notify( nIdCtrl, nPtrNMHDR )
METHOD VScroll( nWParam, nLParam )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( nTop, nLeft, nBottom, nRight, oWnd, lPixel, nClrText, nClrBack ) CLASS TPanel
DEFAULT nTop := 0, nLeft := 0, nBottom := 100, nRight := 100,;
oWnd := GetWndDefault(), lPixel := .f.,;
nClrBack := GetSysColor( COLOR_BTNFACE )
::nTop = nTop
::nLeft = nLeft
::nBottom = nBottom * If( lPixel, 1, SAY_CHARPIX_H )
::nRight = nRight * If( lPixel, 1, SAY_CHARPIX_W )
::oWnd = oWnd
::nStyle = nOr( WS_CHILD, WS_VISIBLE, WS_VSCROLL, WS_BORDER )
::lDrag = .f.
::nClrText = nClrText
::nClrPane = nClrBack
::nStart = 0
::nEnd = -1000
::Register()
if ! Empty( ::oWnd:hWnd )
::Create()
::oWnd:AddControl( Self )
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self
::oVScroll:SetRange( 0, 100 )
else
::oWnd:DefControl( Self )
endif
return Self
//----------------------------------------------------------------------------//
METHOD Paint() CLASS TPanel
local nTop, nLeft, nHeight, nWidth, nBevel
if ValType( ::bPainted ) != nil
Eval( ::bPainted, ::hDC )
endif
if ::oClient != nil .and. ( nBevel := ::oClient:nClientBevel ) > 0
nBevel -= 1
nTop := nBevel
nLeft := nBevel
nHeight := ::nHeight - nBevel - 1
nWidth := ::nWidth - nBevel - 1
if ::oTop != nil
nTop += ::oTop:nHeight
endif
if ::oBottom != nil
nHeight -= ::oBottom:nHeight
endif
if ::oLeft != nil
nLeft += ::oLeft:nWidth
endif
if ::oRight != nil
nWidth -= ::oRight:nWidth
endif
WndBoxIn( ::hDC, nTop, nLeft, nHeight, nWidth )
endif
return nil
//----------------------------------------------------------------------------//
METHOD VScroll( nWParam, nLParam ) CLASS TPanel
local nScrollCode := nLoWord( nWParam )
do case
case nScrollCode == SB_LINEUP
if ::nStart < 0
ScrollWindow( ::hWnd, 0, 10 )
::nStart += 10
::oVScroll:SetPos( -::nStart )
endif
case nScrollCode == SB_LINEDOWN
if ::nStart > ::nEnd
ScrollWindow( ::hWnd, 0, -10 )
::nStart -= 10
::oVScroll:SetPos( -::nStart )
endif
endcase
return 0
//----------------------------------------------------------------------------//