Author: dchapyshev
Date: Sun Jan 11 13:04:51 2009
New Revision: 38708
URL:
http://svn.reactos.org/svn/reactos?rev=38708&view=rev
Log:
- Sync uxtheme with Wine head
Modified:
trunk/reactos/dll/win32/uxtheme/draw.c
trunk/reactos/dll/win32/uxtheme/msstyles.c
trunk/reactos/dll/win32/uxtheme/system.c
Modified: trunk/reactos/dll/win32/uxtheme/draw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/draw.c?r…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] Sun Jan 11 13:04:51 2009
@@ -100,7 +100,7 @@
hParent = hwnd;
if(prc) {
CopyRect(&rt, prc);
- MapWindowPoints(hwnd, NULL, (LPPOINT)&rt, 2);
+ MapWindowPoints(hwnd, hParent, (LPPOINT)&rt, 2);
clip = CreateRectRgn(0,0,1,1);
hasClip = GetClipRgn(hdc, clip);
@@ -110,8 +110,8 @@
IntersectClipRect(hdc, prc->left, prc->top, prc->right,
prc->bottom);
}
else {
- GetClientRect(hParent, &rt);
- MapWindowPoints(hParent, NULL, (LPPOINT)&rt, 2);
+ GetClientRect(hwnd, &rt);
+ MapWindowPoints(hwnd, hParent, (LPPOINT)&rt, 2);
}
OffsetViewportOrgEx(hdc, -rt.left, -rt.top, &org);
Modified: trunk/reactos/dll/win32/uxtheme/msstyles.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/msstyles…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/msstyles.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/msstyles.c [iso-8859-1] Sun Jan 11 13:04:51 2009
@@ -43,9 +43,9 @@
* Defines and global variables
*/
-BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR
*lpValEnd, int *value);
-BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd,
LPWSTR lpBuff, DWORD buffSize);
-void MSSTYLES_ParseThemeIni(PTHEME_FILE tf, BOOL setMetrics);
+static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR
*lpValEnd, int *value);
+static BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR
*lpValEnd, LPWSTR lpBuff, DWORD buffSize);
+static void MSSTYLES_ParseThemeIni(PTHEME_FILE tf, BOOL setMetrics);
static HRESULT MSSTYLES_GetFont (LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR
*lpValEnd, LOGFONTW* logfont);
extern HINSTANCE hDllInst;
@@ -685,9 +685,9 @@
{
int r,g,b;
LPCWSTR lpValueEnd = lpValue + dwValueLen;
- MSSTYLES_GetNextInteger(lpValue, lpValueEnd, &lpValue, &r);
- MSSTYLES_GetNextInteger(lpValue, lpValueEnd, &lpValue, &g);
- if(MSSTYLES_GetNextInteger(lpValue, lpValueEnd, &lpValue, &b)) {
+ if(MSSTYLES_GetNextInteger(lpValue, lpValueEnd, &lpValue, &r) &&
+ MSSTYLES_GetNextInteger(lpValue, lpValueEnd, &lpValue, &g) &&
+ MSSTYLES_GetNextInteger(lpValue, lpValueEnd, &lpValue, &b)) {
state->colorElements[state->colorCount] = iPropertyId - TMT_FIRSTCOLOR;
state->colorRgb[state->colorCount++] = RGB(r,g,b);
switch (iPropertyId)
@@ -852,7 +852,7 @@
* PARAMS
* tf Theme to parse
*/
-void MSSTYLES_ParseThemeIni(PTHEME_FILE tf, BOOL setMetrics)
+static void MSSTYLES_ParseThemeIni(PTHEME_FILE tf, BOOL setMetrics)
{
static const WCHAR szSysMetrics[] =
{'S','y','s','M','e','t','r','i','c','s','\0'};
static const WCHAR szGlobals[] =
{'g','l','o','b','a','l','s','\0'};
@@ -1139,7 +1139,7 @@
return img->image;
}
-BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR
*lpValEnd, int *value)
+static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR
*lpValEnd, int *value)
{
LPCWSTR cur = lpStringStart;
int total = 0;
@@ -1163,7 +1163,7 @@
return TRUE;
}
-BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd,
LPWSTR lpBuff, DWORD buffSize) {
+static BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR
*lpValEnd, LPWSTR lpBuff, DWORD buffSize) {
LPCWSTR cur = lpStringStart;
LPCWSTR start;
LPCWSTR end;
@@ -1210,8 +1210,14 @@
lpCur = tp->lpValue;
lpEnd = tp->lpValue + tp->dwValueLen;
- MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &red);
- MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &green);
+ if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &red)) {
+ TRACE("Could not parse color property\n");
+ return E_PROP_ID_UNSUPPORTED;
+ }
+ if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &green)) {
+ TRACE("Could not parse color property\n");
+ return E_PROP_ID_UNSUPPORTED;
+ }
if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &blue)) {
TRACE("Could not parse color property\n");
return E_PROP_ID_UNSUPPORTED;
@@ -1316,7 +1322,10 @@
LPCWSTR lpCur = tp->lpValue;
LPCWSTR lpEnd = tp->lpValue + tp->dwValueLen;
- MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &x);
+ if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &x)) {
+ TRACE("Could not parse position property\n");
+ return E_PROP_ID_UNSUPPORTED;
+ }
if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &y)) {
TRACE("Could not parse position property\n");
return E_PROP_ID_UNSUPPORTED;
Modified: trunk/reactos/dll/win32/uxtheme/system.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/system.c…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] Sun Jan 11 13:04:51 2009
@@ -916,7 +916,7 @@
* char b[] = "\0"; where \0 can be one or more of any character, makes no
difference
* the theme is applied smoothly (screen does not flicker)
* char *b = "\0" or NULL; where \0 can be zero or more of any character, makes
no difference
- * the function fails returning invalid parameter...very strange
+ * the function fails returning invalid parameter... very strange
*/
HRESULT WINAPI ApplyTheme(HTHEMEFILE hThemeFile, char *unknown, HWND hWnd)
{