Author: akhaldi
Date: Fri Nov 27 22:48:33 2015
New Revision: 70168
URL:
http://svn.reactos.org/svn/reactos?rev=70168&view=rev
Log:
[USER32] Sync static.c with Wine Staging 1.7.55. CORE-10536
Modified:
trunk/reactos/media/doc/README.WINE
trunk/reactos/win32ss/user/user32/controls/static.c
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Nov 27 22:48:33 2015
@@ -299,7 +299,7 @@
reactos/win32ss/user/user32/controls/icontitle.c # Synced to WineStaging-1.7.55
reactos/win32ss/user/user32/controls/listbox.c # Synced to WineStaging-1.7.55
reactos/win32ss/user/user32/controls/scrollbar.c # Forked
- reactos/win32ss/user/user32/controls/static.c # Synced to Wine-1_1_39
+ reactos/win32ss/user/user32/controls/static.c # Synced to WineStaging-1.7.55
reactos/win32ss/user/user32/include/dde_private.h # Synced to Wine-1.1.24
Modified: trunk/reactos/win32ss/user/user32/controls/static.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/contro…
==============================================================================
--- trunk/reactos/win32ss/user/user32/controls/static.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/controls/static.c [iso-8859-1] Fri Nov 27 22:48:33
2015
@@ -21,7 +21,7 @@
*
* This code was audited for completeness against the documented features
* of Comctl32.dll version 6.0 on Oct. 4, 2004, by Dimitrie O. Paun.
- *
+ *
* Unless otherwise noted, we believe this code to be complete, as per
* the specification mentioned above.
* If you discover missing features, or bugs, please note them below.
@@ -174,7 +174,7 @@
SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
}
-
+
}
return hOldBitmap;
}
@@ -299,7 +299,24 @@
static HBRUSH STATIC_SendWmCtlColorStatic(HWND hwnd, HDC hdc)
{
+#ifdef __REACTOS__
return GetControlBrush( hwnd, hdc, WM_CTLCOLORSTATIC);
+#else
+ HBRUSH hBrush;
+ HWND parent = GetParent(hwnd);
+
+ if (!parent) parent = hwnd;
+ hBrush = (HBRUSH) SendMessageW( parent,
+ WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
+ if (!hBrush) /* did the app forget to call DefWindowProc ? */
+ {
+ /* FIXME: DefWindowProc should return different colors if a
+ manifest is present */
+ hBrush = (HBRUSH)DefWindowProcW( parent, WM_CTLCOLORSTATIC,
+ (WPARAM)hdc, (LPARAM)hwnd);
+ }
+ return hBrush;
+#endif
}
static VOID STATIC_InitColours(void)
@@ -326,7 +343,7 @@
case SS_OWNERDRAW:
return TRUE;
}
-
+
return FALSE;
}
@@ -472,15 +489,12 @@
case WM_SETTEXT:
if (hasTextStyle( full_style ))
{
- if (HIWORD(lParam))
- {
- if(unicode)
- lResult = DefWindowProcW( hwnd, uMsg, wParam, lParam );
- else
- lResult = DefWindowProcA( hwnd, uMsg, wParam, lParam );
- STATIC_TryPaintFcn( hwnd, full_style );
- }
- }
+ if (unicode)
+ lResult = DefWindowProcW( hwnd, uMsg, wParam, lParam );
+ else
+ lResult = DefWindowProcA( hwnd, uMsg, wParam, lParam );
+ STATIC_TryPaintFcn( hwnd, full_style );
+ }
break;
case WM_SETFONT:
@@ -823,6 +837,7 @@
GetClientRect(hwnd, &rcClient);
if (style & SS_CENTERIMAGE)
{
+ FillRect( hdc, &rcClient, hbrush );
rcClient.left = (rcClient.right - rcClient.left)/2 - bm.bmWidth/2;
rcClient.top = (rcClient.bottom - rcClient.top)/2 - bm.bmHeight/2;
rcClient.right = rcClient.left + bm.bmWidth;