#include "FiveWin.ch"
static oWnd, oDlg, oDlg1, oDlg2, oDlg3, oDlg4, oTabs, hDC, nOldPage, nOPEN := 0
FUNCTION MAIN()
oFont := TFont():New("Arial", ,-14,.F.,.F. , , , ,.F. )
SetBalloon( .T. ) // Balloon shape required for tooltips
DEFINE WINDOW oWnd TITLE "Foldertest" MDI MENU TMenu():New()
SET MESSAGE OF oWnd TO "Folder-Test" ;
CENTERED CLOCK KEYBOARD 2007
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT Test(oWnd) ;
ON PAINT GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 8388608, 16733011 } } , .f.)
RETURN NIL
//----------------- TEST -----------------------------------------------------------//
FUNCTION Test(oWnd)
nStyle :=nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU,WS_MINIMIZEBOX, WS_MAXIMIZEBOX )
DEFINE DIALOG oDlg RESOURCE "MainDlg" OF oWnd STYLE nSTYLE ; // TRANSPARENT ;
TITLE "Folder-Test" FONT oFont
REDEFINE TABS oTabs PROMPTS "One", "Two", "Three", "Four" ID 100 OF oDlg ;
ACTION ( IIF ( oTabs:nOption = 1, FOLDER_1(), NIL ), ;
IIF ( oTabs:nOption = 2, FOLDER_2(), NIL ), ;
IIF ( oTabs:nOption = 3, FOLDER_3(), NIL ), ;
IIF ( oTabs:nOption = 4, FOLDER_4(), NIL ) )
oDlg:oTop = oTabs
ACTIVATE DIALOG oDlg CENTERED NOWAIT ;
ON INIT ( oDlg:Move( 30 , 10, oDlg:nWidth, oDlg:nHeight, .f. ), ;
FOLDER_1(oDlg,oDlg1,oDlg2,oDlg3,oDlg4) ) ;
ON PAINT GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 16382894, 16733011 } } , .f.)
RETURN NIL
// ---------- FOLDER-PAGE 1 --------------------
FUNCTION FOLDER_1()
LOCAL oGet1
IF nOPEN = 2
oDlg2:End()
ENDIF
IF nOPEN = 3
oDlg3:End()
ENDIF
IF nOPEN = 4
oDlg4:End()
ENDIF
nOPEN := 1
DEFINE DIALOG oDlg1 RESOURCE "Page1" OF oDlg TRANSPARENT
REDEFINE GET oGet1 ID 300 OF oDlg1
ACTIVATE DIALOG oDlg1 NOWAIT ;
ON INIT oDlg1:Move( 15 , 0, oDlg:nWidth, oDlg:nHeight, .f. ) ;
ON PAINT GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 16382894, 16733011 } } , .f.)
RETURN( NIL )
// ---------- FOLDER-PAGE 2 --------------------
FUNCTION FOLDER_2()
LOCAL oGet2
IF nOPEN = 1
oDlg1:End()
ENDIF
IF nOPEN = 3
oDlg3:End()
ENDIF
IF nOPEN = 4
oDlg4:End()
ENDIF
nOPEN := 2
DEFINE DIALOG oDlg2 RESOURCE "Page2" OF oDlg TRANSPARENT
REDEFINE GET oGet2 ID 300 OF oDlg2
ACTIVATE DIALOG oDlg2 NOWAIT ;
ON INIT oDlg2:Move( 15 , 0, oDlg:nWidth, oDlg:nHeight, .f. ) ;
ON PAINT GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 16382894, 16733011 } } , .f.)
RETURN( NIL )
// ---------- FOLDER-PAGE 3 --------------------
FUNCTION FOLDER_3()
LOCAL oGet3
IF nOPEN = 1
oDlg1:End()
ENDIF
IF nOPEN = 2
oDlg2:End()
ENDIF
IF nOPEN = 4
oDlg4:End()
ENDIF
nOPEN := 3
DEFINE DIALOG oDlg3 RESOURCE "Page3" OF oDlg TRANSPARENT
REDEFINE GET oGet3 ID 300 OF oDlg3
ACTIVATE DIALOG oDlg3 NOWAIT ;
ON INIT oDlg3:Move( 15 , 0, oDlg:nWidth, oDlg:nHeight, .f. ) ;
ON PAINT GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 16382894, 16733011 } } , .f.)
RETURN( NIL )
// ---------- FOLDER-PAGE 4 --------------------
FUNCTION FOLDER_4()
LOCAL oGet4
IF nOPEN = 1
oDlg1:End()
ENDIF
IF nOPEN = 2
oDlg2:End()
ENDIF
IF nOPEN = 3
oDlg3:End()
ENDIF
nOPEN := 4
DEFINE DIALOG oDlg4 RESOURCE "Page4" OF oDlg TRANSPARENT
REDEFINE GET oGet4 ID 300 OF oDlg4
ACTIVATE DIALOG oDlg4 NOWAIT ;
ON INIT oDlg4:Move( 15 , 0, oDlg:nWidth, oDlg:nHeight, .f. ) ;
ON PAINT GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 16382894, 16733011 } } , .f.)
RETURN( NIL )