Insert checkbox column on a listctrl
I made a list with a checkbox column consulting the answer above.
Now my superior asks me to disable the OK button at first, enable it when at least there is one line is checked.
I looked up seems there is easy way to catch the click event when a checkbox is in a listctrl.

Add
LVN_ITEMCHANGEDto the message map. This will notify the dialog when changes are made to the list item:Next, handle the message and respond each time a list item is checked or unchecked. Then you have to go through all the items in the list box and use
CListCtrl::GetCheck. Example:You can add
GetDlgItem(IDOK)->EnableWindow(FALSE);inOnInitDialogso that the OK button is initially disabled.Side note, your dialog is using the old style look. See this link on using the modern style UI: Upgraded MFC application still looks old