try to be compatible to NT 4.0 without Active Desktop

svn path=/trunk/; revision=8041
This commit is contained in:
Martin Fuchs 2004-02-05 19:54:51 +00:00
parent 3bf7edc849
commit a7be90ed0b
16 changed files with 42 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View file

@ -428,6 +428,45 @@ UINT ILGetSize(LPCITEMIDLIST pidl)
#endif
#ifndef _SHFOLDER_H_
#define CSIDL_FLAG_CREATE 0x8000
#endif
/// file system path of special folder
SpecialFolderFSPath::SpecialFolderFSPath(int folder, HWND hwnd)
{
_fullpath[0] = '\0';
#ifdef UNICODE
static DynamicFct<BOOL (__stdcall*)(HWND hwnd, LPTSTR pszPath, int csidl, BOOL fCreate)> s_pSHGetSpecialFolderPath(TEXT("shell32"), "SHGetSpecialFolderPathW");
#else
static DynamicFct<BOOL (__stdcall*)(HWND hwnd, LPTSTR pszPath, int csidl, BOOL fCreate)> s_pSHGetSpecialFolderPath(TEXT("shell32"), "SHGetSpecialFolderPathA");
#endif
if (*s_pSHGetSpecialFolderPath)
(*s_pSHGetSpecialFolderPath)(hwnd, _fullpath, folder, TRUE);
else {
// SHGetSpecialFolderPath() is not compatible to WIN95/NT4
#ifdef UNICODE
static DynamicFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shell32(TEXT("shell32"), "SHGetFolderPathW");
#else
static DynamicFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shell32(TEXT("shell32"), "SHGetFolderPathA");
#endif
if (*s_pSHGetFolderPath_shell32)
(*s_pSHGetFolderPath_shell32)(hwnd, folder|CSIDL_FLAG_CREATE, 0, 0, _fullpath);
else {
// SHGetFolderPath() is only present in shfolder.dll on some platforms.
#ifdef UNICODE
static DynamicLoadLibFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shfolder(TEXT("shfolder"), "SHGetFolderPathW");
#else
static DynamicLoadLibFct<HRESULT (__stdcall*)(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)> s_pSHGetFolderPath_shfolder(TEXT("shfolder"), "SHGetFolderPathA");
#endif
if (*s_pSHGetFolderPath_shfolder)
(*s_pSHGetFolderPath_shfolder)(hwnd, folder|CSIDL_FLAG_CREATE, 0, 0, _fullpath);
}
}
}
HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParent, int cidl, LPCITEMIDLIST* apidl, int x, int y)
{
IContextMenu* pcm;

View file

@ -884,17 +884,10 @@ struct DesktopFolder : public ShellFolder
};
#if _WIN32_IE>=0x400 // is SHGetSpecialFolderPath() available?
/// file system path of special folder
struct SpecialFolderFSPath
{
SpecialFolderFSPath(int folder/*e.g. CSIDL_DESKTOP*/, HWND hwnd)
{
_fullpath[0] = '\0';
SHGetSpecialFolderPath(hwnd, _fullpath, folder, TRUE);
}
SpecialFolderFSPath(int folder/*e.g. CSIDL_DESKTOP*/, HWND hwnd);
operator LPCTSTR()
{
@ -905,8 +898,7 @@ protected:
TCHAR _fullpath[MAX_PATH];
};
#else // _WIN32_IE<0x400 -> use SHGetSpecialFolderLocation()
/*
/// file system path of special folder
struct SpecialFolderFSPath : public FileSysShellPath
{
@ -918,8 +910,7 @@ struct SpecialFolderFSPath : public FileSysShellPath
CHECKERROR(hr);
}
};
#endif
*/
/// wrapper class for enumerating shell namespace objects