Solved

CTreeview question

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

762 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

20 Experts available now in Live!

Get 1:1 Help Now