CTreeCtrl & CListCtrl

Hi, Its the same question that I've seen in the archives but the
solution I found was an outdated one. I would like to use a tree object
as the member of a list control. What are my options? Appreciate your
help. Thanks.
-KK

0
pedagani (10)
11/22/2005 7:04:51 PM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
1041 Views

Similar Articles

[PageSpeed] 13

This one still works.

http://www.codeproject.com/treectrl/treelist.asp

I use this:

http://www.codejock.com/products/reportcontrol/

But it comes with a suite that you have to pay for...

Tom

<pedagani@gmail.com> wrote in message 
news:1132686291.665005.4680@o13g2000cwo.googlegroups.com...
> Hi, Its the same question that I've seen in the archives but the
> solution I found was an outdated one. I would like to use a tree object
> as the member of a list control. What are my options? Appreciate your
> help. Thanks.
> -KK
> 


0
tserface (3860)
11/22/2005 7:32:40 PM
Tom Serface wrote:
> This one still works.
> http://www.codeproject.com/treectrl/treelist.asp
>...
>
> Tom
>
Thanks Tom for the link. I dont understand the following part in the
process of inserting the TreeList into my project
# Layout a user-defined control inside the dialog into which the
control is supposed to be intserted. In the class field type:
"LANTIVTREELISTCTRL"
Could anyone please clarify. I have to tell that I dont have much
experience with Visual C++. 
Waiting for some tips. Thank you.

0
pedagani (10)
11/22/2005 10:42:53 PM
If you are using a dialog editor look for an icon that has a persons head on
it.  That's a user control.  Once you place one of these in your dialog box
then you will see that it has a property called "class"

AliR.

<pedagani@gmail.com> wrote in message
news:1132699373.630551.246020@f14g2000cwb.googlegroups.com...
>
> Tom Serface wrote:
> > This one still works.
> > http://www.codeproject.com/treectrl/treelist.asp
> >...
> >
> > Tom
> >
> Thanks Tom for the link. I dont understand the following part in the
> process of inserting the TreeList into my project
> # Layout a user-defined control inside the dialog into which the
> control is supposed to be intserted. In the class field type:
> "LANTIVTREELISTCTRL"
> Could anyone please clarify. I have to tell that I dont have much
> experience with Visual C++.
> Waiting for some tips. Thank you.
>


0
AliR3470 (3235)
11/22/2005 10:57:59 PM
Source: http://www.codeproject.com/treectrl/treelist.asp.
I dont understand why a user-defined control is required when the demo
project had none. Infact in the demo project uses a static text
control. I am having tough time incorporating this feature in my
project. I keep getting the error message "IDD_TREE_LIST_VIEW not
defined" even though I assinged the main dialog an ID with that name.
Please help. Thanks.

0
pedagani (10)
11/22/2005 11:29:45 PM
Make sure the IDD_ is in your resource.h file.  You can copy his dialog 
using drag and drop as well if you want to do so for testing:

1. Open your project's .RC file using the text editor.
2. Open the other project's .RC file.
3. Drag components.
4. Close the other project without saving to make sure it doesn't get messed 
up :o)

I think you can also do copy and paste.

Tom

<pedagani@gmail.com> wrote in message 
news:1132702185.240476.122390@g14g2000cwa.googlegroups.com...
> Source: http://www.codeproject.com/treectrl/treelist.asp.
> I dont understand why a user-defined control is required when the demo
> project had none. Infact in the demo project uses a static text
> control. I am having tough time incorporating this feature in my
> project. I keep getting the error message "IDD_TREE_LIST_VIEW not
> defined" even though I assinged the main dialog an ID with that name.
> Please help. Thanks.
> 


0
tserface (3860)
11/22/2005 11:34:13 PM
Reply:

Similar Artilces:

selection in CTreeCtrl
Hello, I have a Tree Control in my application that displays two types of items: type A and type B. I want to implement the following: 1. When user clicks on any item of type A it should be shown as selected and the previously selected item will be deselected - it is actually the default behavior. 2. When user clicks on any item of type B - nothing should happen: the previously selected item remain selected and the clicked item remains deselected. So, actually, I want that the items of type B will never highlighted with a blue band. How can do it? Thanks, Mark. -- Please ...

Removing Item Highlight from CListCtrl
Hi I use MFC VC++ 4.2. I have a CListCtrl, a few CEdit, a Clear Button and a few buttons. Clear button function is to clear all CEdit and also clear the highlight from the selected item. My question is: 1. How to remove the highlight from the selected item? 2. I also need to disable a few buttons if there is no item selected. How to do those things? Thank you very much. >I have a CListCtrl, a few CEdit, a Clear Button and a few buttons. > >Clear button function is to clear all CEdit and also clear the highlight >from the selected item. > >My question is: >1. Ho...

Bolding or Hilighting node in a CTreeCtrl
I am looking for a way of of bolding, hilighting, or changing the text color for one specific node in a CTreeCtrl. Is this possible? If so, how? You have use an owner draw tree control. Look in here for one: http://www.codeproject.com/treectrl/#Custom+Tree+Controls This one looks useful http://www.codeproject.com/treectrl/colortreectrl.asp AliR. <mr.porteiro.head@gmail.com> wrote in message news:1141668031.681508.117640@u72g2000cwu.googlegroups.com... > I am looking for a way of of bolding, hilighting, or changing the text > color for one specific node in a CTreeCtrl. Is t...

CListCtrl, LBN_SELCHANGE
Hi, I want to replace in a DialogBox a CListBox by a CListCtrl. what is the LBN_SELCHANGE (CListBox) equivalent for CListCtrl ? i want use this message in message catcher as actually like : ON_CONTROL_RANGE(LBN_SELCHANGE,ID_LISTE, ID_LISTE + 50, CListeDlg::OnSelListeChange). Thank u for any help Merci Beaucoup. Dominique de LAPASSE. >what is the LBN_SELCHANGE (CListBox) equivalent for CListCtrl ? LVN_ITEMCHANGED - but it's not as straightforward as for a list box, you need to determine what the change is by filtering the various flags passed. Dave -- MVP VC++ FAQ: ht...

CTreeCtrl EditLabel
Ok here is the problem. I have created an owner drawn tree (CCheckTree). Each node in the tree has a check box beside it. I have derived (CEditableCheckTree) from (CCheckTree). CEditableCheckTree has the edit labels style. When I call the EditLabel function the edit control shows up but when I left click in the edit control the caret isn't placed in the control, I can't select the text, or type into the control. I can right click and paste into the control, but that is just about all. Also if I call the edit control's SetFocus function it never receives focus. I know that I'm o...

CListCtrl: Selection modification
I am using CListCtrl within CListView. The first column of the list contains an image and text. I would like to have selection (blue one) such that it spans only the text leaving the image out (similar to what it does what the list view is not focused). Any ideas on how to do it? If the need be, I can split the first column into separate image and text columns. Thanks. ...

CTreeCtrl
I have a CTreeCtrl with a couple of leafs and each leaf has a checkbox associated with it. If the user checks the checkbox of a leaf, how do I determine which leaf was checked? What callback can be used to get the check state of a leaf? NMCLICK msg works but I do not know how to get the current leaf that was clicked on. Does anybody know? Scott O' http://www.it-faq.pl/mskb/261/289.HTM Regards, Victor "ScottyO" <ofriels@abc.com> wrote in message news:ulAhetDREHA.3140@TK2MSFTNGP11.phx.gbl... > I have a CTreeCtrl with a couple of leafs and each leaf has a checkbo...

Using CListCtrl #4
When I get NM_CLICK notification message, Can I get index of previously selected List Item? ...

How to know which row to be selected in CListCtrl for NM_RCLICK event
I write a program that contain a CListCtrl that's style is WS_VISIBLE|LVS_REPORT|LVS_ALIGNTOP. During initialization of the program, I create the control here: if (m_ctlClient.Create(WS_VISIBLE|LVS_REPORT|LVS_ALIGNTOP, ClientArea, FromHandle(GetSafeHwnd()), 2001)) { LVCOLUMN lv; lv.mask = LVCF_FMT|LVCF_WIDTH |LVCF_TEXT ; lv.fmt = LVCFMT_BITMAP_ON_RIGHT; lv.cx = ClientArea.Width (/2; lv.pszText = "ID"; m_ctlClient.InsertColumn(0, &lv); lv.pszText = "Name"; m_ctlClient.InsertColumn(1, &lv); m_ctlClient.InsertItem(1 , "ABC01"); m_ctlCl...

CListCtrl,logoff
Hi, I wrote NTService which run by CreateProcessAsUser MFC application which include CListCtrl.When I logoff from the computer I get this error: "...Breakpoint A breakpoint has been reached (0x80000003) occurred in the application at location ..." I notice that if I remove the CListCtrl from the MFC application I don't have any error at all. How Can I fix it? Thanks, Mariel ...

non-XP CListCtrl with groups
I like the grouping feature in MFC's CListCtrl, but it only works for XP. Has anybody seen any code that implements this feature for previous OS's? I searched around for quite a while and came up empty. I'm looking to do it for an icon view. So, I'd have labeled groups of thumbnails in a scrollable window. ...

? Images in Subitems but Not Column 0 of CListCtrl
Hi, I've put an image in column 1 of a list control, but using SetImageList to activate images also puts one in column 0. I've tried setting the item's image to I_IMAGENONE aka -2, (which is only available with _WIN32_IE >= 0x0501), but while that prevents the icon from showing, it leaves a blank space the width of the icon next to the label-which is particularly annoying since I've used SetColumnOrderArray to put column 1 with the image to the left of column 0. Is there a way to disable images for column 0? Thanks. -- Alec S. news/alec->synetech/cjb/net On Tue,...

CTreeCtrl ::EnsureVisible
hi all, I've been using a tree ctrl in a modeless dialog to display some data. When I call ensurevisible(treeitemhandle) from outside the dialog it works really well except if the handle is for a child item... If the handle is for a child item then the scroll only goes to the root node leaving the child hidden below the node. this behavior still happens with the node expanded or collapsed before the call. No difference if I use SelectSetFirstVisible(treeitemhandle) still only scrolls to the node. Any ideas what might be happening or someway to make it work right? Thanks, Johnny "...

How to make out my CTreeCtrl?
Hey,All: I have created an extended class from CTreeCtrl,but I don't know how I can re-design the Scroll bar in the CTreeCtrl.Is there anybody who knows about how to re-design the scroll bar in my extended CTreeCtrl? thanks in advance! ^_^ Carl How are we to know what functionality your "extended" class adds? How are we to know what the scroll bar does that you do not want it to do? If you have a question as to how to perform a particular task, this is a great place to post it. I'm sorry, but I don't see how anyone could offer useful information given the informatio...

CTreeCtrls
Hi all, I was trying to copy one tree control into another, but soon found an error CTreeCtrl x; CTreeCtrl y; //.. load x with stuff y = x; // ERROR - this cannot be done (life is not so simple) Is there a way to do this easily? Thanks. M.P. wrote: > Hi all, > > I was trying to copy one tree control into another, but soon found an > error > > CTreeCtrl x; > CTreeCtrl y; > > //.. load x with stuff > > y = x; // ERROR - this cannot be done (life is not so simple) > > Is there a way to do this easily? No, but I thought it would be fun to try a...

using CListCtrl in CDialogBar
Hello guys, I need to create a list control(CListCtrl) in my dockable dialog bar(CDialogBar). Then I have this class: class CMyDockDlg : public CDialogBar and I create it in: CMainFrame::OnCreate() in resource editor I added a list control to my dialog. Can somebody tell me where I can initialize this list control, e.g. adding columns, ... Regards Nemo May be this will help: http://www.codeguru.com/Cpp/W-D/dislog/ddxddv/article.php/c1997/ M "Nemo" <alishuntul@yahoo.ca> wrote in message news:co209r$dth$1@dns3.cae.ca... > Hello guys, > I need to create a list control...

CListCtrl::SetBKImage
hi: I use CListCtrl::SetBKImage set a image.Now,I want to del the image.What do? Thank! Just set the ulFlags of LVBKIMAGE structure to LVBKIF_SOURCE_NONE, and call the SetBkImage of CListCtrl. Cheers Jagadeesh "zhao" <zhaobinbox@hotmail.com> wrote in message news:#MHxiA76DHA.4012@tk2msftngp13.phx.gbl... > hi: > I use CListCtrl::SetBKImage set a image.Now,I want to del the image.What do? > Thank! > > ...

Column owner draw in CListCtrl
Hi all, In my CListCtrl (report style) I need a column to be in bold... so essentially I need 1 column to be owner drawn, while leaving the rest of the columns alone... I don't want to do ownerdraw style because I have to draw the entire row, which is no easy, especially when I have a column with checkbox... Any advice how to accomplish what I want to do? Thanks! Any idea is welcomed. >In my CListCtrl (report style) I need a column to be >in bold... so essentially I need 1 column to be owner >drawn, while leaving the rest of the columns alone... >I don't want to do own...

CTreeCtrl ASSERT question?
1) Why do I get a "Debug Assertion Failed!" when I insert an item in the CTreeCtrl as shown below? BOOL CDeviceProp::OnInitDialog() { // TODO: Add extra initialization here mDeviceTreeCtrl.InsertItem( "TEST" ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CDeviceProp::OnTvnSelchangedTree1(NMHDR *pNMHDR, LRESULT *pResult) { LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR); // TODO: Add your control notification handler code here *pResult = 0; } 2) Is it poss...

CListCtrl::HitTest reports Items under header bar
Hi! When I do a HitTest() from within OnDragOver() there are several things that make no sense. 1) When I drag a file over the column headers in LVS_REPORT style, HitTest() reports real list items that are hidden under the header bar, rather than -1. When the list is scrolled to the top, it reports Item 0 as being under the header making its hit area twice as big as other items. 2) When I return DROPEFFECT_NONE from OnDragOver() I get the copy plus sign. OH! I found this one, I had DragAcceptFiles(TRUE) in OnCreate(). So, This one is fixed by removing it. (Left here for other readers.) ...

No refresh CTreeCtrl
How to update a CTreeCtrl, without repaint it? So, I refresh only one time and my program becomes more fast. Thanks Carlos ...

Hopefully trivial CListCtrl question
I've got a CListCtrl in the report format. I'm adding my data via an function I got from CodeProject (http://www.codeproject.com/listctrl/clistctrl_insertrow.asp) InsertRow(int nPos, int nNoOfCols, LPCTSTR pText, ...); Anyway. Once I've inserted my data, say I want to modify a row. How do I do this? Or do I just delete the row, and add the modified one back in? hamishd =E5=86=99=E9=81=93=EF=BC=9A > I've got a CListCtrl in the report format. > > I'm adding my data via an function I got from CodeProject > (http://www.codeproject.com/listctrl/clistctrl_inser...

Updating CTreeCtrl from other view ?
I have a CTreeCtrl and a 3D render view. With the mouse, I create elements picking in the 3D render view. This elements must be showed in the CTreeCtrl. What is the process to do it? I think 3D render view must send a message to the CTreeCtrl. CTreeCtrl captures it and update itself. But what kind of message and how? On Jul 16, 8:35=A0am, Ravnock <Ravn...@discussions.microsoft.com> wrote: > I have a CTreeCtrl and a 3D render view. > > With the mouse, I create elements picking in the 3D render view. This > elements must be showed in the CTreeCtrl. > > What is the ...

CTreeCtrl SortChildren centers the selection, moves scrollbar
I've encountered a situation where calling SortChildren (or SortChildrenCB) centers the scrollbar of my CTreeView pane for the selected item (even if the scrollbar was all the way to the left) I can't find anything in the knowledge base on microsofts site about this at all. Anyone have any ideas? Thanks -Cindy If I was to guess at what you are trying to say, seems like that your Horizontal Scrollbar gets centered when you sort your treectrl. That's because the selected item at the time of SortChildren call is larger than the width of the window. I think there is only one way...

CListCtrl's GridLine question
hi,everyone. My Application want use CListView to show Data with Grid style. So I create ,and put the CListCtl's style as follow: cs.style |= LVS_REPORT | LVS_EX_GRIDLINES; .. But the Grid line don't show . why? In fact, as this example so many in internet ,but I can't resolve this problem. Anyone get me out. Thank you in advance! LVS_EX_GRIDLINES is an extended style. Try the following in your view's OnInitialUpdate() function. void CYourListView::OnInitialUpdate() { CListView::OnInitialUpdate(); CListCtrl& listCtrl = GetListCt...