52 L"ButtonAlternateFace",
54 L"GradientActiveTitle",
55 L"GradientInactiveTitle",
127#if (WINVER >= 0x0600)
138 scheme->ncMetrics.cbSize =
sizeof(NONCLIENTMETRICSW);
140#if (WINVER >= 0x0600)
149 scheme->ncMetrics.cbSize -=
sizeof(
scheme->ncMetrics.iPaddedBorderWidth);
154 sizeof(NONCLIENTMETRICSW),
160 scheme->icMetrics.cbSize =
sizeof(ICONMETRICSW);
162 sizeof(ICONMETRICSW),
178 &
scheme->Effects.bMenuAnimation,
184 &
scheme->Effects.bMenuFade,
191 scheme->Effects.bTooltipAnimation =
scheme->Effects.bMenuAnimation;
192 scheme->Effects.bTooltipFade =
scheme->Effects.bMenuFade;
197 &
scheme->Effects.bFontSmoothing,
203 &
scheme->Effects.uiFontSmoothingType,
210 &
scheme->Effects.bDropShadow,
217 &
scheme->Effects.bDragFullWindows,
224 &
scheme->Effects.bKeyboardCues,
253 wsprintf(strSchemeKey,
L"%s\\%s\\Sizes\\%s",
255 pSelectedTheme->Color->StyleName,
256 pSelectedTheme->Size->StyleName);
334 WCHAR clText[16], *StyleName;
366 sizeof(NONCLIENTMETRICS),
381#define SYS_CONFIG(__uiAction, __uiParam, __pvParam) \
382 SystemParametersInfoW(__uiAction, __uiParam, __pvParam, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE)
384 scheme->Effects.bTooltipAnimation =
scheme->Effects.bMenuAnimation;
385 scheme->Effects.bTooltipFade =
scheme->Effects.bMenuFade;
431 if (pSelectedTheme->Theme !=
NULL && pSelectedTheme->ThemeActive ==
FALSE)
433 StyleName = pSelectedTheme->Color->StyleName;
513 pStyle = pStylesList;
550 for (pStyle = pStylesList; pStyle; pStyle = pStyle->
NextStyle)
568 HKEY hkSizes, hkSize;
571 WCHAR wstrSizeName[5], wstrDisplayName[50];
588 sizeof(wstrDisplayName),
597 sizeof(wstrDisplayName),
604 pCurrentStyle =
CreateStyle(wstrSizeName, wstrDisplayName);
606 pCurrentStyle =
CreateStyle(wstrSizeName, wstrSizeName);
608 if (pCurrentStyle !=
NULL)
610 pCurrentStyle->NextStyle =
List;
611 List = pCurrentStyle;
628 HKEY hkNewSchemes, hkScheme;
630 WCHAR wstrStyleName[5], wstrDisplayName[50];
647 sizeof(wstrDisplayName),
656 sizeof(wstrDisplayName),
663 pCurrentStyle =
CreateStyle(wstrStyleName, wstrDisplayName);
665 pCurrentStyle =
CreateStyle(wstrStyleName, wstrStyleName);
667 if (pCurrentStyle !=
NULL)
669 pCurrentStyle->NextStyle =
List;
671 if(pCurrentStyle->ChildStyle ==
NULL)
674 List = pCurrentStyle;
698 if(pCurrentStyle ==
NULL)
break;
700 *ppPrevStyle = pCurrentStyle;
701 ppPrevStyle = &pCurrentStyle->NextStyle;
735 pTheme =
LoadTheme(pszThemeFileName, pszThemeName);
753 WCHAR strClassicTheme[40];
759 pszClassicTheme = (
res > 0 ? strClassicTheme :
L"Classic Theme");
761 if (pClassicTheme ==
NULL)
return NULL;
765 ZeroMemory(szThemesPath,
sizeof(szThemesPath));
767 if (
FAILED(hret))
return pClassicTheme;
783 return pClassicTheme;
802 for (pTheme = pThemeList; pTheme; pTheme = pTheme->
NextTheme)
807 pFoundTheme = pTheme;
817 pFoundTheme =
LoadTheme(pwszThemeFileName, pwszThemeFileName);
824 pSelectedTheme->ThemeActive =
TRUE;
825 pSelectedTheme->Theme = pFoundTheme;
834 pSelectedTheme->Size = pFoundTheme->
SizesList;
861 return FindOrAppendTheme(pThemeList, szThemeFileName, szColorBuff, szSizeBuff, pSelectedTheme);
872 WCHAR szSelectedClassicScheme[5], szSelectedClassicSize[5];
874 DWORD dwType, dwDisplayNameLength;
880 szSelectedClassicScheme[0] = 0;
881 szSelectedClassicSize[0] = 0;
887 dwDisplayNameLength =
sizeof(szSelectedClassicScheme);
889 (
LPBYTE)&szSelectedClassicScheme, &dwDisplayNameLength);
893 dwDisplayNameLength =
sizeof(szSelectedClassicSize);
895 &dwType, szSelectedClassicSize, &dwDisplayNameLength);
900 pCurrentStyle =
FindStyle(pThemeList->ColoursList, szSelectedClassicScheme);
903 pSelectedTheme->Theme = pThemeList;
904 pSelectedTheme->Color = pCurrentStyle;
905 pSelectedTheme->Size = pCurrentSize;
916 if (pSelectedTheme->ThemeActive)
919 pSelectedTheme->Color->StyleName,
920 pSelectedTheme->Size->StyleName,
929 if (pSelectedTheme->ThemeActive)
946 pSelectedTheme->Color->StyleName,
947 pSelectedTheme->Size->StyleName,
1001 prcWindow->bottom -= 12;
1006 pSelectedTheme->Theme->ThemeFileName,
1007 pSelectedTheme->Color->StyleName,
1008 pSelectedTheme->Size->StyleName,
unsigned long long UINT64
#define SIZE_CAPTION_WIDTH
struct _THEME_STYLE * PTHEME_STYLE
#define SIZE_ICON_SPACE_X
#define SIZE_SCROLL_HEIGHT
#define SIZE_SM_CAPTION_WIDTH
#define SIZE_ICON_SPACE_Y
#define SIZE_SCROLL_WIDTH
#define SIZE_BORDER_WIDTH
#define SIZE_CAPTION_HEIGHT
#define SIZE_SM_CAPTION_HEIGHT
#define RegCloseKey(hKey)
LONG RegLoadMUIStringW(IN HKEY hKey, IN LPCWSTR pszValue OPTIONAL, OUT LPWSTR pszOutBuf, IN DWORD cbOutBuf, OUT LPDWORD pcbData OPTIONAL, IN DWORD Flags, IN LPCWSTR pszDirectory OPTIONAL)
#define IDS_CLASSIC_THEME
static PTHEME_STYLE LoadSchemeSizes(IN HKEY hkScheme)
static void CleanupStyles(IN PTHEME_STYLE pStylesList)
static PTHEME_STYLE FindStyle(IN PTHEME_STYLE pStylesList, IN PCWSTR StyleName)
static const WCHAR g_CPMetrics[]
PTHEME LoadTheme(IN LPCWSTR pszThemeFileName, IN LPCWSTR pszThemeName)
BOOL CALLBACK EnumThemeProc(IN LPVOID lpReserved, IN LPCWSTR pszThemeFileName, IN LPCWSTR pszThemeName, IN LPCWSTR pszToolTip, IN LPVOID lpReserved2, IN OUT LPVOID lpData)
void CleanupThemes(IN PTHEME pThemeList)
static THEME_STYLE * EnumThemeStyles(IN LPCWSTR pszThemeFileName, IN ENUMTHEMESTYLE pfnEnumTheme)
VOID SchemeSetMetric(IN COLOR_SCHEME *scheme, int id, int value)
static PTHEME_STYLE CreateStyle(LPCWSTR pszName, LPCWSTR pszDisplayName)
static const WCHAR g_CPColors[]
BOOL FindOrAppendTheme(IN PTHEME pThemeList, IN LPCWSTR pwszThemeFileName, IN LPCWSTR pwszColorBuff, IN LPCWSTR pwszSizeBuff, OUT PTHEME_SELECTION pSelectedTheme)
HRESULT(WINAPI * ENUMTHEMESTYLE)(LPCWSTR, LPWSTR, DWORD, PTHEMENAMES)
static const WCHAR * g_RegColorNames[NUM_COLORS]
PLOGFONTW SchemeGetFont(IN COLOR_SCHEME *scheme, int id)
BOOL GetActiveTheme(IN PTHEME pThemeList, OUT PTHEME_SELECTION pSelectedTheme)
static const WCHAR g_SelectedStyle[]
BOOL DrawThemePreview(IN HDC hdcMem, IN PCOLOR_SCHEME scheme, IN PTHEME_SELECTION pSelectedTheme, IN PRECT prcWindow)
int SchemeGetMetric(IN COLOR_SCHEME *scheme, int id)
BOOL ActivateThemeFile(LPCWSTR pwszFile)
BOOL LoadSchemeFromTheme(OUT PCOLOR_SCHEME scheme, IN PTHEME_SELECTION pSelectedTheme)
BOOL GetActiveClassicTheme(IN PTHEME pThemeList, OUT PTHEME_SELECTION pSelectedTheme)
BOOL ActivateTheme(IN PTHEME_SELECTION pSelectedTheme)
VOID ApplyScheme(IN COLOR_SCHEME *scheme, IN PTHEME_SELECTION pSelectedTheme)
static THEME * CreateTheme(LPCWSTR pszName, LPCWSTR pszDisplayName)
BOOL LoadSchemeFromReg(OUT COLOR_SCHEME *scheme, IN PTHEME_SELECTION pSelectedTheme)
INT_PTR CALLBACK ThemesPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL LoadCurrentScheme(OUT COLOR_SCHEME *scheme)
static const WCHAR g_CPANewSchemes[]
static THEME_STYLE * LoadClassicColorSchemes(VOID)
#define SYS_CONFIG(__uiAction, __uiParam, __pvParam)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
static DWORD DWORD * dwLength
static void cleanup(void)
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
DWORD WINAPI SHSetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, DWORD dwType, LPCVOID pvData, DWORD cbData)
int WINAPI SHRegGetIntW(HKEY hKey, LPCWSTR lpszValue, int iDefault)
COLORREF WINAPI GetThemeSysColor(HTHEME hTheme, int iColorID)
HRESULT WINAPI GetThemeSysFont(HTHEME hTheme, int iFontID, LOGFONTW *plf)
int WINAPI GetThemeSysSize(HTHEME hTheme, int iSizeID)
BOOL WINAPI GetThemeSysBool(HTHEME hTheme, int iBoolID)
HRESULT WINAPI DrawNCPreview(HDC hDC, DWORD DNCP_Flag, LPRECT prcPreview, LPCWSTR pszThemeFileName, LPCWSTR pszColorName, LPCWSTR pszSizeName, PNONCLIENTMETRICSW pncMetrics, COLORREF *lpaRgbValues)
HTHEME WINAPI OpenThemeDataFromFile(HTHEMEFILE hThemeFile, HWND hwnd, LPCWSTR pszClassList, DWORD flags)
HRESULT WINAPI GetCurrentThemeName(LPWSTR pszThemeFileName, int dwMaxNameChars, LPWSTR pszColorBuff, int cchMaxColorChars, LPWSTR pszSizeBuff, int cchMaxSizeChars)
HRESULT WINAPI ApplyTheme(HTHEMEFILE hThemeFile, char *unknown, HWND hWnd)
HRESULT WINAPI OpenThemeFile(LPCWSTR pszThemeFileName, LPCWSTR pszColorName, LPCWSTR pszSizeName, HTHEMEFILE *hThemeFile, DWORD unknown)
HRESULT WINAPI EnumThemeColors(LPWSTR pszThemeFileName, LPWSTR pszSizeName, DWORD dwColorNum, PTHEMENAMES pszColorNames)
HRESULT WINAPI EnumThemeSizes(LPWSTR pszThemeFileName, LPWSTR pszColorName, DWORD dwSizeNum, PTHEMENAMES pszSizeNames)
HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, ENUMTHEMEPROC callback, LPVOID lpData)
HRESULT WINAPI CloseThemeFile(HTHEMEFILE hThemeFile)
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP wchar_t *__cdecl _wcsdup(_In_z_ const wchar_t *_Str)
struct _THEME_STYLE * ChildStyle
struct _THEME_STYLE * NextStyle
THEME_STYLE * ColoursList
struct _THEME * NextTheme
struct tagTHEMENAMES * PTHEMENAMES
#define TMT_SMALLCAPTIONFONT
#define TMT_ICONTITLEFONT
_Must_inspect_result_ _In_ WDFCMRESLIST List
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define HKEY_CURRENT_USER
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI SetSysColors(_In_ int cElements, _In_reads_(cElements) CONST INT *lpaElements, _In_reads_(cElements) CONST COLORREF *lpaRgbValues)
#define SPIF_UPDATEINIFILE
struct tagNMHDR * LPNMHDR
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO