![]() |
Specify root folder for CXTShellTreeCtrl |
Post Reply
|
| Author | |
larryp
Groupie
Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
Quote Reply
Topic: Specify root folder for CXTShellTreeCtrlPosted: 06 June 2005 at 4:15pm |
|
Is there a way to specify the starting folder for a CXTShellTreeCtrl
derived class? I don't want to display all drives and folders on
my system. I want to specify a path and have only the sub-folders of
this path displayed.
Thanks, Larry |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 June 2005 at 11:19pm |
|
call void CXTShellTreeBase::PopulateTree(LPCTSTR lpszPath)
: m_wndShellTree.EnableAutoInit(FALSE);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
larryp
Groupie
Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 June 2005 at 11:48am |
|
Thanks Oleg. That worked.
|
|
![]() |
|
larryp
Groupie
Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 June 2005 at 12:07pm |
|
Oleg. After trying your solution, I do still have a problem.
If I use the example program, GUI_Explorer (9.7RC1), and change
the code in OnCreate to the following:
m_shellTree.EnableAutoInit(FALSE); if( !m_shellTree.Create(WS_VISIBLE, CRect(0,0,0,0), this, IDC_TREE_VIEW)) { TRACE0( "Unable to create tree control.\n" ); return -1; } if (m_shellTree.InitializeTree( XTOSVersionInfo()->IsWinXPOrGreater() ? (TVS_HASBUTTONS|TVS_SINGLEEXPAND|TVS_TRACKSELECT |TVS_SHOWSELALWAYS) : (TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT) )) { m_shellTree.PopulateTree (_T("C:\\Program Files")); } then everything works fine until I click on the root folder. In this case the root folder is "Program Files". What displays in the list control view is the contents of the desktop not the contents of "Program Files". Larry |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 June 2005 at 3:31pm |
|
Yes, sorry, CXTShellListBase "understood' only Desktop as root folder. :( Please patch attached member. 2005-06-11_153016_UpdateList.zip
Thank you for notice it. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |