[USER32] Sync static.c with Wine Staging 1.7.55. CORE-10536

svn path=/trunk/; revision=70168
This commit is contained in:
Amine Khaldi 2015-11-27 22:48:33 +00:00
parent b59d7b29a3
commit 82475df8f5
2 changed files with 28 additions and 13 deletions

View file

@ -299,7 +299,7 @@ User32 -
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

View file

@ -299,7 +299,24 @@ static VOID STATIC_TryPaintFcn(HWND hwnd, LONG full_style)
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)
@ -472,15 +489,12 @@ LRESULT WINAPI StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
case WM_SETTEXT:
if (hasTextStyle( full_style ))
{
if (HIWORD(lParam))
{
if(unicode)
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 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
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;