Get Desktop folder
Joachim Buermann
jbuermann at zes.com
Tue Nov 7 04:24:10 PST 2006
Hello Nusret,
thank you very much for your response. As far as I understand, also the
SHGetSpecialFolderPath depends on the microsoft windows version. For newer
systems (like win2k and XP or Vista) the shell32 export this function, on
older systems, the function is included by the shfolder.dll.
So an application, running at all systems should have to import this function
dynamically and couldn't linked against on of these.
I'm not a windows specialist, but hoping, there exist another more simplicated
way, to get the users desktop folder.
If the user doesn't change it's desktop folder name, I also can use
the ::wxGetUserHome() function and just add a "Desktop" entry to it's path -
but I'm not sure, if this is the right way to do this (and if 'Desktop' is
the correct name on other language settings).
Anyway, thangs again and best regards
Joachim
Am Tuesday 07 November 2006 11:51 schrieb Nusret Taşçı:
> > within windows I'm very confused by the microsoft documentation
> > about:
> >
> > SHGetFolderPath(...)
>
> SHGetSpecialFolderPath() with CSIDL_DESKTOPDIRECTORY might work for you.
> AFAIR, it's perfectly valid for a user to move it's desktop directory to
> somewhere else than the default path. If he moves it with explorer, than
> explorer will notice this and calls to SHGetSpecialFolderPath() will
> return the new path.
>
> BOOL SHGetSpecialFolderPath(HWND hwndOwner,
> LPTSTR lpszPath,
> int nFolder,
> BOOL fCreate
> );
>
> CSIDL_DESKTOPDIRECTORY (0x0010)
> The file system directory used to physically store file objects on the
> desktop (not to be confused with the desktop folder itself). A typical
> path is C:\Documents and Settings\username\Desktop.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
More information about the wx-users
mailing list