You should check in the OnClick event if the click was realy on an icon. Below an example.
procedure TForm1.TreeView1Click(Sender: TObject);
var
P:TPoint;
begin
GetCursorPos(P);
P := TreeView1.ScreenToClient(P);
if (htOnStateIcon in
TreeView1.GetHitTestInfoAt(P.X,P.Y)) then
ToggleTreeViewCheckBoxes(
TreeView1.Selected,
cFlatUnCheck,
cFlatChecked,
cFlatRadioUnCheck,
cFlatRadioChecked);
end;
Good luck!