hi
I have a list control which has the LVS_EX_CHECKBOXES style.
im inserting the colum using InsertColumn and LV_COLUMN structure.
like shown below
im using InsertItem to fill the list using LV_ITEM structure. something like shown belowCode:LV_COLUMN Column; Column.mask = LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH |LVCF_IMAGE ; Column.cx = 20; Column.cchTextMax = 10; Column.iSubItem = 0; Column.pszText = "Image#"; InsertColumn (0, &Column);
i can see the check boxes coming but im not able to set them . I want to set the check boxes programaticallyCode:LV_ITEM FieldData; FieldData.iItem = iItem; FieldData.mask = LVIF_TEXT|LVIF_IMAGE ; FieldData.iSubItem = 0; FieldData.pszText = (char*)(LPCSTR)strImageNo; FieldData.cchTextMax = strImageNo.GetLength ();
im using
ListView_SetItemState( handle, CurrentItem,
INDEXTOSTATEIMAGEMASK(2), LVIS_STATEIMAGEMASK);
but still i dont see the check boxes coming as checked.
Any help is greately appreciated
Thanks
shashi




Reply With Quote