 |
|
 |
When I use this list control in VS 2005 and VS2008 I get a stack over run error when initializing the list view at the first call to Expand.
I was wondering if this was a known issue or if you suggest moving to a different listViewController.
Kind Regards,
Alisdair
|
|
|
|
 |
|
 |
Hi - great project, BTW. Excellent work. I noticed that you implement reference counting to assist with running multiple instances of CTreeFileCtrl. I tried to do this today (2 x instances in a dialog box... both with different ID's, of course) but, although the 2nd instance runs, it doesn't display any images (drives, folders, file icons etc). It works okay - just no images. Is this a known problem? I'll try to provide some more information if you can't reproduce it. Thanks for the great work - John.
P.S. I'm compiling with Visual C++ 6.0 under XP Home Edition (SP2) in case that's of any relevance.
-- modified at 4:46 Wednesday 4th April, 2007
Sorry - this seems to have been corrected in the latest version, available from your web site.
|
|
|
|
 |
|
 |
:(can not open you Web: http://www.naughter.com
efdefe
|
|
|
|
 |
|
 |
Hi
I have used your code in my project and it runs good:->. Thanks.
But I found a bug in CTreeFileCtrl::SetSelectedPath.
I belive calling SetSelectedPath("C:\\", FALSE) is suppose to select C:\\ but NOT to expand it. Due to a bug in SetSelectedPath, it always expand C:\\.
I have modified the code. here it is, hope helps
Change code in FileTreeCtrl.cpp
if (hItemFound == NULL)
break;
else
Expand(hItemFound, TVE_EXPAND);
TO
if (hItemFound == NULL)
break;
else
//Expand(hItemFound, TVE_EXPAND);
{
// if sMatch is equals to sPath, it should not be expanded here
// This bug cause calling SetSelectedPath("C:\\", FALSE) always expand C:\\
if (sPath.Compare(sMatch) !=0)
Expand(hItemFound, TVE_EXPAND);
}
The code following will expand sPath based on bExpanded
if (bExpanded)
Expand(hItemFound, TVE_EXPAND);
if sPath equals sMatch, the original version will always expand it and makes bExpanded useless
-- modified at 4:48 Friday 23rd September, 2005
|
|
|
|
 |
|
 |
I need to customize the property page. I want to use
my own properties not windows standard properties.
Is it possible? Could you please help me?
Thanks in advance,
Aryana
|
|
|
|
 |
|
 |
The properties page shown is the standard shell properties page. You have 2 options:
1. Write a standard property page shell extension
2. Handle the Properties message and display your own property page.
|
|
|
|
 |
|
 |
Thanks a lot for your reply. I have no idea of writing standard property page shell extention and handling suitable messages.
Would you please help me to find some resources for getting familiar with this issues and applicable techniques?
Best wishes,
Aryana
|
|
|
|
 |
|
 |
Well, there is only one way to improve and that is to do it yourself. There are numerous articles on this web site as well as the MSDN on this topic, so just research the info for yourself. Alternatively if you would like someone to write it for you, then I am available for consultancy
|
|
|
|
 |
|
 |
Hi,
I detect that the tree file take lot of ressources of GDI and problem is these ressources never return to system. Maybe the CtreeCtrl is corrupted , I don't think so.
I can't find issues. Someone can help me ? Please
thank you
bye
|
|
|
|
 |
|
 |
Really do not know what resources you are talking about as the only significant GDI resources used by the control is the OS shared shell image list. As always make sure you have the latest version from my web site at www.naughter.com
|
|
|
|
 |
|
 |
Thank you for reply,
I upgraded CTreeFileCtrl and now I have no problem.
GDI Objects return to system. I used the old release 2.06.
Why don't you update article on The Code Project web site ?
@+
|
|
|
|
 |
|
 |
The problem is that I have released over 200K lines of open source code and what with keeping them up to date on my web site, I really do not have the time to update all the mirrors of the code out there. Each download I have released includes html documentation which includes links back to my web site. I hope you can understand this.
|
|
|
|
 |
|
 |
Hi,
I thank you for the great free SOURCE.
I want to split the window in one tree view (left side) and
list view (right side).
like Windows Explorer
Do you have an idea, how one can make it (simplest)?
Thanks in advance
PS.: I have the last version
|
|
|
|
 |
|
 |
Just like I did, you will need to derive a class from CListCtrl (instead of CTreeCtrl) and then start writing the code. Nothing magic in that. An alternative technique would be to use the IShellFolder COM interface provided by the shell. Good luck!
|
|
|
|
 |
|
 |
Hi! I am running the latest version of this ace control and am having a bit of a problem.
I have a treeview in a dialog that is a member of my main app which is also a dialog. The first time I call the dialog with DoModal all is fine, but if I close it and reopen it it asserts on this line
//Get a pointer to IShellFolder and IMalloc
ASSERT(m_pShellFolder == NULL);
in PreSubclassWindow() of CTrrFileCtrl
I have
DDX_Control(pDX, IDC_FOLDERTREE, m_ctrlTree);
in the DoDataExchange method of my dialog. Should there be more there perhaps, or do I need to manually clear and delete m_pShellFolder when I close my dialog?
Cheers in advance
Dom
|
|
|
|
 |
|
 |
First thing to do is make sure you have the latest version from my web site (www.naughter.com) as there have been quite a few updates since I posted this article to codeproject.com
|
|
|
|
 |
|
 |
yeah, I am on the latest version. Any ideas what might be causing the ASSERT?
Cheers
Dom
|
|
|
|
 |
|
 |
Rather than call DDX_Control in DoDataExchange, try using SubclassWindow in your OnInitDialog to see if that makes any difference. Also put a breakpoint on CTreeFileCtrl::PreSubclassWindow and examine its call stack to see why it is being called twice.
|
|
|
|
 |
|
 |
I have tried this:
if ( !m_ctrlTree.m_hWnd )
m_ctrlTree.SubclassDlgItem( IDC_FOLDERTREE, this );
in InitDialog. I am still getting the Assert. I tried putting
m_ctrlTree.UnsubclassItem();
in OnDestroy but that had no effect either
Am I doing the Subclassing wrong?
Cheers
Dom
|
|
|
|
 |
|
 |
Well, I have changed
ASSERT(m_pShellFolder == NULL)
VERIFY(SUCCEEDED(SHGetDesktopFolder(&m_pShellFolder)));
VERIFY(SUCCEEDED(SHGetMalloc(&m_pMalloc)));
to
if(m_pShellFolder == NULL)
{
VERIFY(SUCCEEDED(SHGetDesktopFolder(&m_pShellFolder)));
VERIFY(SUCCEEDED(SHGetMalloc(&m_pMalloc)));
}
and seem to be getting no ill side effects. If you think this might cause me problems please let me know
Cheers
Dom
|
|
|
|
 |
|
 |
Did you check with the debugger to see why the function is being called twice?
|
|
|
|
 |
|
 |
I got the same problem : Thanks for having fixed it !!
And by the way thanks for the TreeFileCtrl, I won a lot of time )
The problem might have been due to the fact that the Assert checked if a pointer was NULL or not , but it was not destroyed after the first time you quit your dialog box , wasn't it ?
See you
|
|
|
|
 |
|
 |
Can it support drag & drop funtion ?
If not' how can i add to it
----------------------
Coding for lv,lv & di
|
|
|
|
 |
|
 |
Yes it does. Includes full drag and drag support for moving and copying files and folders. Make sure you get the latest version from my web site www.naughter.com.
|
|
|
|
 |
|
 |
Hi! I have stuck this code in my project (Thanks very much ) but I find that when I call PopulateTree it takes several seconds to build the tree. I am looking at my internet Favorites Directory (as root) with file filter set to .url so I am only looking at a few hundred files at most. Is this normal behaviour, or are there other flags I can set to speed things up a bit.
Cheers
Dom
|
|
|
|
 |