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
80d4d54c
Commit
80d4d54c
authored
Jan 04, 2009
by
Ge van Geldorp
Committed by
Alexandre Julliard
Jan 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Fix title bar tests for non-English locales.
parent
40fb1cd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
42 deletions
+27
-42
monthcal.c
dlls/comctl32/tests/monthcal.c
+27
-42
No files found.
dlls/comctl32/tests/monthcal.c
View file @
80d4d54c
...
...
@@ -215,10 +215,6 @@ static const struct message monthcal_hit_test_seq[] = {
{
MCM_HITTEST
,
sent
|
wparam
,
0
},
{
MCM_HITTEST
,
sent
|
wparam
,
0
},
{
MCM_HITTEST
,
sent
|
wparam
,
0
},
{
MCM_HITTEST
,
sent
|
wparam
,
0
},
{
MCM_HITTEST
,
sent
|
wparam
,
0
},
{
MCM_HITTEST
,
sent
|
wparam
,
0
},
{
MCM_HITTEST
,
sent
|
wparam
,
0
},
{
0
}
};
...
...
@@ -463,8 +459,6 @@ static LRESULT WINAPI monthcal_subclass_proc(HWND hwnd, UINT message, WPARAM wPa
LRESULT
ret
;
struct
message
msg
;
trace
(
"monthcal: %p, %04x, %08lx, %08lx
\n
"
,
hwnd
,
message
,
wParam
,
lParam
);
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
;
if
(
defwndproc_counter
)
msg
.
flags
|=
defwinproc
;
...
...
@@ -727,6 +721,12 @@ static void test_monthcal_HitTest(HWND hwnd)
MCHITTESTINFO
mchit
;
UINT
res
;
SYSTEMTIME
st
;
LONG
x
;
UINT
title_index
;
static
const
UINT
title_hits
[]
=
{
MCHT_NOWHERE
,
MCHT_TITLEBK
,
MCHT_TITLEBTNPREV
,
MCHT_TITLEBK
,
MCHT_TITLEMONTH
,
MCHT_TITLEBK
,
MCHT_TITLEYEAR
,
MCHT_TITLEBK
,
MCHT_TITLEBTNNEXT
,
MCHT_TITLEBK
,
MCHT_NOWHERE
};
memset
(
&
mchit
,
0
,
sizeof
(
MCHITTESTINFO
));
...
...
@@ -781,42 +781,6 @@ static void test_monthcal_HitTest(HWND hwnd)
expect
(
mchit
.
uHit
,
res
);
expect
(
MCHT_CALENDARBK
,
res
);
/* (50, 40) is in active area - previous month button */
mchit
.
pt
.
x
=
50
;
mchit
.
pt
.
y
=
40
;
res
=
SendMessage
(
hwnd
,
MCM_HITTEST
,
0
,
(
LPARAM
)
&
mchit
);
expect
(
50
,
mchit
.
pt
.
x
);
expect
(
40
,
mchit
.
pt
.
y
);
expect
(
mchit
.
uHit
,
res
);
todo_wine
{
expect
(
MCHT_TITLEBTNPREV
,
res
);}
/* (90, 40) is in active area - background section of the title */
mchit
.
pt
.
x
=
90
;
mchit
.
pt
.
y
=
40
;
res
=
SendMessage
(
hwnd
,
MCM_HITTEST
,
0
,
(
LPARAM
)
&
mchit
);
expect
(
90
,
mchit
.
pt
.
x
);
expect
(
40
,
mchit
.
pt
.
y
);
expect
(
mchit
.
uHit
,
res
);
todo_wine
{
expect
(
MCHT_TITLE
,
res
);}
/* (140, 40) is in active area - month section of the title */
mchit
.
pt
.
x
=
140
;
mchit
.
pt
.
y
=
40
;
res
=
SendMessage
(
hwnd
,
MCM_HITTEST
,
0
,
(
LPARAM
)
&
mchit
);
expect
(
140
,
mchit
.
pt
.
x
);
expect
(
40
,
mchit
.
pt
.
y
);
expect
(
mchit
.
uHit
,
res
);
todo_wine
{
expect
(
MCHT_TITLEMONTH
,
res
);}
/* (250, 40) is in active area - next month button */
mchit
.
pt
.
x
=
250
;
mchit
.
pt
.
y
=
40
;
res
=
SendMessage
(
hwnd
,
MCM_HITTEST
,
0
,
(
LPARAM
)
&
mchit
);
expect
(
250
,
mchit
.
pt
.
x
);
expect
(
40
,
mchit
.
pt
.
y
);
expect
(
mchit
.
uHit
,
res
);
todo_wine
{
expect
(
MCHT_TITLEBTNNEXT
,
res
);}
/* (70, 70) is in active area - day of the week */
mchit
.
pt
.
x
=
70
;
mchit
.
pt
.
y
=
70
;
...
...
@@ -910,6 +874,27 @@ static void test_monthcal_HitTest(HWND hwnd)
todo_wine
{
expect
(
MCHT_TODAYLINK
,
res
);}
ok_sequence
(
sequences
,
MONTHCAL_SEQ_INDEX
,
monthcal_hit_test_seq
,
"monthcal hit test"
,
TRUE
);
/* The horizontal position of title bar elements depends on locale (y pos
is constant), so we sample across a horizontal line and make sure we
find all elements. */
mchit
.
pt
.
y
=
40
;
title_index
=
0
;
for
(
x
=
0
;
x
<
300
;
x
++
){
mchit
.
pt
.
x
=
x
;
res
=
SendMessage
(
hwnd
,
MCM_HITTEST
,
0
,
(
LPARAM
)
&
mchit
);
expect
(
x
,
mchit
.
pt
.
x
);
expect
(
40
,
mchit
.
pt
.
y
);
expect
(
mchit
.
uHit
,
res
);
if
(
res
!=
title_hits
[
title_index
]){
title_index
++
;
if
(
sizeof
(
title_hits
)
/
sizeof
(
title_hits
[
0
])
<=
title_index
)
break
;
todo_wine
{
expect
(
title_hits
[
title_index
],
res
);}
}
}
todo_wine
{
ok
(
300
<=
x
&&
title_index
+
1
==
sizeof
(
title_hits
)
/
sizeof
(
title_hits
[
0
]),
"Wrong title layout
\n
"
);}
}
static
void
test_monthcal_todaylink
(
HWND
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