Author: gadamopoulos
Date: Sat Feb 25 09:24:40 2017
New Revision: 73899
URL: http://svn.reactos.org/svn/reactos?rev=73899&view=rev
Log:
[COMCTL32] -Redraw the button when we get a WM_THEMECHANGED.
Modified:
trunk/reactos/dll/win32/comctl32/button.c
Modified: trunk/reactos/dll/win32/comctl32/button.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/button.…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/button.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/button.c [iso-8859-1] Sat Feb 25 09:24:40 2017
@@ -380,6 +380,7 @@
case WM_THEMECHANGED:
CloseThemeData (GetWindowTheme(hWnd));
OpenThemeData(hWnd, WC_BUTTONW);
+ InvalidateRect(hWnd, NULL, FALSE);
break;
case WM_MOUSEHOVER:
Author: gadamopoulos
Date: Sat Feb 25 09:23:37 2017
New Revision: 73898
URL: http://svn.reactos.org/svn/reactos?rev=73898&view=rev
Log:
[UXTHEME] - When we set the desired app name and class name in SetWindowTheme we need to support empty strings meaning no themes for this window. Sort of support empty strings by replacing them with a string containing a single "0". This works since there is no app name or class name with this name. Also add some error messages.
Modified:
trunk/reactos/dll/win32/uxtheme/system.c
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] Sat Feb 25 09:23:37 2017
@@ -667,14 +667,31 @@
{
ATOM oldValue = (ATOM)(size_t)RemovePropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp));
if(oldValue)
+ {
DeleteAtom(oldValue);
- if(pszValue) {
- ATOM atValue = AddAtomW(pszValue);
- if(!atValue
- || !SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp), (LPWSTR)MAKEINTATOM(atValue))) {
- HRESULT hr = HRESULT_FROM_WIN32(GetLastError());
+ }
+
+ if(pszValue)
+ {
+ ATOM atValue;
+
+ /* A string with zero lenght is not acceptatble in AddAtomW but we want to support
+ users passing an empty string meaning they want no theme for the specified window */
+ if(!pszValue[0])
+ pszValue = L"0";
+
+ atValue = AddAtomW(pszValue);
+ if (!atValue)
+ {
+ ERR("AddAtomW for %S failed with last error %d!\n", pszValue, GetLastError());
+ return HRESULT_FROM_WIN32(GetLastError());
+ }
+
+ if (!SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp), (LPWSTR)MAKEINTATOM(atValue)))
+ {
+ ERR("SetPropW for atom %d failed with last error %d\n", aProp, GetLastError());
if(atValue) DeleteAtom(atValue);
- return hr;
+ return HRESULT_FROM_WIN32(GetLastError());
}
}
return S_OK;
Author: hbelusca
Date: Fri Feb 24 02:17:45 2017
New Revision: 73896
URL: http://svn.reactos.org/svn/reactos?rev=73896&view=rev
Log:
[GDI32]: Don't break/crash (if no debugger attached) each time an unimplemented GDI function is called. This is hit a lot by Word 2010 (e.g. when using drawing features), PowerPoint, etc... i.e. all applications that perform "serious" GDI manipulations.
A nice addition would be to know exactly which unimplemented function was called.
Modified:
trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c
Modified: trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/wine/ros…
==============================================================================
--- trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c [iso-8859-1] Fri Feb 24 02:17:45 2017
@@ -10,7 +10,8 @@
INT_PTR
NULL_Unused()
{
- __debugbreak();
+ DPRINT1("NULL_Unused\n");
+ // __debugbreak();
return 0;
}
Author: hbelusca
Date: Fri Feb 24 01:02:26 2017
New Revision: 73894
URL: http://svn.reactos.org/svn/reactos?rev=73894&view=rev
Log:
[GDI32_APITEST]: GetGlyphIndices: Have fun & make ReactOS BSoD from user-mode! More seriously, test extra cases of this API, and show that our current implementation certainly is incomplete & prone to bugs.
The particular case "GetGlyphIndicesW(hdc, NULL, 0, NULL, 0)" is used by Word 2010 (and other apps) when opening the font combolist, and seems to be undocumented.
CORE-12825
CORE-6621 CORE-12279
Modified:
trunk/rostests/apitests/gdi32/GetGlyphIndices.c
Modified: trunk/rostests/apitests/gdi32/GetGlyphIndices.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/GetGlyphIn…
==============================================================================
--- trunk/rostests/apitests/gdi32/GetGlyphIndices.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32/GetGlyphIndices.c [iso-8859-1] Fri Feb 24 01:02:26 2017
@@ -124,7 +124,17 @@
ok_lasterrornotchanged();
ok_int(GetGlyphIndicesW(hdc, NULL, 1, Indices, 0), GDI_ERROR);
ok_lasterrornotchanged();
+ ok_int(GetGlyphIndicesW(hdc, Single, 0, NULL, 0), GDI_ERROR);
+ ok_lasterrornotchanged();
+ ok_int(GetGlyphIndicesW(hdc, Single, 0, Indices, 0), GDI_ERROR);
+ ok_lasterrornotchanged();
ok_int(GetGlyphIndicesW(hdc, Single, 1, NULL, 0), GDI_ERROR);
+ ok_lasterrornotchanged();
+
+ /* Test an exceptional case that does not seem to return an error */
+ // FIXME: What does the returned value exactly means?
+ ok(GetGlyphIndicesW(hdc, NULL, 0, NULL, 0) != 0,
+ "GetGlyphIndicesW(hdc, NULL, 0, NULL, 0) return expected not zero, but got zero!\n");
ok_lasterrornotchanged();
/* Test a single valid char */