Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Explorer.exe breadcrumbs control( How do I get the windows handle?)

Posted on 2009-12-23
8
Medium Priority
?
608 Views
Last Modified: 2013-11-25
I need to get  the window handle to the windows exploere breadcrumb contol in the address bar.   In my explorer name space extension (a virtual file explorer) the name is not being set to my virtual path.  It looks like it is, but whne monitoring it wiht Spy++ the windows shows a differnet path.  I want to try and send a message to the window changing that address to my virtual path.  It may not work, but I am out of other ideas.
 
0
Comment
Question by:PaulSlechta
  • 5
  • 3
8 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 26118875
I've not looked at that, but it appears to be pretty complex.  There are several controls that lie "beneath" the breadcrumb parent.  Which one are you querying?
I noticed some odd behaviors when using built-in namespaces, such as "Libraries".  The window text does not appear to get updated with the "hard" folder name until the user clicks.
0
 

Author Comment

by:PaulSlechta
ID: 26125135
Here is a spy++ screen shot.
Untitled.jpg
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 26129411
Is this a display issue?  Is it all about what the user sees when he clicks the breadcrumb box?  If so, I'd thuink that the combobox that is the third child of that control's parent would be the item to modify.
However, it seems to me that this would be at best a cosmetic change and at worse could screw things up royally.  If you have laid the correct foundation, then surely the Explorer has a way to find the 'hard' location so that it can display it correctly.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:PaulSlechta
ID: 26129426
I was able to set the names with no change other than what is displayed.  I do agree with you and it dows navigate to the correct location, but this message box continues to be displayed.

Untitled.jpg
0
 

Author Comment

by:PaulSlechta
ID: 26129434
That message in quotes does change based on where I have been.
Untitled.jpg
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 26129842
Interesting.  I wish I could see that.   If only somebody somewhere were right there at the computer, they might tell me more about what they see.  Like for instance, when that error message comes up, what circumstances exist at that time, what that person or persons did to create the namespace, that sort of thing.  Alas!  I guess we'll never know.
0
 

Author Comment

by:PaulSlechta
ID: 26132350
I created a virtual folder and implemented the methods listed.  I created a class to manage LPCITEMIDLIST. The CreateViewObject  creates and inializes the class derived from IShellView.  Navigating the virtual folders work great except for the breadcrumbs in the Address Bar.  So my issue is what is Windows Explorer looking for the I may not have provided in my Explorer Extension.

If I click on the folder C:\windows then naviagate to my folder \\Digilibe Explorer\c\src\folder1\folder2 then go to the address bar and click on the folder src I get the message box that displays "C:\windows" is currently unavailable.   If I then click on the root of my virutal folder I do not get the message box.  If I then browse down to the folder2 folder again and click on the src folder in the address bar I get the message box with the message "Digilibe Explorer" is currently unavailable.  In both cases I still get moved to the src folder.  


class ATL_NO_VTABLE CVirtualFolder :
      public CComObjectRootEx<CComSingleThreadModel>,
      public CComCoClass<CVirtualFolder, &CLSID_VirtualFolder>,
      public IShellFolder,
      public IPersistFolder,
      public IQueryInfo

   STDMETHOD(BindToObject)(LPCITEMIDLIST, LPBC, REFIID, LPVOID*);
   STDMETHOD(CompareIDs)(LPARAM lParam, LPCITEMIDLIST, LPCITEMIDLIST);
   STDMETHOD(CreateViewObject)(HWND, REFIID, LPVOID*);
   STDMETHOD(EnumObjects)(HWND, DWORD, LPENUMIDLIST*);
   STDMETHOD(GetAttributesOf)(UINT, LPCITEMIDLIST*, LPDWORD);
   STDMETHOD(GetDisplayNameOf)(LPCITEMIDLIST pidl, DWORD, LPSTRRET);
   STDMETHOD(GetUIObjectOf)(HWND, UINT, LPCITEMIDLIST*, REFIID, LPUINT, LPVOID*);
   STDMETHOD(ParseDisplayName) (HWND, LPBC, LPOLESTR, LPDWORD, LPITEMIDLIST*, LPDWORD);
   STDMETHOD(SetNameOf)(HWND, LPCITEMIDLIST, LPCOLESTR, DWORD, LPITEMIDLIST*);


class ATL_NO_VTABLE CShellView :
    public CComObjectRootEx<CComSingleThreadModel>,
    public CComCoClass<CShellView, &CLSID_ShellView>,
      public IShellView


 STDMETHOD (TranslateAccelerator) (LPMSG);
    STDMETHOD (EnableModeless) (BOOL);
    STDMETHOD (UIActivate) (UINT);
    STDMETHOD (Refresh) (void);
    STDMETHOD (CreateViewWindow) (LPSHELLVIEW, LPCFOLDERSETTINGS, LPSHELLBROWSER, LPRECT, HWND*);
    STDMETHOD (DestroyViewWindow) (void);
    STDMETHOD (GetCurrentInfo) (LPFOLDERSETTINGS);
    STDMETHOD (AddPropertySheetPages) (DWORD, LPFNADDPROPSHEETPAGE, LPARAM);
    STDMETHOD (SaveViewState) (void);
    STDMETHOD (SelectItem) (LPCITEMIDLIST, UINT);
    STDMETHOD (GetItemObject) (UINT, REFIID, LPVOID*);
0
 

Accepted Solution

by:
PaulSlechta earned 0 total points
ID: 26138204
Ok,  I solved the problem.  I was handling the flags wrong in GetDisplayNameOf.  It is better to use the functions provided to you by Microsoft rather than handle it yourself.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question