Minor fix for multiple %APPDATA%.

This commit is contained in:
spx 2010-07-22 01:50:22 +00:00
parent 4965f3859f
commit 3f2268b6b2
2 changed files with 6 additions and 2 deletions

View File

@ -502,7 +502,6 @@ void CMeterWindow::ChangeZPos(ZPOSITION zPos, bool all)
{ {
if(!m_ChildWindow) if(!m_ChildWindow)
{ {
HWND parent = GetAncestor(m_Window, GA_PARENT);
HWND winPos = HWND_NOTOPMOST; HWND winPos = HWND_NOTOPMOST;
m_WindowZPosition = zPos; m_WindowZPosition = zPos;

View File

@ -3541,7 +3541,12 @@ void CRainmeter::ExpandEnvironmentVariables(std::wstring& strPath)
HRESULT hr = SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, buffer); HRESULT hr = SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, buffer);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
strPath.replace(pos, 9, buffer); std::wstring path = buffer;
do
{
strPath.replace(pos, 9, path);
}
while ((pos = strPath.find(L"%APPDATA%", pos + path.length())) != std::wstring::npos);
} }
} }