Hi, @abc abc
You could try to create CCheckListBox by CListBox:
- Drag List Box to the Dialog and modify Has Strings and Owner Draw in properties:
- Add
CCheckListBox m_CheckListBox; in dialog's .h file.
- Add snippet below in dialog's OnInitDialog() function m_CheckListBox.SubclassDlgItem(IDC_LIST1, this);
m_CheckListBox.SetCheckStyle(BS_AUTOCHECKBOX);
m_CheckListBox.AddString(L"Test String");
m_CheckListBox.AddString(L"Test String");

Best regards,
Minxin Yu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.