Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
008a2b46
Commit
008a2b46
authored
Feb 03, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Added GetMessagePos tests.
parent
47e7f4fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
win.c
dlls/user32/tests/win.c
+62
-0
No files found.
dlls/user32/tests/win.c
View file @
008a2b46
...
...
@@ -7979,6 +7979,67 @@ static void test_smresult(void)
CloseHandle
(
data
.
thread_replied
);
}
static
void
test_GetMessagePos
(
void
)
{
HWND
button
;
DWORD
pos
;
MSG
msg
;
button
=
CreateWindowExA
(
0
,
"button"
,
"button"
,
WS_VISIBLE
,
100
,
100
,
100
,
100
,
0
,
0
,
0
,
NULL
);
ok
(
button
!=
0
,
"CreateWindowExA failed
\n
"
);
SetCursorPos
(
120
,
140
);
flush_events
(
TRUE
);
pos
=
GetMessagePos
();
ok
(
pos
==
MAKELONG
(
120
,
140
),
"pos = %08x
\n
"
,
pos
);
SetCursorPos
(
340
,
320
);
pos
=
GetMessagePos
();
ok
(
pos
==
MAKELONG
(
120
,
140
),
"pos = %08x
\n
"
,
pos
);
SendMessageW
(
button
,
WM_APP
,
0
,
0
);
pos
=
GetMessagePos
();
ok
(
pos
==
MAKELONG
(
120
,
140
),
"pos = %08x
\n
"
,
pos
);
PostMessageA
(
button
,
WM_APP
,
0
,
0
);
GetMessageA
(
&
msg
,
button
,
0
,
0
);
ok
(
msg
.
message
==
WM_APP
,
"msg.message = %x
\n
"
,
msg
.
message
);
pos
=
GetMessagePos
();
todo_wine
ok
(
pos
==
MAKELONG
(
340
,
320
),
"pos = %08x
\n
"
,
pos
);
PostMessageA
(
button
,
WM_APP
,
0
,
0
);
SetCursorPos
(
350
,
330
);
GetMessageA
(
&
msg
,
button
,
0
,
0
);
ok
(
msg
.
message
==
WM_APP
,
"msg.message = %x
\n
"
,
msg
.
message
);
pos
=
GetMessagePos
();
todo_wine
ok
(
pos
==
MAKELONG
(
340
,
320
),
"pos = %08x
\n
"
,
pos
);
PostMessageA
(
button
,
WM_APP
,
0
,
0
);
SetCursorPos
(
320
,
340
);
PostMessageA
(
button
,
WM_APP
+
1
,
0
,
0
);
pos
=
GetMessagePos
();
todo_wine
ok
(
pos
==
MAKELONG
(
340
,
320
),
"pos = %08x
\n
"
,
pos
);
GetMessageA
(
&
msg
,
button
,
0
,
0
);
ok
(
msg
.
message
==
WM_APP
,
"msg.message = %x
\n
"
,
msg
.
message
);
pos
=
GetMessagePos
();
todo_wine
ok
(
pos
==
MAKELONG
(
350
,
330
),
"pos = %08x
\n
"
,
pos
);
GetMessageA
(
&
msg
,
button
,
0
,
0
);
ok
(
msg
.
message
==
WM_APP
+
1
,
"msg.message = %x
\n
"
,
msg
.
message
);
pos
=
GetMessagePos
();
todo_wine
ok
(
pos
==
MAKELONG
(
320
,
340
),
"pos = %08x
\n
"
,
pos
);
SetTimer
(
button
,
1
,
250
,
NULL
);
SetCursorPos
(
330
,
350
);
GetMessageA
(
&
msg
,
button
,
0
,
0
);
ok
(
msg
.
message
==
WM_TIMER
,
"msg.message = %x
\n
"
,
msg
.
message
);
pos
=
GetMessagePos
();
todo_wine
ok
(
pos
==
MAKELONG
(
330
,
350
),
"pos = %08x
\n
"
,
pos
);
KillTimer
(
button
,
1
);
DestroyWindow
(
button
);
}
START_TEST
(
win
)
{
char
**
argv
;
...
...
@@ -8110,6 +8171,7 @@ START_TEST(win)
test_update_region
();
test_window_without_child_style
();
test_smresult
();
test_GetMessagePos
();
/* add the tests above this line */
if
(
hhook
)
UnhookWindowsHookEx
(
hhook
);
...
...
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