TCheckListBox、CheckListBox
http://www.cnblogs.com/mingdep/archive/2012/03/20/2408282.html
全部打勾
for (int i = 0; i < CheckListBox1->Items->Count; i++)
{
CheckListBox1->Checked[i] = aflag;
}
可多选,拖拉多选
CheckListBox1->MultiSelect = true;
选中的打勾
if (CheckListBox1->SelCount > 1)
{
for (int i = 0; i < CheckListBox1->Items->Count; i++)
{
if (CheckListBox1->Selected[i])
CheckListBox1->Checked[i] = false;
}
}
else
CheckListBox1->Checked[CheckListBox1->ItemIndex] = false;