Listview control-To enable check boxes

Listview control-To enable check boxes

Hi,
I use the following code in my program:

lvi%mask=LVIS_STATEIMAGEMASK
lvi%iItem=sz_list
lvi%iSubItem=0
lvi%state=INDEXTOSTATEIMAGEMASK(1)
ret = SendMessage (hwndlist,LVM_SETITEMSTATE,sz_list,LOC(lvi))

to check and uncheck my checkboxes.

But I get the following error:
Error: This name does not have a type, and must have an explicit type. [INDEXTOSTATEIMAGEMASK]
lvi%state=INDEXTOSTATEIMAGEMASK(1)

I also tried doing the following:
!DEC$ IF ndef ListView_SetCheckState
!DEC$ DEFINE ListView_SetCheckState(hwndLV, i, fCheck)
!DEC$ ListView_SetItemState(hwndLV, i,
INDEXTOSTATEIMAGEMASK((fCheck)+1), LVIS_STATEIMAGEMASK)
!DEC$ ENDIF

!DEC$ IF .NOT. DEFINED(INDEXTOSTATEIMAGEMASK )
!DEC$ DEFINE INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
!DEC$
!DEC$ ENDIF

call ListView_SetItemState(hwndList,sz_list,INDEXTOSTATEIMAGEMASK((.TRUE.)+1), LVIS_STATEIMAGEMASK)

But I get the following error:
Error: This name does not have a type, and must have an explicit type. [INDEXTOSTATEIMAGEMASK]
call ListView_SetItemState(hwndList, sz_list, INDEXTOSTATEIMAGEMASK((fcheck)+1), LVIS_STATEIMAGEMASK)

Can someone tell me what the correct parameters are and how they should be defined.Where can I find samples of how these statements must be used? Thanks,
Archana.

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Fortran is not C. !DEC$ DEFINE is not a macro substitution feature.

Steve

Steve - Intel Developer Support

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya