comctl32: Fix drawing of buddy background for updown controls.
This commit is contained in:
parent
047698bf7d
commit
b0a9fb6b0d
@ -366,12 +366,18 @@ static BOOL UPDOWN_SetBuddyInt (const UPDOWN_INFO *infoPtr)
|
|||||||
*/
|
*/
|
||||||
static BOOL UPDOWN_DrawBuddyBackground (const UPDOWN_INFO *infoPtr, HDC hdc)
|
static BOOL UPDOWN_DrawBuddyBackground (const UPDOWN_INFO *infoPtr, HDC hdc)
|
||||||
{
|
{
|
||||||
RECT br;
|
RECT br, r;
|
||||||
HTHEME buddyTheme = GetWindowTheme (infoPtr->Buddy);
|
HTHEME buddyTheme = GetWindowTheme (infoPtr->Buddy);
|
||||||
if (!buddyTheme) return FALSE;
|
if (!buddyTheme) return FALSE;
|
||||||
|
|
||||||
GetClientRect (infoPtr->Buddy, &br);
|
GetWindowRect (infoPtr->Buddy, &br);
|
||||||
MapWindowPoints (infoPtr->Buddy, infoPtr->Self, (POINT*)&br, 2);
|
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 */
|
/* FIXME: take disabled etc. into account */
|
||||||
DrawThemeBackground (buddyTheme, hdc, 0, 0, &br, NULL);
|
DrawThemeBackground (buddyTheme, hdc, 0, 0, &br, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user