Page 1 of 1

FWH and List & Label

Posted: Fri Apr 28, 2006 12:08 pm
by Roberto Parisi
i'm unsuccesfully trying with this:

function main()
local oObj, oWnd
define window oWnd from 0,0 to 800, 800 pixel
oObj := CreateObject( "L11.List-Label11_Ctrl_32.1" )
@0,0 button "Test" action oObj:Desing(0, oWnd:hWnd, 'Design reports', 2, 'simple.lst', 1)
activate window oWnd
return

It reports a memory error.

Regards,
Roberto Parisi

Re: FWH and List & Label

Posted: Fri Apr 28, 2006 12:53 pm
by Enrico Maria Giordano
Roberto Parisi wrote:oObj:Desing
Are you sure Desing is the correct syntax?
Roberto Parisi wrote:It reports a memory error.
What is the statement that bombs out?

EMG

Posted: Fri Apr 28, 2006 1:03 pm
by Roberto Parisi
Ok, the memory error has gone away. Now I get another error.

This is the code:

#include "fivewin.ch"

function main()
local oObj, oWnd
define window oWnd from 0,0 to 800, 800 pixel
oObj := CreateObject( "L11.List-Label11_Ctrl_32.1" )
@0,0 button "Test" action oObj:Design(0, oWnd:hWnd, 'Design reports', 2, 'simple.lst', 1)
activate window oWnd
return

and this is the error:

Application
===========
Path and name: I:\work\Test\Test.exe (32 bits)
Size: 1,229,312 bytes
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 04/28/06, 14:55:55
Error description: Error L11.List-Label11_Ctrl_32.1/16389 E_FAIL: DESIGN
Args:
[ 1] = N 0
[ 2] = N 264122
[ 3] = C Design reports
[ 4] = N 2
[ 5] = C simple.lst
[ 6] = N 1

Stack Calls
===========
Called from TOLEAUTO:DESIGN(0)
Called from (b)MAIN(7)
Called from TBUTTON:CLICK(161)
Called from TBUTTON:HANDLEEVENT(1293)
Called from _FWH(3124)
Called from SENDMESSAGE(0)
Called from TWINDOW:COMMAND(939)
Called from TWINDOW:HANDLEEVENT(0)
Called from _FWH(3124)
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(880)
Called from MAIN(8)

Regards,
Roberto Parisi[/img]

Posted: Fri Apr 28, 2006 1:06 pm
by Enrico Maria Giordano
Roberto Parisi wrote:Error description: Error L11.List-Label11_Ctrl_32.1/16389 E_FAIL: DESIGN
Probably you are passing wrong parameters to Design() method. Check the related docs.

EMG

Posted: Fri Apr 28, 2006 1:30 pm
by Roberto Parisi
Thx Enrico,

I modified the sample according to L&L VB calling docs.

DOCS ON
Calling the Designer
Once the data link is made, a single call is enough to bring up the Designer. The Design method takes a number of parameters which enable you to customize its behavior. These are described in detail in the OCX online help. A call, such as:

ListLabel1.Design 0, hWnd, "Design reports", PROJECT_LIST, "simple.lst", 1

DOCS OFF

This is the source:

#include "fivewin.ch"

#define LL_PROJECT_LIST 2

function main()
local oObj, oWnd
define window oWnd from 0,0 to 800, 800 pixel
oObj := CreateObject( "L11.List-Label11_Ctrl_32.1" )
@0,0 button "Test" action oObj:Design(0, oWnd:hWnd, "Design reports", LL_PROJECT_LIST, "simple.lst", 1)
activate window oWnd
return

Regards

Posted: Fri Apr 28, 2006 9:53 pm
by Randal
Roberto,

Are you using Harbour or xHarbour?

Regards,
Randal Ferguson

Posted: Sat Oct 06, 2007 7:13 pm
by Ollie
Were you able to get List&Label working? Can you provide some sample code to show me how to use it with FWH? I have downloaded the trial version.

Posted: Sat Oct 06, 2007 11:11 pm
by R.F.
Hummmmm, as far as I know, L&L is an OCX component, not a COM one, I think you will need to call using the ActiveX support in FiveWin, not using the OLE standard support.

--------------------------------
CU in Santiago de Chile on Oct. 13th
Buenos Aires from Nov. 3rd to 5th.

Posted: Sun Oct 07, 2007 11:23 am
by Ollie
PLEASE. Some sample code so I can see how to use List & Label