Platform SDK Shell >> Hidden file icon

by Paul Crowley » Wed, 18 May 2005 04:27:42 GMT

I'm trying to retrieve an icon for a file with the "hidden" attribute
such that it looks like the Explorer-style icon for a hidden file.

SHGetFileInfo with file attributes set doesn't seem to be doing it with
either FILE_ATTRIBUTE_HIDDEN or FILE_ATTRIBUTE_HIDDEN |
FILE_ATTRIBUTE_NORMAL.

There is a flag to get a "selected" icon and that is pretty simple. How
does one get a "hidden" icon?
--
Paul Crowley
Infinadyne - www.infinadyne.com


Platform SDK Shell >> Hidden file icon

by Timo Kunze » Wed, 18 May 2005 05:26:11 GMT


It doesn't work this way. Instead you take a normal icon and blend it
with the control's background if the corresponding item is hidden. The
native Windows treeview and listview controls (SysTreeView32 and
SysListView32) do the blending for you, if you set the TVIS_CUT/LVIS_CUT
item state for the corresponding item.

HTH
Timo
--
www.TimoSoft-Software.de - the home of ExplorerTreeView
Stop software patents!



Platform SDK Shell >> Hidden file icon

by Paul Crowley » Wed, 18 May 2005 06:29:44 GMT

In article < XXXX@XXXXX.COM >, XXXX@XXXXX.COM
says...

Thanks. I was looking for something with "hidden" and "cut" doesn't
seem to have much to do with it. But, that is the way of this, isn't
it?

All fixed now. Again, thanks.

--
Paul Crowley
Infinadyne - www.infinadyne.com


Hidden file icon

by v-raygon » Wed, 18 May 2005 16:49:22 GMT

I agree with the answer from Timo, There is no special icon for a hiden or
cut file but shell uses the normal icon and blend it for you.

Thanks,
Rhett Gong [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties and confers no rights.