Keep track of theme filename within THEME_FILE.
authorKevin Koltzau <kevin@plop.org>
Tue, 17 Feb 2004 20:22:27 +0000 (20:22 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 17 Feb 2004 20:22:27 +0000 (20:22 +0000)
dlls/uxtheme/msstyles.c
dlls/uxtheme/msstyles.h
dlls/uxtheme/system.c

index 95ad22228a626ef3c8b8fe0ae532d6922bc81ef1..fe106c8af0af5143b35c68ca708f030ae48f368e 100644 (file)
@@ -174,6 +174,9 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST
 
     *tf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(THEME_FILE));
     (*tf)->hTheme = hTheme;
+    
+    GetFullPathNameW(lpThemeFile, MAX_PATH, (*tf)->szThemeFile, NULL);
+    
     (*tf)->pszAvailColors = pszColors;
     (*tf)->pszAvailSizes = pszSizes;
     (*tf)->pszSelectedColor = pszSelectedColor;
index f6ef348006767ed5f3278b13ee0bd9af7dc28ebe..53ef348289a0bc71b980808864150ff3b3f00fcf 100644 (file)
@@ -59,6 +59,7 @@ typedef struct _THEME_CLASS {
 typedef struct _THEME_FILE {
     DWORD dwRefCount;
     HMODULE hTheme;
+    WCHAR szThemeFile[MAX_PATH];
     LPWSTR pszAvailColors;
     LPWSTR pszAvailSizes;
 
index 6bd3b7802289cfc6bb3f442045728393e6ac90d0..531c1f81f676610ef0340b5924b0f7bcb5997527 100644 (file)
@@ -152,7 +152,7 @@ HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
         return hr;
     if(tf) {
         bThemeActive = TRUE;
-        GetModuleFileNameW(tf->hTheme, szCurrentTheme, sizeof(szCurrentTheme)/sizeof(szCurrentTheme[0]));
+        lstrcpynW(szCurrentTheme, tf->szThemeFile, sizeof(szCurrentTheme)/sizeof(szCurrentTheme[0]));
         lstrcpynW(szCurrentColor, tf->pszSelectedColor, sizeof(szCurrentColor)/sizeof(szCurrentColor[0]));
         lstrcpynW(szCurrentSize, tf->pszSelectedSize, sizeof(szCurrentSize)/sizeof(szCurrentSize[0]));
     }