G
Graeme Bell
Hi all, my first post here.
I'm using VC++ 2005 Express. How do I get the names of special folders on
the local system?
For example, if I want to get the desktop folder name on any version of
windows I simply call
GetFolderPath(Environment::SpecialFolder::desktop);
I can get the array of folder names using
array<String ^> ^ special_folders = gcnew array<String ^>(100);
special_folders=
System::Enum::GetNames(System::Environment::SpecialFolder::typeid);
But that just gives me a list of names, which isn't very useful. Worse, the
order in which those strings are retrieved doesn't seem to be useful as an
index to call
Enum::GetName(Environment::SpecialFolder::typeid, index);
Some of them match, but others ... not useful.
I'm doing this so I can populate a TreeView with the localised names for
folders such as Desktop, My Computer, My Documents, etc. and do it
dynamically, at run-time.
I already posted in the internationalisation group, but that doesn't seem to
get much traffic, at least the English language one.
Thanks
Graeme P. Bell
I'm using VC++ 2005 Express. How do I get the names of special folders on
the local system?
For example, if I want to get the desktop folder name on any version of
windows I simply call
GetFolderPath(Environment::SpecialFolder::desktop);
I can get the array of folder names using
array<String ^> ^ special_folders = gcnew array<String ^>(100);
special_folders=
System::Enum::GetNames(System::Environment::SpecialFolder::typeid);
But that just gives me a list of names, which isn't very useful. Worse, the
order in which those strings are retrieved doesn't seem to be useful as an
index to call
Enum::GetName(Environment::SpecialFolder::typeid, index);
Some of them match, but others ... not useful.
I'm doing this so I can populate a TreeView with the localised names for
folders such as Desktop, My Computer, My Documents, etc. and do it
dynamically, at run-time.
I already posted in the internationalisation group, but that doesn't seem to
get much traffic, at least the English language one.

Thanks
Graeme P. Bell
arse to convert your strings back into the actual values, and