HMG 64 Bit Constante -> FiveWin ?

Re: HMG 64 Bit Constante -> FiveWin ?

Postby Jimmy » 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: Select all  Expand view
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
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: HMG 64 Bit Constante -> FiveWin ?

Postby Enrico Maria Giordano » Sun Oct 23, 2022 10:45 am

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


I was referring to the general technique.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HMG 64 Bit Constante -> FiveWin ?

Postby Jimmy » 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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: HMG 64 Bit Constante -> FiveWin ?

Postby Jimmy » Mon Oct 24, 2022 4: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: Select all  Expand view
     int nColumnCount ;
24    nColumnCount = hb_parinfa (2, 0);

489   int  nLen = hb_parinfa (2, 0);
 

---

i saw

Code: Select all  Expand view
  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 view
//       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
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: HMG 64 Bit Constante -> FiveWin ?

Postby Enrico Maria Giordano » Mon Oct 24, 2022 7: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: Select all  Expand view
     int nColumnCount ;
24    nColumnCount = hb_parinfa (2, 0);

489   int  nLen = hb_parinfa (2, 0);
 


Try

Code: Select all  Expand view
nColumnCount = ( int ) hb_parinfa (2, 0);


and

Code: Select all  Expand view
int  nLen = ( int ) hb_parinfa (2, 0);
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HMG 64 Bit Constante -> FiveWin ?

Postby Jimmy » Mon Oct 24, 2022 7:57 am

hi Enrico,
Enrico Maria Giordano wrote:
Code: Select all  Expand view
nColumnCount = ( int ) hb_parinfa (2, 0);

Code: Select all  Expand view
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 view
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 view
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
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: HMG 64 Bit Constante -> FiveWin ?

Postby Enrico Maria Giordano » Mon Oct 24, 2022 8:07 am

Then try:

Code: Select all  Expand view
WORD  nLen = ( WORD ) hb_parinfa (2, 0);


Also change the other one.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HMG 64 Bit Constante -> FiveWin ?

Postby Jimmy » Mon Oct 24, 2022 8:18 am

hi Enrico,
Enrico Maria Giordano wrote:
Code: Select all  Expand view
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
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: HMG 64 Bit Constante -> FiveWin ?

Postby Antonio Linares » Mon Oct 24, 2022 3:46 pm

Dear Jimmy,

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

Excellent!!!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 76 guests