Solved

CTreeview question

Posted on 1998-10-30
2
354 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
has77  challenge 9 98
My project did see openJDK that I installed. What could be the problem 7 161
wordcount challenge 11 146
wordmultiple challenge 12 156
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.

733 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