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

문제

  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         |
    
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top