Commit 8caeb2f7 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/monthcal: Fix assumption about a single calendar for minimal rectangle calculation.

parent 197a7164
...@@ -1096,28 +1096,26 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT ...@@ -1096,28 +1096,26 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT
} }
static LRESULT static LRESULT
MONTHCAL_GetMinReqRect(const MONTHCAL_INFO *infoPtr, LPRECT lpRect) MONTHCAL_GetMinReqRect(const MONTHCAL_INFO *infoPtr, RECT *rect)
{ {
TRACE("rect %p\n", lpRect); TRACE("rect %p\n", rect);
if(!lpRect) return FALSE; if(!rect) return FALSE;
lpRect->left = infoPtr->calendars[0].title.left; *rect = infoPtr->calendars[0].title;
lpRect->top = infoPtr->calendars[0].title.top; rect->bottom = infoPtr->calendars[0].days.bottom + infoPtr->todayrect.bottom -
lpRect->right = infoPtr->calendars[0].title.right; infoPtr->todayrect.top;
lpRect->bottom = infoPtr->todayrect.bottom;
AdjustWindowRect(lpRect, infoPtr->dwStyle, FALSE); AdjustWindowRect(rect, infoPtr->dwStyle, FALSE);
/* minimal rectangle is zero based */ /* minimal rectangle is zero based */
OffsetRect(lpRect, -lpRect->left, -lpRect->top); OffsetRect(rect, -rect->left, -rect->top);
TRACE("%s\n", wine_dbgstr_rect(lpRect)); TRACE("%s\n", wine_dbgstr_rect(rect));
return TRUE; return TRUE;
} }
static LRESULT static LRESULT
MONTHCAL_GetColor(const MONTHCAL_INFO *infoPtr, INT index) MONTHCAL_GetColor(const MONTHCAL_INFO *infoPtr, INT index)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment