Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用以下代码删除列表视图中特定项目旁边的复选框:
LVITEM lvI; lvI.iItem = i; lvI.mask = LVIF_STATE; lvI.stateMask = LVIS_STATEIMAGEMASK; lvI.state = 0; SendMessage(hListOutput, LVM_SETITEM, 0, (LPARAM) &lvI);
它可以工作,但是如果我单击以前的复选框,它会重新出现!
如何删除列表视图中特定项目上的复选框并保持删除状态?
将复选框的所需状态保存在变量中(默认为空)。在复选框更改事件中,如果该变量不为空,则将状态翻转为保存的值。