i have found in c:\fwh\source\winapi\listview.c what was change for Unicode
- Code: Select all Expand view RUN
- LPWSTR pWide = fw_parWide( 3 );
// lvi.pszText = ( LPTSTR ) hb_parc( 3 );
lvi.pszText = pWide;
Question : is fw_parWide() the same as AnsiToWide()
---
i have now include
- Code: Select all Expand view RUN
- #define UNICODE // Made Unicode compatible 2023-07-07
#include <CommCtrl.h>
#undef UNICODE
#include "fwh.h"
Question : why "#undef UNICODE"
---
now i get Warning
Warning W8075 .\\HB_FUNC.PRG 702: Suspicious pointer conversion in function HB_FUN_LV_ADDITEM
Warning W8075 .\\HB_FUNC.PRG 717: Suspicious pointer conversion in function HB_FUN_LV_ADDITEM
Warning W8075 .\\HB_FUNC.PRG 764: Suspicious pointer conversion in function HB_FUN_LV_ADDITEMS
Warning W8075 .\\HB_FUNC.PRG 778: Suspicious pointer conversion in function HB_FUN_LV_ADDITEMS
Warning W8075 .\\HB_FUNC.PRG 813: Suspicious pointer conversion in function HB_FUN_LV_ADDCOLUMN
Warning W8075 .\\HB_FUNC.PRG 942: Suspicious pointer conversion in function HB_FUN_LV_GETITEMTEXT
Warning W8075 .\\HB_FUNC.PRG 948: Suspicious pointer conversion in function HB_FUN_LV_GETITEMTEXT
Warning W8075 .\\HB_FUNC.PRG 1265: Suspicious pointer conversion in function HB_FUN_LV_INSERTCOLUMN
Warning W8075 .\\HB_FUNC.PRG 1407: Suspicious pointer conversion in function HB_FUN_LV_SETITEMTEXT
Warning W8075 .\\HB_FUNC.PRG 1601: Suspicious pointer conversion in function HB_FUN_LV_SETGRIDQUERYDATA
Warning W8075 .\\HB_FUNC.PRG 1601: Suspicious pointer conversion in function HB_FUN_LV_SETGRIDQUERYDATA
i guess it is while i have not use fw_parWide() / LPWSTR but LPTSTR
---
how to use this with Unicode
- Code: Select all Expand view RUN
- lvi.pszText = (TCHAR*) hb_parvc (2, 1);
- Code: Select all Expand view RUN
- LPSTR lpText;
char * caption;
...
for (nCol = 1; nCol < nColumnCount; nCol++)
{
caption = (TCHAR*) hb_parvc (2, nCol+1) ;
lpText = caption;
ListView_SetItemText (hWnd, nRow, nCol, lpText );
}
- Code: Select all Expand view RUN
- 1599 // lstrcpyn( pDispInfo->item.pszText, ( CHAR * ) hb_parc( 2 ), pDispInfo->item.cchTextMax );
1600 LPWSTR lpText = fw_parWide( 2 );
1601 lstrcpyn( pDispInfo->item.pszText, lpText, pDispInfo->item.cchTextMax );
- Code: Select all Expand view RUN
- HB_FUNC( LV_GETITEMTEXT )
{
TCHAR buffer [1024] ;
...
lvi.pszText = buffer;
buffer[ 0 ] = 0;
buffer[ 1023 ] = 0;
ListView_GetItem( hWnd, &lvi );
hb_retc (lvi.pszText);
}
how can help me please