-
Tree-view bold items
Hi everyone,
I'm struggling to get bold items in my Tree-view. I'm working on a C project using the standard Windows API. The MSDN Library states that the TVIS_BOLD state would set the item to bold but apparently I couldn't get it to work.
So far I've been trying to accomplish that with the following:
Code:
tvitem.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE;
tvitem.stateMask = TVIS_STATEIMAGEMASK;
tvitem.state = INDEXTOSTATEIMAGEMASK(ITEMPIC_NR) | TVIS_BOLD;
...
item_handle = TreeView_InsertItem(hwndl, &tvinsert);
I also changed the items label programmatically by using
Code:
TreeView_SetItem(hwnd, &tvitem);
but this didn't help to change the item to bold.
Any help is much appreciated. Thanks in advance.
Manuel
-
Or if it makes things easier:
How do I use the TreeView_SetItem and _GetItem macros?
MSDN states that one receives the data as supplied with the TVITEM struct pointer. But that sounds a bit unfamiliar to me that I need to preset my struct with those flags that I want to receive.
Thanks allot.
Manuel
-
-
Now that was a tricky one. Who would have thought that you have to set both:
Code:
tvitem.mask = tvitem.mask | TVIS_BOLD;
tvitem.stateMask = tvitem.statemask | TVIS_BOLD;
Anyway. Thanks allot.
Manuel