How to get a CTreeCtrl like the DevStudio ResourceView tab... 
Author Message
 How to get a CTreeCtrl like the DevStudio ResourceView tab...

Hi folks,

I am trying to figure out if I can get a CTreeCtrl to configure just
like the DevStudio ResourceView tab.  I don't particularly care about
the little folder bitmaps.  However, I am interested in getting many
top level items (not just one root for the tree).  I cannot figure out
a way to configure the standard MFC CTreeCtrl control in a way to do
this.  (And I don't have much faith in the Stingray SECTreeCtrl - I've
seen many posts about its idiosyncrasies and I couldn't even get it to
work at all).

BTW, does anyone know why the styles like TVS_HASBUTTONS and
TVS_HASLINES might stop working all of the sudden?  They used to work
just fine, but recently, I cannot get them to work.  I can see them in
my resource file, but when I compile the resource and link I don't see
their effect on the control.

TIA,
= Jeff Andrews =

(you know which part to remove to email me...)



Sat, 23 Sep 2000 03:00:00 GMT  
 How to get a CTreeCtrl like the DevStudio ResourceView tab...


Fri, 19 Jun 1992 00:00:00 GMT  
 How to get a CTreeCtrl like the DevStudio ResourceView tab...

--------------------------------------------------------------

Quote:

>Hi folks,

>I am trying to figure out if I can get a CTreeCtrl to configure just
>like the DevStudio ResourceView tab.  I don't particularly care about
>the little folder bitmaps.  However, I am interested in getting many
>top level items (not just one root for the tree).  I cannot figure out
>a way to configure the standard MFC CTreeCtrl control in a way to do
>this.  (And I don't have much faith in the Stingray SECTreeCtrl - I've
>seen many posts about its idiosyncrasies and I couldn't even get it to
>work at all).

>BTW, does anyone know why the styles like TVS_HASBUTTONS and
>TVS_HASLINES might stop working all of the sudden?  They used to work
>just fine, but recently, I cannot get them to work.  I can see them in
>my resource file, but when I compile the resource and link I don't see
>their effect on the control.

>TIA,
>= Jeff Andrews =

>(you know which part to remove to email me...)



Sat, 30 Sep 2000 03:00:00 GMT  
 How to get a CTreeCtrl like the DevStudio ResourceView tab...

Quote:

>--------------------------------------------------------------

>>Hi folks,

>>I am trying to figure out if I can get a CTreeCtrl to configure just
>>like the DevStudio ResourceView tab.  I don't particularly care about
>>the little folder bitmaps.  However, I am interested in getting many
>>top level items (not just one root for the tree).  I cannot figure out
>>a way to configure the standard MFC CTreeCtrl control in a way to do
>>this.  (And I don't have much faith in the Stingray SECTreeCtrl - I've
>>seen many posts about its idiosyncrasies and I couldn't even get it to
>>work at all).

You can insert as many items as you want under the (invisible) root:

TreeCtrl.InsertItem("One Item",TVI_ROOT);
TreeCtrl.InsertItem("Another Item",TVI_ROOT);

Or what is the problem ?

cU
--

   http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*NEW*: Retriever 1.1 is out: http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sat, 30 Sep 2000 03:00:00 GMT  
 How to get a CTreeCtrl like the DevStudio ResourceView tab...

have a look at http://members.tripod.com/~rajsamp/Drive.zip
it is a slightly modified version of MSJ article.

--
-------------------------------------------------------
Rajesh Parikh
Microsoft Certified Solution Developer

-------------------------------------------------------

Quote:

>--------------------------------------------------------------

>>Hi folks,

>>I am trying to figure out if I can get a CTreeCtrl to configure just
>>like the DevStudio ResourceView tab.  I don't particularly care about
>>the little folder bitmaps.  However, I am interested in getting many
>>top level items (not just one root for the tree).  I cannot figure out
>>a way to configure the standard MFC CTreeCtrl control in a way to do
>>this.  (And I don't have much faith in the Stingray SECTreeCtrl - I've
>>seen many posts about its idiosyncrasies and I couldn't even get it to
>>work at all).

>>BTW, does anyone know why the styles like TVS_HASBUTTONS and
>>TVS_HASLINES might stop working all of the sudden?  They used to work
>>just fine, but recently, I cannot get them to work.  I can see them in
>>my resource file, but when I compile the resource and link I don't see
>>their effect on the control.

>>TIA,
>>= Jeff Andrews =

>>(you know which part to remove to email me...)



Wed, 04 Oct 2000 03:00:00 GMT  
 How to get a CTreeCtrl like the DevStudio ResourceView tab...


Fri, 19 Jun 1992 00:00:00 GMT  
 How to get a CTreeCtrl like the DevStudio ResourceView tab...

I believe I have not described this situation very well - let me try
another stab at it:

I am trying to configure a CTreeCtrl that acts like the one in the
DevStudio ResourceView tab - when there are multiple resource files in
the project (I had forgotten to mention that last time).  An example
is attached as "Tree.jpg".

The tricky parts are:
1.) supporting multiple top level tree items
2.) getting all of the top level tree items to show an expand button
when they are compressed and have leaves.

Any ideas how to get this functionality out of a CTreeCtrl?

Regards,
= Jeff Andrews =

(you know which part to remove to email me...)

==============================================

Quote:
>have a look at http://members.tripod.com/~rajsamp/Drive.zip
>it is a slightly modified version of MSJ article.

==============================================
(I had also written this previously...)
Quote:
>I am trying to figure out if I can get a CTreeCtrl to configure just
>like the DevStudio ResourceView tab.  I don't particularly care about
>the little folder bitmaps.  However, I am interested in getting many
>top level items (not just one root for the tree).  I cannot figure out
>a way to configure the standard MFC CTreeCtrl control in a way to do
>this.  (And I don't have much faith in the Stingray SECTreeCtrl - I've
>seen many posts about its idiosyncrasies and I couldn't even get it to
>work at all).



Fri, 06 Oct 2000 03:00:00 GMT  
 How to get a CTreeCtrl like the DevStudio ResourceView tab...

Quote:

>I believe I have not described this situation very well - let me try
>another stab at it:

>I am trying to configure a CTreeCtrl that acts like the one in the
>DevStudio ResourceView tab - when there are multiple resource files in
>the project (I had forgotten to mention that last time).  An example
>is attached as "Tree.jpg".

>The tricky parts are:
>1.) supporting multiple top level tree items
>2.) getting all of the top level tree items to show an expand button
>when they are compressed and have leaves.

>Any ideas how to get this functionality out of a CTreeCtrl?

>Regards,
>= Jeff Andrews =

Jeff, I'm quite positive I have answered this once... here goes again:

You can insert any number of items under TVI_ROOT. There must not be an
actual TVI_ROOT item.

ex:

m_TreeCtrl.InsertItem("One item",TVI_ROOT);
m_TreeCtrl.InsertItem("Other item",TVI_ROOT);
m_TreeCtrl.InsertItem("Lookitsan item",TVI_ROOT);
m_TreeCtrl.InsertItem("...item",TVI_ROOT);

If they have children they will happily display the expand [+], provided the
TreeCtrl has the appropriate style
TVS_LINESATROOT|TVS_HASBUTTONS|TVS_HASLINES

cU
--

   http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*NEW*: Retriever 1.1 is out: http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sat, 07 Oct 2000 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Output to build tab of DevStudio output window

2. HELP:Upside down tab control/property pages, like DevStudio or InstallShield

3. Tab controls ala DevStudio IDE

4. Launch New DevStudio; Default DevStudio Open Mode

5. Root item not getting selected on clicking on it in CTreeCtrl

6. Dialog not getting CTreeCtrl message...?!?

7. getting mouse position over a ctreectrl

8. CTreeCtrl: getting TV_ITEM structure???

9. Getting item selected in CTreeCtrl when right button clicked

10. Getting a Drag image in a CTreeCtrl

11. Getting CTreeCtrl to show

12. Root item not getting selected on clicking on it in CTreeCtrl

 

 
Powered by phpBB® Forum Software