|
-
March 30th, 1999, 05:22 AM
#1
CCheckListBox!!
Hi,
I have a cheklistbox created in my application. I have created using the CListBox and setting the OwnerDraw as TRUE. I
am adding a few strings to the checklistbox and trying to delete them if they are UNCHECKED.
PROBLEM!!!
But it is not deleteing all the strings and the output is not the predicted one.
The code I am using for deletion is....
////////////////////CODE////////////
CCheckListBox *clb = (CCheckListBox *)GetDlgItem(IDC_PEAKLIST);
int NumofItems;
NumofItems = clb->GetCount();
for (int i=0;i<NumofItems;i++)
{
int Checked;
int num;
Checked = clb->GetCheck(i);
if (Checked == 0)
{
num = clb->DeleteString(i);
if (num = LB_ERR)
AfxMessageBox("Error deleteing string!!" ;
}
}
////////////////////////////////////////////////////////////
Is it a known bug or a problem?
Please help me to solve the problem.....
Thanks in advance........
Vittal
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|