How do you I set the check mark checked with the SendMessage? I saw on a previous board that there is ListView_SetCheckState, but I searched the <commctrl.h> and it didn't find that macro.
I got this so far:
Code:void SetItemChecked(HWND hwnd, int index) { LVITEM lvItem; lvItem.mask=LVIF_STATE; // lvItem.state= //stuck here SendMessage(hwnd, LVM_SETITEMSTATE, (WPARAM) (int)index, (LPARAM) (LPLVITEM)lvItem); }
The constants I found were:
LVIS_ACTIVATING
The item is being activated in an LVN_ITEMACTIVATE notification.
LVIS_CUT
The item is marked for a cut-and-paste operation.
LVIS_DROPHILITED
The item is highlighted as a drag-and-drop target.
LVIS_FOCUSED
The item has the focus, so it is surrounded by a standard focus rectangle. Although more than one item may be selected, only one item can have the focus.
LVIS_SELECTED
The item is selected. The appearance of a selected item depends on whether it has the focus and also on the system colors used for selection.
I don't know what constant to enter here. Or if I have to fill out more fields. Any help would be really be appriated.
Thanks.