Okay.. Now, my dialog scripting is rusty, but I'll give this a go...

Code:
on *:dialog:MyDlg:*:*:{
  if ($devent == sclick) && ($did == 1) {
    var %x = $did(1).lines
    var %y = 1
    while (%y <= %x) { 
      did -ck cp_user 5 %y
      inc %y 
    }
  }
}

If you set the dialog id to the right one, and make sure the multsel option is set... Clicking one of the items in the list will select the entire list.