FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour HMG 64 Bit Constante -> FiveWin ?
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: HMG 64 Bit Constante -> FiveWin ?
Posted: Sun Oct 23, 2022 10:41 AM
hi Enrico ,
Enrico Maria Giordano wrote:No, it is not. Please look at the PRGs of the FWH directories and you will find many samples of HB_FUNC() usage.

HB_FUNC( GETGRIDVKEY ) is not available under Fivewin
it is only for Listview LV_KEYDOWN Structure

Fiviwin have a Sample with used Listview-"Group" but you can not use it as "general GRID"

---

i have made 2 x CLASS it Demo Sample
Code (fw): Select all Collapse
CLASS TExplorer FROM TGrid
CLASS TGrid FROM TControl

1st CLASS is Demo to use Explorer Style with Image
2nd CLASS will be "general" for all Type and can be used by "other" CLASS

"other" CLASS can e.g. be a TREE on left and GRID on right

--

i´m sure Fivewin have some similar Function

CLASS TGrid() will be a new Control for Fivewin to show another Way to handle Data
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HMG 64 Bit Constante -> FiveWin ?
Posted: Sun Oct 23, 2022 10:45 AM
Jimmy wrote:HB_FUNC( GETGRIDVKEY ) is not available under Fivewin


I was referring to the general technique.
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: HMG 64 Bit Constante -> FiveWin ?
Posted: Sun Oct 23, 2022 10:48 AM
hi Enrico,
Enrico Maria Giordano wrote:I was referring to the general technique.

yes, this is what i have to learn using Fivewin with is different to HMG Syntax
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: HMG 64 Bit Constante -> FiveWin ?
Posted: Mon Oct 24, 2022 04:39 AM
hi,

now i have try BCC7 64 Bit and got 1 (same) Error when compile under 64 Bit

HB_FUNC.PRG(24): warning C4244: "=": Konvertierung von "HB_SIZE" in "int", möglicher Datenverlust
HB_FUNC.PRG(489): warning C4244: "Initialisierung": Konvertierung von "HB_SIZE" in "int", möglicher Datenverlust


Code (fw): Select all Collapse
      int nColumnCount ;
24    nColumnCount = hb_parinfa (2, 0);

489   int  nLen = hb_parinfa (2, 0);

---

i saw

Code (fw): Select all Collapse
   WORD wArray   = hb_parinfa( 7, 0 );


so i try to change "int" into "WORD"

HB_FUNC.PRG(24): warning C4244: "=": Konvertierung von "HB_SIZE" in "WORD", möglicher Datenverlust
HB_FUNC.PRG(489): warning C4244: "Initialisierung": Konvertierung von "HB_SIZE" in "WORD", möglicher Datenverlust


here Sample which run under 32 Bit

Code (fw): Select all Collapse
//       ListViewSetItem (hWnd, aItem, nRow)
HB_FUNC( LV_SETITEMTEXT )
{
   #ifndef _WIN64
      HWND hWnd = ( HWND ) hb_parnl( 1 );
   #else
      HWND hWnd = ( HWND ) hb_parnll( 1 );
   #endif
   int nLen = hb_parinfa (2, 0);
   int nRow = hb_parni (3) - 1;
   TCHAR *cText;
   int nCol;

   for (nCol=0 ; nCol < nLen ; nCol++ )
   {
      cText = (TCHAR*) hb_parvc (2 , nCol + 1);
      ListView_SetItemText (hWnd, nRow, nCol, cText);
   }
}

how to use hb_parinfa under Fivewin 64 Bit ( or how to change CODE for other Solution)
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HMG 64 Bit Constante -&gt; FiveWin ?
Posted: Mon Oct 24, 2022 07:35 AM
Jimmy wrote:hi,

now i have try BCC7 64 Bit and got 1 (same) Error when compile under 64 Bit

HB_FUNC.PRG(24): warning C4244: "=": Konvertierung von "HB_SIZE" in "int", möglicher Datenverlust
HB_FUNC.PRG(489): warning C4244: "Initialisierung": Konvertierung von "HB_SIZE" in "int", möglicher Datenverlust


Code (fw): Select all Collapse
      int nColumnCount ;
24    nColumnCount = hb_parinfa (2, 0);

489   int  nLen = hb_parinfa (2, 0);


Try

Code (fw): Select all Collapse
nColumnCount = ( int ) hb_parinfa (2, 0);


and

Code (fw): Select all Collapse
int  nLen = ( int ) hb_parinfa (2, 0);
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: HMG 64 Bit Constante -&gt; FiveWin ?
Posted: Mon Oct 24, 2022 07:57 AM
hi Enrico,
Enrico Maria Giordano wrote:
Code (fw): Select all Collapse
nColumnCount = ( int ) hb_parinfa (2, 0);

Code (fw): Select all Collapse
int  nLen = ( int ) hb_parinfa (2, 0);

it does now compile and run :-)

... but Result is wrong :-)
only 1st Column are show

---

here Sample how Parameter look like

Array aItem is from DIRECTORY()
Code (fw): Select all Collapse
aItem := { ::oGrid:aSource[ ii ] [ F_NAME ]  ,;
      STR( ::oGrid:aSource[ ii ] [ F_SIZE ] ),;
     DTOC( ::oGrid:aSource[ ii ] [ F_DATE ] ),; 
           ::oGrid:aSource[ ii ] [ F_TIME ]  ,;
           ::oGrid:aSource[ ii ] [ F_ATTR ] }

   LV_ADDITEMS( ::oGrid:hLv, aItem, iImage )



Code (fw): Select all Collapse
HB_FUNC( LV_ADDITEMS )
    // LEN(Array[1]) -> nColumn
   nColumnCount = hb_parinfa(2, 0);

   for (nCol = 1; nCol < nColumnCount; nCol++)
       ListView_SetItemText (hWnd, nRow, nCol,  (TCHAR*) hb_parvc (2, nCol+1));

does someone have another Idea how to use hb_parinfa() under Fivewin 64 Bit :-)
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HMG 64 Bit Constante -&gt; FiveWin ?
Posted: Mon Oct 24, 2022 08:07 AM
Then try:

Code (fw): Select all Collapse
WORD  nLen = ( WORD ) hb_parinfa (2, 0);


Also change the other one.
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: HMG 64 Bit Constante -&gt; FiveWin ?
Posted: Mon Oct 24, 2022 08:18 AM
hi Enrico,
Enrico Maria Giordano wrote:
Code (fw): Select all Collapse
WORD  nLen = ( WORD ) hb_parinfa (2, 0);

YES, that now work with BCC7 and MSVC 64 Bit :-)

now i can prepare Source to release
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: HMG 64 Bit Constante -&gt; FiveWin ?
Posted: Mon Oct 24, 2022 03:46 PM

Dear Jimmy,

We are willing to try your new Class! :-)

Excellent!!!

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion