ReactOS 0.4.15-dev-7924-g5949c20
uxthemesupp.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Applications
3 * LICENSE: LGPL - See COPYING in the top level directory
4 * FILE: base/applications/msconfig_new/comctl32ex/uxthemesupp.c
5 * PURPOSE: UX Theming helpers.
6 * COPYRIGHT: Copyright 2015 Hermes BELUSCA - MAITO <hermes.belusca@sfr.fr>
7 */
8
9#include "precomp.h"
10#include "uxthemesupp.h"
11
13
16
19
20
21static BOOL
23{
24 if (hUxTheme) return TRUE;
25
26 hUxTheme = LoadLibraryW(L"uxtheme.dll");
27 if (hUxTheme == NULL) return FALSE;
28
30 (ETDTProc)GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
32 (SWTProc)GetProcAddress(hUxTheme, "SetWindowTheme");
33
34 return TRUE;
35}
36
37#if 0
38static VOID
39CleanupUxTheme(VOID)
40{
42 hUxTheme = NULL;
43}
44#endif
45
46
48// Taken from WinSpy++ 1.7
49// http://www.catch22.net/software/winspy
50// Copyright (c) 2002 by J Brown
51//
52
57{
58 if (!InitUxTheme())
60
63
65}
66
70 _In_ LPCWSTR pszSubAppName,
71 _In_ LPCWSTR pszSubIdList)
72{
73 if (!InitUxTheme())
75
78
79 return fnSetWindowTheme(hwnd, pszSubAppName, pszSubIdList);
80}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HANDLE HWND
Definition: compat.h:19
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
#define LoadLibraryW(x)
Definition: compat.h:747
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define _In_
Definition: ms_sal.h:308
#define DWORD
Definition: nt_native.h:44
#define L(x)
Definition: ntvdm.h:50
HRESULT(WINAPI * ETDTProc)(HWND, DWORD)
Definition: uxthemesupp.c:14
HRESULT WINAPI EnableThemeDialogTexture(_In_ HWND hwnd, _In_ DWORD dwFlags)
Definition: uxthemesupp.c:55
static HMODULE hUxTheme
Definition: uxthemesupp.c:12
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
static SWTProc fnSetWindowTheme
Definition: uxthemesupp.c:18
static BOOL InitUxTheme(VOID)
Definition: uxthemesupp.c:22
HRESULT(WINAPI * SWTProc)(HWND, LPCWSTR, LPCWSTR)
Definition: uxthemesupp.c:17
static ETDTProc fnEnableThemeDialogTexture
Definition: uxthemesupp.c:15
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185