i use LVCOLUMN from this Thread
https://forums.fivetechsupport.com/viewtopic.php?f=3&t=42301
LVCOLUMN Structure at Microsoft
https://learn.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-lvcolumna
https://learn.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-lvcolumnw
- Code: Select all Expand view
- HB_FUNC( LVCOLUMNNEW )
{
LVCOLUMN * lvcol = ( LVCOLUMN * ) hb_xgrab( sizeof( LVCOLUMN ) );
memset( lvcol, 0, sizeof( LVCOLUMN ) );
hb_retptr( ( void * ) lvcol );
}
but it fail here
- Code: Select all Expand view
- METHOD InitTheListView()
::oLVCol := LVCOLUMN():New()
// LVCF_FMT = col:fmt -> LVCFMT_LEFT / LVCFMT_RIGHT / LVCFMT_CENTER
// LVCF_WIDTH = col:cx -> Pixel wide
// LVCF_TEXT = col:pszText -> Data
// LVCF_SUBITEM = use Sub-Items
::oLVCol:Mask := hb_bitOr(LVCF_FMT, LVCF_WIDTH, LVCF_TEXT, LVCF_SUBITEM )
for nCol := 1 to LEN(::aHeader)
::oLVCol:pszText := ::aHeader[nCol][ID_HEADER]
Error description: Error BASE/1005 Message not found: LVCOLUMN:_PSZTEXT
Args:
[ 1] = O LVCOLUMN
Question : do i have to define a Method and HB_FUNC() for every Structure Member
- Code: Select all Expand view
- METHOD pszText( cValue ) CLASS LVColumn
...
HB_FUNC( LV_COLUMNPSZTEXT )
{
int pszText = ( ( LVCOLUMN * ) hb_parptr( 1 ) )->pszText;
if( ! hb_pcount() )
hb_retnl( ( HB_LONG ) pszText );
else
( ( LVCOLUMN * ) hb_parptr( 1 ) )->pszText = ( char * ) hb_parnl( 2 );
hb_retnl( pszText );
}
under Xbase++ i have access to all Member of Structure