I have made a tree view control in dialog box, using resource editor.
I have set the checkbox style with SetWindowLongPtr( ... ) function, the way Microsoft describe
The tree control uses state images to draw the checkboxes. According to the docs on the TVS_CHECKBOXES
style:
State image 1 is the unchecked box and state image 2 is the checked box. Setting the state image to zero removes the check box altogether.
So something like this should let you remove the check box from a tree item:
TVITEM tvi;
tvi.hItem = hTreeItem;
tvi.mask = TVIF_STATE;
tvi.stateMask = TVIS_STATEIMAGEMASK;
tvi.state = 0;
TreeView_SetItem(hWndTree, &tvi);