做了3个抽屉,可以上下滑动,现在想在每一个抽屉下添加一个tree,改如何实现?谁有自己重绘的tree的源代码?

解决方案 »

  1.   

    MFC的CTreeCtrl就行啊,可以动态Create出来并放到指定位置,MSDN上有例子。
      

  2.   

    自带tree可以显示1个button,一个checkbox,一个图标,一行文字。
    要更多功能请自绘,treeview支持custom draw比较好用。
      

  3.   

    自带的tree应该如何实现动态添加?
      

  4.   

    // Assuming your window has a CTreeCtrl member named m_TreeCtrl,
      
      // you can create the tree control window with a child ID of ID_MYTREE
      
      // using a call like this:
      
      
      m_TreeCtrl.Create(WS_VISIBLE | WS_TABSTOP | WS_CHILD | WS_BORDER
         | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_HASLINES
         | TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_EDITLABELS,
         CRect(10, 10, 300, 100), this, ID_MYTREE);
      
      // The control will have the appropiate window styles, and the tree
      
      // control styles specified are those most commonly used.
      

  5.   

    3个tree添加成功了,怎样响应onsize()来改变大小?添加tree的时候tree的rect是固定的。