Mark Harmstone : comctl32: Fix drawing of buddy background for updown controls.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Apr 9 11:07:41 CDT 2015
Module: wine
Branch: master
Commit: b0a9fb6b0d52d2251b91b3e1d676bb65f485809b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b0a9fb6b0d52d2251b91b3e1d676bb65f485809b
Author: Mark Harmstone <hellas at burntcomma.com>
Date: Tue Mar 31 23:39:07 2015 +0100
comctl32: Fix drawing of buddy background for updown controls.
---
dlls/comctl32/updown.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c
index 28dd5e3..d188408 100644
--- a/dlls/comctl32/updown.c
+++ b/dlls/comctl32/updown.c
@@ -366,12 +366,18 @@ static BOOL UPDOWN_SetBuddyInt (const UPDOWN_INFO *infoPtr)
*/
static BOOL UPDOWN_DrawBuddyBackground (const UPDOWN_INFO *infoPtr, HDC hdc)
{
- RECT br;
+ RECT br, r;
HTHEME buddyTheme = GetWindowTheme (infoPtr->Buddy);
if (!buddyTheme) return FALSE;
- GetClientRect (infoPtr->Buddy, &br);
- MapWindowPoints (infoPtr->Buddy, infoPtr->Self, (POINT*)&br, 2);
+ GetWindowRect (infoPtr->Buddy, &br);
+ MapWindowPoints (NULL, infoPtr->Self, (POINT*)&br, 2);
+ GetClientRect (infoPtr->Self, &r);
+
+ if (infoPtr->dwStyle & UDS_ALIGNLEFT)
+ br.left = r.left;
+ else if (infoPtr->dwStyle & UDS_ALIGNRIGHT)
+ br.right = r.right;
/* FIXME: take disabled etc. into account */
DrawThemeBackground (buddyTheme, hdc, 0, 0, &br, NULL);
return TRUE;
More information about the wine-cvs
mailing list