Hi I would like to accomplish rather peculiar scenario (requested by customer): I want to display and treat specific folders as single files in Windows Explorer shell. All folders will have âextensionâ in their name something like - "somename.david" . Actually each folder of type xxxx.david shall be displayed with special icon and âtypeâ in Windows Explorer and if user double clicks on it - my application associated with .david âextensionâ shall be launched. I checked shell interfaces but still canât figure out what to do here. Iâm not sure whether this is possible at all. Any idea/suggestion? Thanks a lot, David
David wrote: > I would like to accomplish rather peculiar scenario (requested by > customer): I want to display and treat specific folders as single > files in Windows Explorer shell. > All folders will have âextensionâ in their name something like - > "somename.david" . Actually each folder of type xxxx.david shall be > displayed with special icon and âtypeâ in Windows Explorer and if > user double clicks on it - my application associated with .david > âextensionâ shall be launched. I don't think this is really possible. You could install a context menu handler for HKCR\Folder and try to set the default menu item, but it still won't work for the folder tree, which overrides any default with its own Expand/Collapse item. -- Jim Barry, Microsoft MVP
Jim, 10x for the propmt response Actually your suggestion may work for me. What I need is 1. Associate icon with my âfileâ type 2. Launch my app upon click on the âfileâ I really donât mind that âfileâ will have expand/collapse in Explorer folder tree. The idea is not to hide folder content but to provide fast and easy way to parse/open all files from these special folders in my application. Can you please elaborate on your suggestion? How can I change icon for specific folder - is a IShellIconOverlayIdentifier interfca a correct place to begin with? Best,David "Jim Barry" wrote: > David wrote: > > I would like to accomplish rather peculiar scenario (requested by > > customer): I want to display and treat specific folders as single > > files in Windows Explorer shell. > > All folders will have âextensionâ in their name something like - > > "somename.david" . Actually each folder of type xxxx.david shall be > > displayed with special icon and âtypeâ in Windows Explorer and if > > user double clicks on it - my application associated with .david > > âextensionâ shall be launched. > > I don't think this is really possible. You could install a context menu handler for HKCR\Folder and try to set the default menu item, but it still won't work for the folder tree, which overrides any default with its own Expand/Collapse item. > > -- > Jim Barry, Microsoft MVP >
There are two ways that I know of to customize a folder icon. One is to use an overlay as you mentioned. The other is to call SHGetSetFolderCustomSettings. They each have their pros and cons. --Eric "David" wrote: > Jim, 10x for the propmt response > Actually your suggestion may work for me. What I need is > 1. Associate icon with my âfileâ type > 2. Launch my app upon click on the âfileâ > I really donât mind that âfileâ will have expand/collapse in Explorer folder > tree. The idea is not to hide folder content but to provide fast and easy > way to parse/open all files from these special folders in my application. > Can you please elaborate on your suggestion? > How can I change icon for specific folder - is a > IShellIconOverlayIdentifier interfca a correct place to begin with? > Best,David > > > "Jim Barry" wrote: > > > David wrote: > > > I would like to accomplish rather peculiar scenario (requested by > > > customer): I want to display and treat specific folders as single > > > files in Windows Explorer shell. > > > All folders will have âextensionâ in their name something like - > > > "somename.david" . Actually each folder of type xxxx.david shall be > > > displayed with special icon and âtypeâ in Windows Explorer and if > > > user double clicks on it - my application associated with .david > > > âextensionâ shall be launched. > > > > I don't think this is really possible. You could install a context menu handler for HKCR\Folder and try to set the default menu item, but it still won't work for the folder tree, which overrides any default with its own Expand/Collapse item. > > > > -- > > Jim Barry, Microsoft MVP > >