Solved

CTreeview question

Posted on 1998-10-30
2
351 Views
Last Modified: 2013-11-20
I am building an app using the CTreeView class. How do I go about setting the style for the underlying CTreeCtrl class which this CTreeView controls ? As far as I can see, the view class has only the GetTreeCtrl member function to get to the CTreeCtrl object.
0
Comment
Question by:fstab
2 Comments
 
LVL 1

Accepted Solution

by:
appdev earned 100 total points
ID: 1324058
  Hi, fstab.
   You can override the PreCreateWindow message in order to change the styles of your TreeView e.g.:

BOOL CMyTreeView::PreCreateWindow(CREATESTRUCT& cs)
{
      // TODO: Modify the Window class or styles here by //modifying
//  the CREATESTRUCT cs

      cs.style|=(TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT|TVS_SHOWSELALWAYS );
      return CTreeView::PreCreateWindow(cs);

}

   Please, check "Tree View Controls Window Styles" in help.
Hope this help you.
0
 
LVL 1

Author Comment

by:fstab
ID: 1324059
Perfect answer. Thanks.

fstab.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question