HMG 64 Bit Constante -> FiveWin ?

User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: HMG 64 Bit Constante -> FiveWin ?

Post by Jimmy »

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: Select all | Expand

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
User avatar
Enrico Maria Giordano
Posts: 8764
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: HMG 64 Bit Constante -> FiveWin ?

Post by Enrico Maria Giordano »

Jimmy wrote:HB_FUNC( GETGRIDVKEY ) is not available under Fivewin


I was referring to the general technique.
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: HMG 64 Bit Constante -> FiveWin ?

Post by Jimmy »

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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: HMG 64 Bit Constante -> FiveWin ?

Post by Jimmy »

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: Select all | Expand

     int nColumnCount ;
24    nColumnCount = hb_parinfa (2, 0);

489   int  nLen = hb_parinfa (2, 0);
 

---

i saw

Code: Select all | Expand

  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: Select all | Expand

//       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
User avatar
Enrico Maria Giordano
Posts: 8764
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: HMG 64 Bit Constante -> FiveWin ?

Post by Enrico Maria Giordano »

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: Select all | Expand

     int nColumnCount ;
24    nColumnCount = hb_parinfa (2, 0);

489   int  nLen = hb_parinfa (2, 0);
 


Try

Code: Select all | Expand

nColumnCount = ( int ) hb_parinfa (2, 0);


and

Code: Select all | Expand

int  nLen = ( int ) hb_parinfa (2, 0);
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: HMG 64 Bit Constante -> FiveWin ?

Post by Jimmy »

hi Enrico,
Enrico Maria Giordano wrote:

Code: Select all | Expand

nColumnCount = ( int ) hb_parinfa (2, 0);

Code: Select all | Expand

int  nLen = ( int ) hb_parinfa (2, 0);

it does now compile and run :D

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

---

here Sample how Parameter look like

Array aItem is from DIRECTORY()

Code: Select all | Expand

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: Select all | Expand

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 :idea:
greeting,
Jimmy
User avatar
Enrico Maria Giordano
Posts: 8764
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: HMG 64 Bit Constante -> FiveWin ?

Post by Enrico Maria Giordano »

Then try:

Code: Select all | Expand

WORD  nLen = ( WORD ) hb_parinfa (2, 0);


Also change the other one.
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: HMG 64 Bit Constante -> FiveWin ?

Post by Jimmy »

hi Enrico,
Enrico Maria Giordano wrote:

Code: Select all | Expand

WORD  nLen = ( WORD ) hb_parinfa (2, 0);

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

now i can prepare Source to release
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42595
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 38 times
Been thanked: 86 times
Contact:

Re: HMG 64 Bit Constante -> FiveWin ?

Post by Antonio Linares »

Dear Jimmy,

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

Excellent!!!
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply