Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9f1ea3f1
Commit
9f1ea3f1
authored
Oct 25, 2008
by
Clinton Stimpson
Committed by
Alexandre Julliard
Oct 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix getting of min size of monthcal when changing font.
parent
51f3e691
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
monthcal.c
dlls/comctl32/monthcal.c
+2
-0
monthcal.c
dlls/comctl32/tests/monthcal.c
+29
-0
No files found.
dlls/comctl32/monthcal.c
View file @
9f1ea3f1
...
...
@@ -1874,6 +1874,8 @@ static LRESULT MONTHCAL_SetFont(MONTHCAL_INFO *infoPtr, HFONT hFont, BOOL redraw
lf
.
lfWeight
=
FW_BOLD
;
infoPtr
->
hBoldFont
=
CreateFontIndirectW
(
&
lf
);
MONTHCAL_UpdateSize
(
infoPtr
);
if
(
redraw
)
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
...
...
dlls/comctl32/tests/monthcal.c
View file @
9f1ea3f1
...
...
@@ -1112,6 +1112,34 @@ static void test_monthcal_MaxSelDay(HWND hwnd)
ok_sequence
(
sequences
,
MONTHCAL_SEQ_INDEX
,
monthcal_max_sel_day_seq
,
"monthcal MaxSelDay"
,
FALSE
);
}
static
void
test_monthcal_size
(
HWND
hwnd
)
{
int
res
;
RECT
r1
,
r2
;
HFONT
hFont1
,
hFont2
;
LOGFONTA
logfont
;
lstrcpyA
(
logfont
.
lfFaceName
,
"Arial"
);
memset
(
&
logfont
,
0
,
sizeof
(
logfont
));
logfont
.
lfHeight
=
12
;
hFont1
=
CreateFontIndirectA
(
&
logfont
);
logfont
.
lfHeight
=
24
;
hFont2
=
CreateFontIndirectA
(
&
logfont
);
/* initialize to a font we can compare against */
SendMessage
(
hwnd
,
WM_SETFONT
,
(
WPARAM
)
hFont1
,
0
);
res
=
SendMessage
(
hwnd
,
MCM_GETMINREQRECT
,
0
,
(
LPARAM
)
&
r1
);
/* check that setting a larger font results in an larger rect */
SendMessage
(
hwnd
,
WM_SETFONT
,
(
WPARAM
)
hFont2
,
0
);
res
=
SendMessage
(
hwnd
,
MCM_GETMINREQRECT
,
0
,
(
LPARAM
)
&
r2
);
OffsetRect
(
&
r1
,
-
r1
.
left
,
-
r1
.
top
);
OffsetRect
(
&
r2
,
-
r2
.
left
,
-
r2
.
top
);
ok
(
r1
.
bottom
<
r2
.
bottom
,
"Failed to get larger rect with larger font
\n
"
);
}
START_TEST
(
monthcal
)
{
...
...
@@ -1153,6 +1181,7 @@ START_TEST(monthcal)
test_monthcal_monthrange
(
hwnd
);
test_monthcal_HitTest
(
hwnd
);
test_monthcal_todaylink
(
hwnd
);
test_monthcal_size
(
hwnd
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
DestroyWindow
(
hwnd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment