In win32 GUI programing with C++, How can I add a expanding button in the TreeViewCtrl before the root item?

StackOverflow https://stackoverflow.com/questions/10371258

Question

  1. In the C++ 、Win32、TreeCtrl, how can I add a expanding button before the root TVITEM, like add a expanding button before "United States". I'm sorry I can't post a image. So I try draw it blow.

    TreeViewCtrl


    |  United States           |
    |     - Pennsylvania       |
    |         Altoona          |
    |         Harrisburg       |
    |     + Washington         |
    
Was it helpful?

Solution

There are some MSDN pages on the different styles you may want to achieve: http://msdn.microsoft.com/en-us/library/bb760013.aspx and also this http://msdn.microsoft.com/en-us/library/b17bescz.aspx

MSDN states that

TVS_LINESATROOT

Uses lines to link items at the root of the tree-view control. This value is ignored if TVS_HASLINES is not also specified.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top