Discussion:
Custom "This folder is empty" message.
(too old to reply)
JohnC
2011-02-24 06:08:38 UTC
Permalink
When a folder in my nse contains no items, Windows Explorer shows an
empty listview - not even the "This folder is empty" message.

Is there a way to show this message for a nse, or even better to
provide custom message?
jon
2011-02-24 07:46:29 UTC
Permalink
Post by JohnC
When a folder in my nse contains no items, Windows Explorer shows an
empty listview - not even the "This folder is empty" message.
Is there a way to show this message for a nse, or even better to
provide custom message?
You can create your own window that does anything you want, it doesn't
have to be a listview - so when the folder is empty, create a custom
window that displays that message.
JohnC
2011-02-25 01:55:58 UTC
Permalink
Post by jon
Post by JohnC
When a folder in my nse contains no items, Windows Explorer shows an
empty listview - not even the "This folder is empty" message.
Is there a way to show this message for a nse, or even better to
provide custom message?
You can create your own window that does anything you want, it doesn't
have to be a listview - so when the folder is empty, create a custom
window that displays that message.
Thanks but I am talking about the default shell view.
bviksoe
2011-03-02 15:12:57 UTC
Permalink
Post by JohnC
When a folder in my nse contains no items, Windows Explorer shows an
empty listview - not even the "This folder is empty" message.
Is there a way to show this message for a nse, or even better to
provide custom message?
Hope you're still there... have a look at IFolderView2::SetText

bjarke
g***@softhome.net
2011-03-04 09:54:10 UTC
Permalink
Post by bviksoe
Post by JohnC
When a folder in my nse contains no items, Windows Explorer shows an
empty listview - not even the "This folder is empty" message.
Is there a way to show this message for a nse, or even better to
provide custom message?
Hope you're still there... have a look at IFolderView2::SetText
bjarke
Thanks, will have a look
compass21
2012-11-14 00:08:09 UTC
Permalink
I'm trying to do something similar. I have a NSE that is populated with virtual items retrieved from a web service. I would like to use the empty folder text to display an error indicating why no objects were found (authentication failed, connection problem, etc.)

So far I've found that I can use the object created by SHCreateShellFolderView() to get an IFolderView2 pointer using QueryInterface. I have successfully done that to set the empty folder text immediately after creating the view (while I still have the view pointer).

It looks like I could to the same thing after a command is invoked using the "site" object.

In my case I need the view object available in the IShellFolder::EnumObjects() method. I don't know what the text needs to be until I've tried to fetch the folder contents from the web service.

Can anyone show me how to obtain a pointer to the view object from EnumObjects()?

Thank you.

Loading...