Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
064b54a0
Commit
064b54a0
authored
Sep 02, 2005
by
Frank Richter
Committed by
Alexandre Julliard
Sep 02, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove shlwapi dependency.
parent
b7edbe66
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
13 deletions
+68
-13
Makefile.in
dlls/uxtheme/Makefile.in
+1
-1
msstyles.c
dlls/uxtheme/msstyles.c
+8
-9
system.c
dlls/uxtheme/system.c
+59
-3
No files found.
dlls/uxtheme/Makefile.in
View file @
064b54a0
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
uxtheme.dll
IMPORTLIB
=
libuxtheme.
$(IMPLIBEXT)
IMPORTS
=
shlwapi
user32 gdi32 advapi32 kernel32 ntdll
IMPORTS
=
user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS
=
msimg32
EXTRALIBS
=
$(LIBUNICODE)
...
...
dlls/uxtheme/msstyles.c
View file @
064b54a0
...
...
@@ -25,8 +25,6 @@
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#define NO_SHLWAPI_REG
#include "shlwapi.h"
#include "winnls.h"
#include "wingdi.h"
#include "uxtheme.h"
...
...
@@ -35,6 +33,7 @@
#include "uxthemedll.h"
#include "msstyles.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
...
...
@@ -343,7 +342,7 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
*
iStateId
=
0
;
comp
=
sec
;
/* Get the application name */
tmp
=
StrC
hrW
(
comp
,
':'
);
tmp
=
strc
hrW
(
comp
,
':'
);
if
(
tmp
)
{
*
tmp
++
=
0
;
tmp
++
;
...
...
@@ -351,19 +350,19 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
comp
=
tmp
;
}
tmp
=
StrC
hrW
(
comp
,
'.'
);
tmp
=
strc
hrW
(
comp
,
'.'
);
if
(
tmp
)
{
*
tmp
++
=
0
;
lstrcpynW
(
szClassName
,
comp
,
MAX_THEME_CLASS_NAME
);
comp
=
tmp
;
/* now get the part & state */
tmp
=
StrC
hrW
(
comp
,
'('
);
tmp
=
strc
hrW
(
comp
,
'('
);
if
(
tmp
)
{
*
tmp
++
=
0
;
lstrcpynW
(
part
,
comp
,
sizeof
(
part
)
/
sizeof
(
part
[
0
]));
comp
=
tmp
;
/* now get the state */
*
StrC
hrW
(
comp
,
')'
)
=
0
;
*
strc
hrW
(
comp
,
')'
)
=
0
;
lstrcpynW
(
state
,
comp
,
sizeof
(
state
)
/
sizeof
(
state
[
0
]));
}
else
{
...
...
@@ -371,13 +370,13 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
}
}
else
{
tmp
=
StrC
hrW
(
comp
,
'('
);
tmp
=
strc
hrW
(
comp
,
'('
);
if
(
tmp
)
{
*
tmp
++
=
0
;
lstrcpynW
(
szClassName
,
comp
,
MAX_THEME_CLASS_NAME
);
comp
=
tmp
;
/* now get the state */
*
StrC
hrW
(
comp
,
')'
)
=
0
;
*
strc
hrW
(
comp
,
')'
)
=
0
;
lstrcpynW
(
state
,
comp
,
sizeof
(
state
)
/
sizeof
(
state
[
0
]));
}
else
{
...
...
@@ -805,7 +804,7 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
}
start
=
pszClassList
;
while
((
end
=
StrC
hrW
(
start
,
';'
)))
{
while
((
end
=
strc
hrW
(
start
,
';'
)))
{
len
=
end
-
start
;
lstrcpynW
(
szClassName
,
start
,
min
(
len
+
1
,
sizeof
(
szClassName
)
/
sizeof
(
szClassName
[
0
])));
start
=
end
+
1
;
...
...
dlls/uxtheme/system.c
View file @
064b54a0
...
...
@@ -28,7 +28,6 @@
#include "winuser.h"
#include "wingdi.h"
#include "winreg.h"
#include "shlwapi.h"
#include "uxtheme.h"
#include "tmschema.h"
...
...
@@ -93,6 +92,57 @@ static BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg)
return
TRUE
;
}
/* At the end of the day this is a subset of what SHRegGetPath() does - copied
* here to avoid linking against shlwapi. */
static
DWORD
query_reg_path
(
HKEY
hKey
,
LPCWSTR
lpszValue
,
LPVOID
pvData
)
{
DWORD
dwRet
,
dwType
,
dwUnExpDataLen
=
MAX_PATH
,
dwExpDataLen
;
TRACE
(
"(hkey=%p,%s,%p)
\n
"
,
hKey
,
debugstr_w
(
lpszValue
),
pvData
);
dwRet
=
RegQueryValueExW
(
hKey
,
lpszValue
,
0
,
&
dwType
,
pvData
,
&
dwUnExpDataLen
);
if
(
dwRet
!=
ERROR_SUCCESS
&&
dwRet
!=
ERROR_MORE_DATA
)
return
dwRet
;
if
(
dwType
==
REG_EXPAND_SZ
)
{
DWORD
nBytesToAlloc
;
/* Expand type REG_EXPAND_SZ into REG_SZ */
LPWSTR
szData
;
/* If the caller didn't supply a buffer or the buffer is too small we have
* to allocate our own
*/
if
(
dwRet
==
ERROR_MORE_DATA
)
{
WCHAR
cNull
=
'\0'
;
nBytesToAlloc
=
dwUnExpDataLen
;
szData
=
(
LPWSTR
)
LocalAlloc
(
LMEM_ZEROINIT
,
nBytesToAlloc
);
RegQueryValueExW
(
hKey
,
lpszValue
,
0
,
NULL
,
(
LPBYTE
)
szData
,
&
nBytesToAlloc
);
dwExpDataLen
=
ExpandEnvironmentStringsW
(
szData
,
&
cNull
,
1
);
dwUnExpDataLen
=
max
(
nBytesToAlloc
,
dwExpDataLen
);
LocalFree
((
HLOCAL
)
szData
);
}
else
{
nBytesToAlloc
=
(
lstrlenW
(
pvData
)
+
1
)
*
sizeof
(
WCHAR
);
szData
=
(
LPWSTR
)
LocalAlloc
(
LMEM_ZEROINIT
,
nBytesToAlloc
);
lstrcpyW
(
szData
,
pvData
);
dwExpDataLen
=
ExpandEnvironmentStringsW
(
szData
,
pvData
,
MAX_PATH
);
if
(
dwExpDataLen
>
MAX_PATH
)
dwRet
=
ERROR_MORE_DATA
;
dwUnExpDataLen
=
max
(
nBytesToAlloc
,
dwExpDataLen
);
LocalFree
((
HLOCAL
)
szData
);
}
}
RegCloseKey
(
hKey
);
return
dwRet
;
}
/***********************************************************************
* UXTHEME_LoadTheme
*
...
...
@@ -123,7 +173,7 @@ static void UXTHEME_LoadTheme(void)
buffsize
=
sizeof
(
szCurrentSize
)
/
sizeof
(
szCurrentSize
[
0
]);
if
(
RegQueryValueExW
(
hKey
,
szSizeName
,
NULL
,
NULL
,
(
LPBYTE
)
szCurrentSize
,
&
buffsize
))
szCurrentSize
[
0
]
=
'\0'
;
if
(
SHRegGetPathW
(
hKey
,
NULL
,
szDllName
,
szCurrentTheme
,
0
))
if
(
query_reg_path
(
hKey
,
szDllName
,
szCurrentTheme
))
szCurrentTheme
[
0
]
=
'\0'
;
RegCloseKey
(
hKey
);
}
...
...
@@ -850,6 +900,7 @@ HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, EnumThemeProc callback,
HANDLE
hFind
;
WIN32_FIND_DATAW
wfd
;
HRESULT
hr
;
size_t
pathLen
;
TRACE
(
"(%s,%p,%p)
\n
"
,
debugstr_w
(
pszThemePath
),
callback
,
lpData
);
...
...
@@ -857,7 +908,12 @@ HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, EnumThemeProc callback,
return
E_POINTER
;
lstrcpyW
(
szDir
,
pszThemePath
);
PathAddBackslashW
(
szDir
);
pathLen
=
lstrlenW
(
szDir
);
if
((
pathLen
>
0
)
&&
(
pathLen
<
MAX_PATH
-
1
)
&&
(
szDir
[
pathLen
-
1
]
!=
'\\'
))
{
szDir
[
pathLen
]
=
'\\'
;
szDir
[
pathLen
+
1
]
=
0
;
}
lstrcpyW
(
szPath
,
szDir
);
lstrcatW
(
szPath
,
szStar
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment