add ThemeManager to smtools

This commit is contained in:
Chris Danford
2005-12-29 05:52:50 +00:00
parent b704036996
commit c7d769829a
13 changed files with 121 additions and 34 deletions
+19 -6
View File
@@ -3,7 +3,7 @@
#include "RegistryAccess.h"
#include <shlobj.h>
RString GetMyDocumentsDir()
RString SpecialDirs::GetMyDocumentsDir()
{
CString sMyDocumentsDir;
bool bSuccess = RegistryAccess::GetRegValue( "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal", sMyDocumentsDir );
@@ -13,17 +13,30 @@ RString GetMyDocumentsDir()
return sMyDocumentsDir;
}
RString GetApplicationDataDir()
RString SpecialDirs::GetApplicationDataDir()
{
CString sApplicationDataDir;
CString sDir;
TCHAR szDir[MAX_PATH] = "";
BOOL bResult = SHGetSpecialFolderPath( NULL, szDir, CSIDL_APPDATA, FALSE );
ASSERT( bResult );
sApplicationDataDir = szDir;
sApplicationDataDir += "/";
return sApplicationDataDir;
sDir = szDir;
sDir += "/";
return sDir;
}
RString SpecialDirs::GetDesktopDir()
{
CString sDir;
TCHAR szDir[MAX_PATH] = "";
BOOL bResult = SHGetSpecialFolderPath( NULL, szDir, CSIDL_DESKTOP, FALSE );
ASSERT( bResult );
sDir = szDir;
sDir += "/";
return sDir;
}
/*
* (c) 2002-2004 Chris Danford
* All rights reserved.
+6 -2
View File
@@ -1,8 +1,12 @@
#ifndef SpecialDirs_H
#define SpecialDirs_H
RString GetMyDocumentsDir();
RString GetApplicationDataDir();
namespace SpecialDirs
{
RString GetMyDocumentsDir();
RString GetApplicationDataDir();
RString GetDesktopDir();
};
#endif