作者:手机用户2502933795 | 来源:互联网 | 2023-05-19 16:19
m_list.SetExtendedStyle(m_list.GetExtendedStyle()|LVS_EX_CHECKBOXES);怎样确定里面的复选框被选中
m_list.SetExtendedStyle(m_list.GetExtendedStyle()|LVS_EX_CHECKBOXES);
怎样确定里面的复选框被选中
3 个解决方案
ListView_GetCheckState(hwndLV,i);
ListView_GetCheckState
Determines if an item in a list-view control is selected. This should be used only for list-view controls that have the LVS_EX_CHECKBOXES style.
BOOL ListView_GetCheckState(
HWND hwndLV,
UINT iIndex
);
Parameters
hwndLV
Handle to a list-view control.
iIndex
Index of the item for which to retrieve the check state.
Return Values
Returns nonzero if the given item is selected, or zero otherwise. If this macro is applied to a list-view control that does not have check boxes enabled, the return value is not reliable.