![]() |
How toopen needed branch in GUI_Explorer? |
Post Reply ![]() |
Author | |
ksiva ![]() Newbie ![]() ![]() Joined: 04 August 2005 Location: Russian Federation Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() 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?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
ksiva ![]() Newbie ![]() ![]() Joined: 04 August 2005 Location: Russian Federation Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() |
Thanks.
|
|
![]() |
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 |