Print Page | Close Window

How toopen needed branch in GUI_Explorer?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2684
Printed Date: 01 June 2025 at 5:16am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How toopen needed branch in GUI_Explorer?
Posted By: ksiva
Subject: How toopen needed branch in GUI_Explorer?
Date Posted: 04 August 2005 at 3:52pm
How to open needed branch in GUI_Explorer at start time when the particular brach is put to command line?
 
I use GUI_Explorer example. Really it is very similar to explorer.exe.
I want to add some functionality. I want make it work as explorer.
 
When you run explorer with command line parameter then it uses parameter as folder or disk name to browse in the left tree. For example "explorer.exe z:\folder" opens in the tree the corresponding branch of disk Z:. So I want to do the same.
 
But I stuck there. When I add parameter to command line then MFC takes this parameter as the event that user wants to open a document. So when it process ProcessShellCommand function it calls CDocument::OnOpenDocument()  and I should change tree position here. (Or not?)  I tried to do it and called GetParentFrame()->m_TreeCtrl.TunnelTree(lpszPathName)&nbs p; but it fails on ASSERT inside MFC. I tried some different places but again I get ASSERT falure. Looks like CShellListCtrl is not in memory or something else.
 
How to make CShellListCtrl position to the needed place?
 
Now it uses "My documents" folder to start from.
 
Is it right place CDocument::OnOpenDocument() to control CShellListCtrl?
 



Replies:
Posted By: Oleg
Date Posted: 05 August 2005 at 11:38pm

1. use PopulateTree

PopulateTree(lpszPathName);

bvut check if m_TreeCtrl.GetSafeHwnd() not NULL in CDocument::OnOpenDocument. Don';t think it is right pace.

2: in 9.70 was added m_TreeCtrl.SetRootFolder(nRootFolder)

try SetRootFolder(CSIDL_PERSONAL) in constructor of m_TreeCtrl

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ksiva
Date Posted: 08 August 2005 at 9:41am
Thanks.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net