Dear Mark,
I want to display both checkbox and image.
Now I found the solution:
hItem = SendMessage(TreeView1.hWnd, TVM_GETNEXTITEM, ByVal TVGN_CARET, ByVal
0)
If hItem Then
Dim tvi As TVITEM
tvi.mask = TVIF_HANDLE Or TVIF_STATE
tvi.hItem = hItem
tvi.stateMask = TVIS_STATEIMAGEMASK
tvi.state = INDEXTOSTATEIMAGEMASK((Index)) 'Index of picture box you
select
Call SendMessage(TreeView1.hWnd, TVM_SETITEM, 0, tvi)
End If
Regards.
**************************************************************
Le Huu Duc
Fujitsu Computer Products of Viet Nam, Inc.
Information System Section
Tel: +xx-xx-xxxxxx Ext: 332
Fax +xx-xx-xxxxxx
E-mail: lhduc@f...
**************************************************************
----- Original Message -----
From: "Mark Roworth" <markro@p...>
To: "professional vb" <pro_vb@p...>
Sent: Monday, October 15, 2001 3:21 PM
Subject: [pro_vb] RE: Many different checkboxes in TreeView
> If you use the small icon property and create some images that represent
> checked and unchecked checkboxes then you can emulate it. It means not
using
> the normal checkboxes and having some extra code on the click event to
> change the smallicon properties of the appropriate item. Also, you can't
> have images next to each line because you are using the smallicon property
> for the checkbox. Cheers,
>
> Mark
>
>
>
> -----Original Message-----
> From: lhduc@f... [mailto:lhduc@f...]
> Sent: 15 October 2001 06:51
> To: professional vb
> Subject: [pro_vb] Many different checkboxes in TreeView
>
>
> Hello,
> Please help me,
> How one treeview can display other different image in checkbox. For exp.,
> some checkboxes have black color, some checkboxes have blue color (same as
> Backup utility of Windows).
> Thank you very much.