Code: Select all Expand view
#include "FiveWin.Ch"
#include "ord.ch"
#include "xbrowse.ch"
//----------------------------------------------------------------------------//
REQUEST SIX
static cDbf := "SAMPLE.DBF" // change this line for your path
//----------------------------------------------------------------------------//
function Main()
MsgInfo( TestDialog() )
return (0)
//----------------------------------------------------------------------------//
init procedure PrgInit
SET DATE ITALIAN
SET CENTURY ON
SET TIME FORMAT TO "HH:MM:SS"
SET EPOCH TO YEAR(DATE())-50
SET DELETED ON
SET EXCLUSIVE OFF
RDDSETDEFAULT( "DBFCDX" )
XbrNumFormat( 'A', .t. )
SetGetColorFocus()
return
//----------------------------------------------------------------------------//
static function TestDialog()
local oDlg, oBrw, oFont, cRet
local bSeek
USE (cDbf) NEW SHARED
SET ORDER TO TAG ORDER1
GO TOP
DEFINE FONT oFont NAME 'TAHOMA' SIZE 0,-14
DEFINE DIALOG oDlg SIZE 637,600 PIXEL ;
TITLE "Sample Records" ;
FONT oFont
@ 10,10 XBROWSE oBrw SIZE 300,230 PIXEL OF oDlg ;
COLUMNS "Name", "LastName", "Sup_no" ;
HEADERS "Header 1", "Name", "Supplier No." ;
ALIAS "Sample" AUTOSORT LINES CELL NOBORDER
@ 250,10 SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE 280,10 PIXEL OF oDlg ;
COLOR CLR_BLACK, CLR_YELLOW
// Next two lines are a Small work around for case insensitive seek
bSeek := oBrw:bSeek
oBrw:bSeek := { |c| Eval( bSeek, Upper( c ) ) }
// The above two lines will not needed from FWH 11.1 onwards
SETKEY( VK_RETURN, { || cRet := FIELD->NAME, oDlg:end() } )
SETKEY( Asc("Y"), { || If( GetKeyState( VK_CONTROL ), oBrw:Seek(), nil ) } )
WITH OBJECT oBrw
:bClrSelFocus := { || { CLR_WHITE, CLR_GREEN } }
// :nHeadStrAligns := AL_CENTER
:nStretchCol := STRETCHCOL_WIDEST
:nMarqueeStyle := 5
END
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED ON INIT ( oBrw:SetFocus(), .f. )
RELEASE FONT oFont
return cRet
The linker displays the following error:
┌────────────────────────────────────────────────────────────────────────────┐
│ FiveWin for xHarbour 10.6 - Jun. 2010 xHarbour development power │▄
│ (c) FiveTech, 1993-2010 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 │█
└────────────────────────────────────────────────────────────────────────────┘█
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Compiling...
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6717)
Copyright 1999-2010, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'TESTSIX.prg' and generating preprocessed output to 'TESTSIX.ppo'...
Lines 87, Functions/Procedures 3
Generating C source output to 'TESTSIX.c'...
Done.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
TESTSIX.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_HB_FUN_SIX' referenced from F:\DATA\APPS\TESTSIX.OBJ
* Linking errors *
The code compiles with the xBuilder utility from commercial xHarbour Sept. 2008.
Any ideas ? Thank you.