mardi 5 juin 2018

How to create a list where each row has a checkbox column?

I have this .rc file, where I have the below controls as my dialog:

MyDialog DIALOGEX 0, 0, 335, 297
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
    GROUPBOX        "MyTitle:",-1,5,6,324,234
    LISTBOX         MyList,11,19,312,214,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP,0,HIDC_IP_COPY_COLOR_LIST
    PUSHBUTTON      "Select All",SelectAllBtn,11,240,50,14
    PUSHBUTTON      "UnSelect UnSelectAllBtn,69,240,50,14
END

And I know that there exist a checkbox control type:

CONTROL   "MyLabel",MyCheckbox,"Button",BS_AUTOCHECKBOX,11,20,82,14

I would like to have a column in my list, where it is checkboxes for each row, and trigger a function onCheckboxClicked(). How can I do that?




Aucun commentaire:

Enregistrer un commentaire