1 #pragma once 2 3 typedef HANDLE HTHEMEFILE; 4 5 /********************************************************************** 6 * ENUMTHEMEPROC 7 * 8 * Callback function for EnumThemes. 9 * 10 * RETURNS 11 * TRUE to continue enumeration, FALSE to stop 12 * 13 * PARAMS 14 * lpReserved Always 0 15 * pszThemeFileName Full path to theme msstyles file 16 * pszThemeName Display name for theme 17 * pszToolTip Tooltip name for theme 18 * lpReserved2 Always 0 19 * lpData Value passed through lpData from EnumThemes 20 */ 21 typedef BOOL (CALLBACK *ENUMTHEMEPROC)(LPVOID lpReserved, LPCWSTR pszThemeFileName, 22 LPCWSTR pszThemeName, LPCWSTR pszToolTip, LPVOID lpReserved2, 23 LPVOID lpData); 24 25 /********************************************************************** 26 * PARSETHEMEINIFILEPROC 27 * 28 * Callback function for ParseThemeIniFile. 29 * 30 * RETURNS 31 * TRUE to continue enumeration, FALSE to stop 32 * 33 * PARAMS 34 * dwType Entry type 35 * pszParam1 Use defined by entry type 36 * pszParam2 Use defined by entry type 37 * pszParam3 Use defined by entry type 38 * dwParam Use defined by entry type 39 * lpData Value passed through lpData from ParseThemeIniFile 40 * 41 * NOTES 42 * I don't know what the valid entry types are 43 */ 44 typedef BOOL (CALLBACK* PARSETHEMEINIFILEPROC)(DWORD dwType, LPWSTR pszParam1, 45 LPWSTR pszParam2, LPWSTR pszParam3, 46 DWORD dwParam, LPVOID lpData); 47 48 /* Structure filled in by EnumThemeColors() and EnumeThemeSizes() with the 49 * various strings for a theme color or size. */ 50 typedef struct tagTHEMENAMES 51 { 52 WCHAR szName[MAX_PATH+1]; 53 WCHAR szDisplayName[MAX_PATH+1]; 54 WCHAR szTooltip[MAX_PATH+1]; 55 } THEMENAMES, *PTHEMENAMES; 56 57 /* Declarations for undocumented functions for use internally */ 58 DWORD WINAPI QueryThemeServices(void); 59 60 HRESULT WINAPI OpenThemeFile(LPCWSTR pszThemeFileName, 61 LPCWSTR pszColorName, 62 LPCWSTR pszSizeName, 63 HTHEMEFILE *hThemeFile, 64 DWORD unknown); 65 66 HRESULT WINAPI CloseThemeFile(HTHEMEFILE hThemeFile); 67 68 HRESULT WINAPI ApplyTheme(HTHEMEFILE hThemeFile, 69 char *unknown, 70 HWND hWnd); 71 72 HRESULT WINAPI GetThemeDefaults(LPCWSTR pszThemeFileName, 73 LPWSTR pszColorName, 74 DWORD dwColorNameLen, 75 LPWSTR pszSizeName, 76 DWORD dwSizeNameLen); 77 78 HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, 79 ENUMTHEMEPROC callback, 80 LPVOID lpData); 81 82 HRESULT WINAPI EnumThemeColors(LPWSTR pszThemeFileName, 83 LPWSTR pszSizeName, 84 DWORD dwColorNum, 85 PTHEMENAMES pszColorNames); 86 87 HRESULT WINAPI EnumThemeSizes(LPWSTR pszThemeFileName, 88 LPWSTR pszColorName, 89 DWORD dwSizeNum, 90 PTHEMENAMES pszColorNames); 91 92 HRESULT WINAPI ParseThemeIniFile(LPCWSTR pszIniFileName, 93 LPWSTR pszUnknown, 94 PARSETHEMEINIFILEPROC callback, 95 LPVOID lpData); 96 97 HTHEME WINAPI OpenThemeDataFromFile(HTHEMEFILE hThemeFile, 98 HWND hwnd, 99 LPCWSTR pszClassList, 100 DWORD flags); 101 102 /* The DNCP_* flags let the caller decide what should be painted */ 103 #define DNCP_ACTIVEWINDOW 0x1 104 #define DNCP_INACTIVEWINDOW 0x2 105 #define DNCP_DIALOGWINDOW 0x4 106 #define DNCP_DRAW_ALL DNCP_ACTIVEWINDOW | DNCP_INACTIVEWINDOW | DNCP_DIALOGWINDOW 107 108 HRESULT WINAPI DrawNCPreview(HDC hDC, 109 DWORD DNCP_Flag, 110 LPRECT prcPreview, 111 LPCWSTR pszThemeFileName, 112 LPCWSTR pszColorName, 113 LPCWSTR pszSizeName, 114 PNONCLIENTMETRICSW pncMetrics, 115 COLORREF* lpaRgbValues); 116 117 BOOL WINAPI ThemeHooksInstall(VOID); 118 119 BOOL WINAPI ThemeHooksRemove(VOID); 120 121