In order to carry out my nefarious plans I want to add tree-view +/- dotted boxes to a list-view to make it into a tree-list-view. I have this so far:
In order to draw the tree-view elements, all I need to do is move the items in the first column over to the right depending on their indentation levels and in the space to the left use DrawThemeBackground() to draw the tree-view elements.
• What is the best practice when it comes to OpenThemeData()/CloseThemeData()? Should I keep the theme data open during the whole lifetime of the control, or is it normal to open/close it with every draw?
• What is the easiest approach to drawing this? I want the list-view to draw normally, just with some marking inserted to the left of each item. If I override WM_PAINT on the list-view control I would have to manually draw everything. But if I use LVS_OWNERDRAWFIXED + WM_DRAWITEM, don’t I have almost the same problem except that it handles the locations of each item for me? I would still have to manually draw the text, selection state, focus, etc. Is there an easier way to get the control to draw itself but with the addition of the DrawThemeBackground() elements to the left in the first column, or is LVS_OWNERDRAWFIXED + WM_DRAWITEM really the easiest way?
L. Spiro