Code: Select all
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oFld1, oFld2
local cItem
local oUrlLink1, oUrlLink2
Fw_SetUnicode( .T. )
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE FOLDEREX oFld1 ID 110 OF oDlg ;
PROMPT "&Clipper", "&and", "&Windows", "&Magic" ;
DIALOGS "Sub1", "Sub2"
REDEFINE COMBOBOX cItem ITEMS { "One", "Two", "Three" } ;
ID 105 OF oFld1:aDialogs[ 1 ]
REDEFINE BUTTON ID 110 OF oFld1:aDialogs[ 1 ] ; // Redefining a child
ACTION MsgInfo( "First Page" ) // control !!!
REDEFINE BUTTON ID 104 OF oFld1:aDialogs[ 2 ] ; // Redefining a child
ACTION MsgInfo( "Second Page" ) // control !!!
REDEFINE FOLDEREX oFld2 ID 120 OF oDlg ;
PROMPT "&The", "&beauty", "&and power", "&of xBase" ;
DIALOGS "The", "Beauty"
oFld2:SetColor( CLR_BLUE, CLR_WHITE )
//AEVal( oFld2:aDialogs, { | o | o:SetColor( CLR_BLUE, CLR_WHITE ) } )
//oDlg:aControls[ 2 ]:aDialogs[ 1 ]:bRClicked = ;
// { || MsgInfo( oDlg:aControls[ 2 ]:aDialogs[ 1 ]:hWnd ) }
oUrlLink1 := TUrlLink():Redefine( 1001, oFld2:aDialogs[1],,, "www.fivetechsoft.com",, CLR_BLACK, CLR_RED, CLR_YELLOW, .T. )
oUrlLink1:bAction = { || MsgInfo( "click" ) }
oUrlLink2 := TUrlLink():Redefine( 1002, oFld2:aDialogs[1],,, "www.fivetechsoft.com",, CLR_BLACK, CLR_RED, CLR_YELLOW, .T. )
oUrlLink2:bAction = { || MsgInfo( "click" ) }
ACTIVATE DIALOG oDlg CENTERED //ON INIT Hazcontrols( oFld2 )
return nil
//----------------------------------------------------------------------------//
Code: Select all
#define IDC_CHECKBOX1 106
#define IDC_GROUPBOX1 107
#define DIALOG_2 2
#define DIALOG_1 1
#include "..\include\winapi.ch"
#ifdef __FLAT__
1 24 "winxp\WindowsXP.Manifest"
#endif
#ifdef __64__
1 24 "WinXP/WindowsXP.Manifest64"
#endif
Test DIALOG 19, 22, 263, 202
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | 4
CAPTION "FiveWin Folders Demo"
FONT 8, "Arial"
{
//0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP
// CONTROL "", 110, FOLDER32, 0x00000000, 4, 5, 213, 93
// CONTROL "", 120, FOLDER32, 0x00000000, 4, 105, 213, 93
CONTROL "", 110, "TFOLDEREX", 0x50010000, 4, 5, 213, 93, 0x00000000
CONTROL "", 120, "TFOLDEREX", 0x50010000, 5, 105, 213, 93, 0x00000000
PUSHBUTTON "&OK", 1, 222, 4, 37, 14
}
sub1 DIALOG 18, 18, 142, 67
STYLE WS_CHILD | 0x4
{
COMBOBOX 105, 62, 15, 69, 37, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&First", 110, 25, 47, 24, 14
PUSHBUTTON "&SubDialog", 120, 54, 47, 43, 14
CHECKBOX "Checkbox", IDC_CHECKBOX1, 35, 27, 60, 12, BS_AUTOCHECKBOX | WS_TABSTOP
GROUPBOX "Group", IDC_GROUPBOX1, 8, 6, 129, 35, BS_GROUPBOX
}
sub2 DIALOG 18, 18, 142, 67
STYLE WS_CHILD | 0x4
{
CONTROL "Text", 101, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 37, 30, 28, 12
CONTROL "Text", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 37, 41, 28, 12
CONTROL "Text", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 37, 52, 28, 12
CONTROL "&Second", 104, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 93, 26, 32, 12
}
the DIALOG DISCARDABLE 1, 1, 142, 67
STYLE WS_CHILD | 0x4
FONT 8, "Arial"
{
CONTROL "", 1001, "Static", WS_TABSTOP, 26, 13, 74, 8
CONTROL "", 1002, "STATIC", WS_TABSTOP, 27, 26, 62, 8
//CONTROL "Wellcome to the most", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 26, 13, 74, 8
//CONTROL "fascinating way of", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 27, 26, 62, 8
CONTROL "developing software", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 26, 40, 74, 8
}
beauty DIALOG 18, 18, 142, 67
STYLE WS_CHILD | 0x4
{
CONTROL "Now you have all the", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 26, 13, 74, 8
CONTROL "productivity and power", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 27, 26, 78, 8
CONTROL "you were looking for!", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 26, 40, 74, 8
}