FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Compilando funciones en C.
Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Compilando funciones en C.
Posted: Sun Feb 15, 2009 08:33 PM
Hola a todos,

A ver si alguien me puede hechar una mano en el c贸digo que dejo al final.

Estoy intentando definir una llamada a una funci贸n que est谩 en una DLL externa (ter16.dll [no es de 16b a pesar de su nombre]).

Es una funci贸n que recibe un puntero a una estructura, esta estructura la rellenar茅 con los valores de una array. La funci贸n de la DLL devuelve un handle de una ventana.
Yo adem谩s intento que la funci贸n que estoy definiendo para lanzar la de C devuelva en un array de 2 elementos, el handle que ha devuelto la funci贸n en C y otro handle.

No se si me he explicado bien.
Independientemente de si lo he programado bien, el caso est谩 en primero conseguir que se compile la definici贸n (lo estoy intentando con la versi贸n de Harbour de la de FiveWin 9.01).

Puede algui茅n intentar compilar este c贸digo y a ver si me orienta en lo que debo modificar para que compile correctamente?

Por cierto no ser铆a mala idea recopilar los mensajes en donde se trata el tema de definiciones de funciones en C, he le铆do un mont贸n de mensajes en estos foros pero me ha costado 'aislarlos' dle resto.

Un saludo y gracias.
Carlos G.

Code (fw): Select all Collapse
/* ************************************** */
#pragma BEGINDUMP

#include <hbapi.h>
#include <windows.h>

struct arg_list {
聽 聽 int 聽 聽x; 聽 聽 聽 聽 /* Initial x position of the editing window,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽you may specify CW_USEDEFAULT to use default values.*/
聽 聽 int 聽 聽y; 聽 聽 聽 聽 // Initial y position of the editing window.
聽 聽 int 聽 聽width; 聽 聽 /* Initial width of the window in device units,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽you may specify CW_USEDEFAULT to use default values.*/
聽 聽 int 聽 聽height; 聽 聽/* Initial height of the editing window. 聽When you
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽use CW_USEDEFAULT for 'width', the 'height' is
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ingnored.*/
聽 聽 long 聽 LineLimit; /* Number of lines allowed in the editor window.
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Set to 0 to have unlimited number of lines*/

聽 聽 BOOL 聽 WordWrap; 聽/* Set this flag to true (1), 聽if you wish to enable the
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽word wrapping feature. */
聽 聽 BOOL 聽 PrintView; /* Set this flag to true if you wish the lines on
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽the screen to be wrapped current page margins.
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Otherwise, the lines are wrapped at the end of
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽the window. This variable is ignored if 'WordWrap'
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽is set to FALSE */
聽 聽 BOOL 聽 PageMode; 聽/* Set this flag to true if you wish to edit one page
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽at a time */
聽 聽 BOOL 聽 FittedView;// Set this flag to enable special PageMode where the
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 // text wraps within the window width
聽 聽 BOOL 聽 ShowStatus;// show status line ?
聽 聽 BOOL 聽 ShowMenu; 聽// show the menu bar ?
聽 聽 BOOL 聽 ShowHorBar;// show the horizonatal scroll bar
聽 聽 BOOL 聽 ShowVerBar;// show the vertical scroll bar
聽 聽 BOOL 聽 ruler; 聽 聽 // True to show the ruler
聽 聽 BOOL 聽 ToolBar; 聽 // True to show the tool bar
聽 聽 BOOL 聽 UserCanClose;// TRUE allows the user to close the window
聽 聽 BOOL 聽 BorderMargins;// display margins around the window borders
聽 聽 BOOL 聽 ReadOnly; 聽 聽// TRUE to create a read only session

聽 聽 long 聽 InitLine; 聽// Line number to position at the beginning.
聽 聽 BYTE 聽 InputType; /* This flag specifies the input type. If you wish to
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽edit a file, set the input_type to 'F'. Conversely,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽if you wish to pass the text for editing in a buffer,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽set this field to 'B'.*/

聽 聽 BYTE 聽 file[131];/* 聽If the input type is set to 'F', 聽specify the file
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽name for editing in this field. */

聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// ===== Buffer input fields only =======
聽 聽 HGLOBAL hBuffer; /* 聽Specify the global memory handle containing the
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽input text data. 聽This handle becomes the property
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽of the editor. 聽Your program must never try to lock
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽or free this handle */
聽 聽 long BufferLen; 聽// 聽Buffer length in number of characters.
聽 聽 BYTE delim; 聽 聽 聽/* 聽Line delimiter character. 聽This character must be
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽used to delimit individual lines within the
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽text buffer. 聽This character is normally typically set
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽to 13 (carriage return) */

聽 聽 BYTE 聽 padding1[3]; // This field is not used

聽 聽 int 聽 聽SaveFormat;// The format of the output file: SAVE_TER, SAVE_TEXT,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 // SAVE_RTF and SAVE_AS_INPUT

聽 聽 HINSTANCE hInst; 聽// 聽Handle of the current instanaces.
聽 聽 HWND 聽 hParentWnd;// Handle to the parent window
聽 聽 HWND 聽 hTextWnd; // 聽Ter main window handle, will be filled by TER later
聽 聽 DWORD 聽style; 聽 聽// 聽Editor window style
聽 聽 BYTE 聽 FontTypeFace[28]; // Default type face, example: TmwRmn Courier, etc
聽 聽 int 聽 聽PointSize;// point size of the default font face

聽 聽 BOOL 聽 聽 聽 open; 聽 聽 // TRUE indicates an open window
聽 聽 int 聽 聽 聽 聽modified; // For internal use
聽 聽 BOOL 聽 聽 聽 vruler; 聽 // sbow vertical ruler
聽 聽 };


HB_FUNC( PRGCreateTerWindow )
{
聽 聽struct arg_list aParams;

聽 聽aParams.x 聽 聽 聽 聽 聽 聽 = hb_parnl(1,1);
聽 聽aParams.y 聽 聽 聽 聽 聽 聽 = hb_parnl(1,2);
聽 聽aParams.width 聽 聽 聽 聽 = hb_parnl(1,3);
聽 聽aParams.height 聽 聽 聽 聽= hb_parnl(1,4);
聽 聽aParams.LineLimit 聽 聽 = hb_parnl(1,5);
聽 聽aParams.WordWrap 聽 聽 聽= hb_parnl(1,6);
聽 聽aParams.PrintView 聽 聽 = hb_parnl(1,7);
聽 聽aParams.PageMode 聽 聽 聽= hb_parnl(1,8);
聽 聽aParams.FittedView 聽 聽= hb_parnl(1,9);
聽 聽aParams.ShowStatus 聽 聽= hb_parnl(1,10);
聽 聽aParams.ShowMenu 聽 聽 聽= hb_parnl(1,11);
聽 聽aParams.ShowHorBar 聽 聽= hb_parnl(1,12);
聽 聽aParams.ShowVerBar 聽 聽= hb_parnl(1,13);
聽 聽aParams.ruler 聽 聽 聽 聽 = hb_parnl(1,14);
聽 聽aParams.ToolBar 聽 聽 聽 = hb_parnl(1,15);
聽 聽aParams.UserCanClose 聽= hb_parnl(1,16);
聽 聽aParams.BorderMargins = hb_parnl(1,17);
聽 聽aParams.ReadOnly 聽 聽 聽= hb_parnl(1,18);
聽 聽aParams.InitLine 聽 聽 聽= hb_parnl(1,19);
聽 聽aParams.InputType 聽 聽 = hb_parnl(1,20);
聽 聽aParams.file 聽 聽 聽 聽 聽= hb_parnl(1,21);
聽 聽aParams.hBuffer 聽 聽 聽 = hb_parnl(1,22);
聽 聽aParams.BufferLen 聽 聽 = hb_parnl(1,23);
聽 聽aParams.Delim 聽 聽 聽 聽 = hb_parnl(1,24);
聽 聽aParams.SaveFormat 聽 聽= hb_parnl(1,25);
聽 聽aParams.hInst 聽 聽 聽 聽 = hb_parnl(1,26);
聽 聽aParams.hParentWnd 聽 聽= hb_parnl(1,27);
聽 聽aParams.hTextWnd 聽 聽 聽= hb_parnl(1,28);
聽 聽aParams.style 聽 聽 聽 聽 = hb_parnl(1,29);
聽 聽aParams.FontTypeFace 聽= hb_parnl(1,30);
聽 聽aParams.PointSize 聽 聽 = hb_parnl(1,31);
聽 聽aParams.Open 聽 聽 聽 聽 聽= hb_parnl(1,32);
聽 聽aParams.Modified 聽 聽 聽= hb_parnl(1,33);

聽 聽hb_retnl ( CreateTerWindow( &aParams ) );

聽 聽hb_reta( 2 ); // creamos y devolvemos un array de 2 elementos.

聽 聽// rellenamos los datos del array (situado en "return", que se indica con -1)
聽 聽hb_stornl( aParams.hParentWnd, -1, 1 );
聽 聽hb_stornl( aParams.hTextWnd, -1, 2 );

}

#pragma ENDDUMP
/* ************************************** */

Un Saludo

Carlos G.



FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Compilando funciones en C.
Posted: Mon Feb 16, 2009 11:31 AM

Carlos,

El c贸digo parece correcto. Te faltan dos cosas:

1) Los valores l贸gicos (BOOL) tienes que recogerlos con hb_parl() y no con hb_parnl()

2) Tienes que hacer "casting" de los valores recogidos con hb_parnl() cuando se trate de un valor tipo HWND, HGLOBAL, es decir en tipos que no son "n煤meros" tal cual, sino otro "tipo" de valor, por ejemplo:

aParams.hParentWnd = ( HWND ) hb_parnl(1,27);

a ( HWND ) se le denomina hacer un "casting" (cambiar de un tipo a otro).

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Compilando funciones en C.
Posted: Mon Feb 16, 2009 11:35 AM

Otra cosa:

En el caso de un "array" de BYTEs, entonces tienes tu que copiar los BYTEs:

strcpy( aParams.file, hb_parc( 1, 31 ) );

贸 tambien puedes usar memcpy() que copia "bytes" y no "strings", en el sentido de que un string es una secuencia de bytes terminados en cero.

Esta una de las bellezas del lenguaje C:
no hace nada que no se le indique, y cumple estrictamente nuestras instrucciones :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Re: Compilando funciones en C.
Posted: Mon Feb 16, 2009 10:28 PM
Antonio Linares wrote:Otra cosa:

En el caso de un "array" de BYTEs, entonces tienes tu que copiar los BYTEs:

strcpy( aParams.file, hb_parc( 1, 31 ) );

贸 tambien puedes usar memcpy() que copia "bytes" y no "strings", en el sentido de que un string es una secuencia de bytes terminados en cero.

Esta una de las bellezas del lenguaje C:
no hace nada que no se le indique, y cumple estrictamente nuestras instrucciones :-)


Gracias antonio, me ha servido para avanzar un poco m谩s.

Pero se me resisten los:

BYTE delim;

intento capturarlos con:

aParams.delim = hb_parc(1,24); 贸 strcpy( aParams.delim, hb_parc( 1, 24 ) );

pero no le gusta.

Aqu铆 vuelvo a dejar el c贸digo hasta donde he llegado. A煤n no he podido compilar, pero los errores han bajado a 2 con 2 warnings.

Los warning son en:
aParams.hInst = ( HWND ) hb_parnl(1,27); i en hWndTer = CreateTerWindow( &aParams );

A ver si lo consigo.

Un saludo y gracias
Carlos G.

/* ************************************ */
Code (fw): Select all Collapse
#pragma BEGINDUMP

#include <hbapi.h>
#include <windows.h>

struct arg_list {
聽 聽 int 聽 聽x; 聽 聽 聽 聽 聽 聽 聽 聽 /* Initial x position of the editing window,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽you may specify CW_USEDEFAULT to use default values. */
聽 聽 int 聽 聽y; 聽 聽 聽 聽 聽 聽 聽 聽 // Initial y position of the editing window.
聽 聽 int 聽 聽width; 聽 聽 聽 聽 聽 聽 /* Initial width of the window in device units,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽you may specify CW_USEDEFAULT to use default values. */
聽 聽 int 聽 聽height; 聽 聽 聽 聽 聽 聽/* Initial height of the editing window. 聽When you
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽use CW_USEDEFAULT for 'width', the 'height' is
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ingnored. */
聽 聽 long 聽 LineLimit; 聽 聽 聽 聽 /* Number of lines allowed in the editor window.
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Set to 0 to have unlimited number of lines */
聽 聽 BOOL 聽 WordWrap; 聽 聽 聽 聽 聽/* Set this flag to true (1), 聽if you wish to enable the
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽word wrapping feature. */
聽 聽 BOOL 聽 PrintView; 聽 聽 聽 聽 /* Set this flag to true if you wish the lines on
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽the screen to be wrapped current page margins.
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Otherwise, the lines are wrapped at the end of
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽the window. This variable is ignored if 'WordWrap'
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽is set to FALSE */
聽 聽 BOOL 聽 PageMode; 聽 聽 聽 聽 聽/* Set this flag to true if you wish to edit one page
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽at a time */
聽 聽 BOOL 聽 FittedView; 聽 聽 聽 聽// Set this flag to enable special PageMode where the
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 // text wraps within the window width
聽 聽 BOOL 聽 ShowStatus; 聽 聽 聽 聽// show status line ?
聽 聽 BOOL 聽 ShowMenu; 聽 聽 聽 聽 聽// show the menu bar ?
聽 聽 BOOL 聽 ShowHorBar; 聽 聽 聽 聽// show the horizonatal scroll bar
聽 聽 BOOL 聽 ShowVerBar; 聽 聽 聽 聽// show the vertical scroll bar
聽 聽 BOOL 聽 ruler; 聽 聽 聽 聽 聽 聽 // True to show the ruler
聽 聽 BOOL 聽 ToolBar; 聽 聽 聽 聽 聽 // True to show the tool bar
聽 聽 BOOL 聽 UserCanClose; 聽 聽 聽// TRUE allows the user to close the window
聽 聽 BOOL 聽 BorderMargins; 聽 聽 // display margins around the window borders
聽 聽 BOOL 聽 ReadOnly; 聽 聽 聽 聽 聽// TRUE to create a read only session
聽 聽 long 聽 InitLine; 聽 聽 聽 聽 聽// Line number to position at the beginning.
聽 聽 BYTE 聽 InputType; 聽 聽 聽 聽 /* This flag specifies the input type. If you wish to
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽edit a file, set the input_type to 'F'. Conversely,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽if you wish to pass the text for editing in a buffer,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽set this field to 'B'. */
聽 聽 BYTE 聽 file[131]; 聽 聽 聽 聽/* 聽If the input type is set to 'F', 聽specify the file
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽name for editing in this field. */
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// ===== Buffer input fields only =======
聽 聽 HGLOBAL hBuffer; 聽 聽 聽 聽 /* 聽Specify the global memory handle containing the
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽input text data. 聽This handle becomes the property
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽of the editor. 聽Your program must never try to lock
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽or free this handle */
聽 聽 long BufferLen; 聽 聽 聽 聽 聽// 聽Buffer length in number of characters.
聽 聽 BYTE delim; 聽 聽 聽 聽 聽 聽 聽/* 聽Line delimiter character. 聽This character must be
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽used to delimit individual lines within the
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽text buffer. 聽This character is normally typically set
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽to 13 (carriage return) */
聽 聽 BYTE 聽 padding1[3]; 聽 聽 聽// This field is not used
聽 聽 int 聽 聽SaveFormat; 聽 聽 聽 // The format of the output file: SAVE_TER, SAVE_TEXT,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// SAVE_RTF and SAVE_AS_INPUT
聽 聽 HINSTANCE hInst; 聽 聽 聽 聽 // 聽Handle of the current instanaces.
聽 聽 HWND 聽 hParentWnd; 聽 聽 聽 // Handle to the parent window
聽 聽 HWND 聽 hTextWnd; 聽 聽 聽 聽 // 聽Ter main window handle, will be filled by TER later
聽 聽 DWORD 聽style; 聽 聽 聽 聽 聽 聽// 聽Editor window style
聽 聽 BYTE 聽 FontTypeFace[28]; // Default type face, example: TmwRmn Courier, etc
聽 聽 int 聽 聽PointSize; 聽 聽 聽 聽// point size of the default font face
聽 聽 BOOL 聽 聽 聽 open; 聽 聽 聽 聽 // TRUE indicates an open window
聽 聽 int 聽 聽 聽 聽modified; 聽 聽 // For internal use
聽 聽 BOOL 聽 聽 聽 vruler; 聽 聽 聽 // sbow vertical ruler
聽 聽 };

HWND CreateTerWindow( HWND );

HB_FUNC( PRGCreateTerWindow )
{

聽 聽HWND hWndTer;

聽 聽struct arg_list aParams;

聽 聽aParams.x 聽 聽 聽 聽 聽 聽 = hb_parni(1,1);
聽 聽aParams.y 聽 聽 聽 聽 聽 聽 = hb_parni(1,2);
聽 聽aParams.width 聽 聽 聽 聽 = hb_parni(1,3);
聽 聽aParams.height 聽 聽 聽 聽= hb_parni(1,4);
聽 聽aParams.LineLimit 聽 聽 = hb_parnl(1,5);
聽 聽aParams.WordWrap 聽 聽 聽= hb_parl(1,6);
聽 聽aParams.PrintView 聽 聽 = hb_parl(1,7);
聽 聽aParams.PageMode 聽 聽 聽= hb_parl(1,8);
聽 聽aParams.FittedView 聽 聽= hb_parl(1,9);
聽 聽aParams.ShowStatus 聽 聽= hb_parl(1,10);
聽 聽aParams.ShowMenu 聽 聽 聽= hb_parl(1,11);
聽 聽aParams.ShowHorBar 聽 聽= hb_parl(1,12);
聽 聽aParams.ShowVerBar 聽 聽= hb_parl(1,13);
聽 聽aParams.ruler 聽 聽 聽 聽 = hb_parl(1,14);
聽 聽aParams.ToolBar 聽 聽 聽 = hb_parl(1,15);
聽 聽aParams.UserCanClose 聽= hb_parl(1,16);
聽 聽aParams.BorderMargins = hb_parl(1,17);
聽 聽aParams.ReadOnly 聽 聽 聽= hb_parl(1,18);

聽 聽aParams.InitLine 聽 聽 聽= hb_parnl(1,19);

聽 聽aParams.InputType 聽 聽 = hb_parc(1,20);
聽 聽//strcpy( aParams.InputType, hb_parc( 1, 20 ) );

聽 聽strcpy( aParams.file, hb_parc( 1, 21 ) );
聽 聽aParams.hBuffer 聽 聽 聽 = ( HWND ) hb_parnl(1,22);
聽 聽aParams.BufferLen 聽 聽 = hb_parnl(1,23);

聽 聽aParams.delim 聽 聽 聽 聽 = hb_parc(1,24);
聽 聽//strcpy( aParams.delim, hb_parc( 1, 24 ) );

聽 聽strcpy( aParams.padding1, hb_parc( 1, 25 ) );
聽 聽aParams.SaveFormat 聽 聽= hb_parni(1,26);
聽 聽aParams.hInst 聽 聽 聽 聽 = ( HWND ) hb_parnl(1,27);
聽 聽aParams.hParentWnd 聽 聽= ( HWND ) hb_parnl(1,28);
聽 聽aParams.hTextWnd 聽 聽 聽= ( HWND ) hb_parnl(1,29);
聽 聽aParams.style 聽 聽 聽 聽 = hb_parnl(1,30);
聽 聽strcpy( aParams.FontTypeFace, hb_parc( 1, 31 ) );
聽 聽aParams.PointSize 聽 聽 = hb_parnl(1,32);
聽 聽aParams.open 聽 聽 聽 聽 聽= hb_parl(1,33);
聽 聽aParams.modified 聽 聽 聽= hb_parnl(1,34);
聽 聽aParams.vruler 聽 聽 聽 聽= hb_parl(1,35);

聽 聽hWndTer = CreateTerWindow( &aParams );

聽 聽hb_reta( 2 ); // creamos y devolvemos un array de 2 elementos.

聽 聽// rellenamos los datos del array (situado en "return", que se indica con -1)
聽 聽hb_stornl( ( LONG ) hWndTer, -1, 1 );
聽 聽hb_stornl( ( LONG ) aParams.hTextWnd, -1, 2 );

}

#pragma ENDDUMP

/* ************************************ */

Un Saludo

Carlos G.



FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Continue the discussion