Solved

CTreeview question

Posted on 1998-10-30
2
344 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replacement selected text 2 58
EvenOdd challenge 10 88
Fibonacci challenge 11 109
changeXy challenge 13 67
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now