Casting in beta 8
Posted: Sat Jan 12, 2019 8:32 am
Hi,
the following fragment of code does not compiles anymore in Beta 8:
The entire function is the following:
I have changed that to
Of course I have applied this change also to the VO version of my code.
Wolfgang
the following fragment of code does not compiles anymore in Beta 8:
Code: Select all
tvItem.state := INDEXTOSTATEIMAGEMASK( ( word ( _cast , fCheck ) ) + 1 )
Code: Select all
function TreeView_SetCheckState( hwndTreeView as ptr, hItem as ptr, fCheck as logic ) as logic pascal
local tvItem is _winTV_ITEM
local lSet as logic
if _and ( GetWindowLong( hwndTreeView , GWL_STYLE ), TVS_CHECKBOXES ) == TVS_CHECKBOXES
tvItem.mask := _or ( TVIF_HANDLE , TVIF_STATE )
tvItem.hItem := hItem
tvItem.stateMask := TVIS_STATEIMAGEMASK
tvItem.state := INDEXTOSTATEIMAGEMASK( ( word ( _cast , fCheck ) ) + 1 )
lSet := TreeView_SetItem( hwndTreeView, @tvItem )
else
lSet := false
endif
return lSet
Code: Select all
if fCheck
tvItem.state := INDEXTOSTATEIMAGEMASK( word( 2 ) )
else
tvItem.state := INDEXTOSTATEIMAGEMASK( word ( 1 ) )
endif
Wolfgang