[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

CTreeview question

Posted on 1998-10-30
2
Medium Priority
?
376 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 400 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

656 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