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
d8428406
Commit
d8428406
authored
Dec 10, 2018
by
Waritnan Sookbuntherng
Committed by
Alexandre Julliard
Dec 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Test status bar size grip behavior and bounds.
Signed-off-by:
Waritnan Sookbuntherng
<
lion328@hotmail.co.th
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d62ac319
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
126 additions
and
0 deletions
+126
-0
status.c
dlls/comctl32/tests/status.c
+126
-0
No files found.
dlls/comctl32/tests/status.c
View file @
d8428406
...
...
@@ -586,6 +586,131 @@ static void test_notify(void)
ok
(
g_got_contextmenu
,
"WM_RBUTTONUP did not activate the context menu!
\n
"
);
}
static
void
test_sizegrip
(
void
)
{
HWND
hwndStatus
;
LONG
style
;
RECT
rc
,
rcClient
;
POINT
pt
;
int
width
,
r
;
hwndStatus
=
CreateWindowA
(
SUBCLASS_NAME
,
""
,
WS_CHILD
|
WS_VISIBLE
|
SBARS_SIZEGRIP
,
0
,
0
,
100
,
100
,
g_hMainWnd
,
NULL
,
NULL
,
NULL
);
style
=
GetWindowLongPtrA
(
g_hMainWnd
,
GWL_STYLE
);
width
=
GetSystemMetrics
(
SM_CXVSCROLL
);
GetClientRect
(
hwndStatus
,
&
rcClient
);
pt
.
x
=
rcClient
.
right
;
pt
.
y
=
rcClient
.
top
;
ClientToScreen
(
hwndStatus
,
&
pt
);
rc
.
left
=
pt
.
x
-
width
;
rc
.
right
=
pt
.
x
;
rc
.
top
=
pt
.
y
;
pt
.
y
=
rcClient
.
bottom
;
ClientToScreen
(
hwndStatus
,
&
pt
);
rc
.
bottom
=
pt
.
y
;
/* check bounds when not maximized */
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
,
rc
.
top
));
todo_wine
expect
(
HTBOTTOMRIGHT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
-
1
,
rc
.
top
));
expect
(
HTCLIENT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
,
rc
.
top
-
1
));
todo_wine
expect
(
HTBOTTOMRIGHT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
,
rc
.
bottom
));
todo_wine
expect
(
HTBOTTOMRIGHT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
+
1
,
rc
.
bottom
));
todo_wine
expect
(
HTBOTTOMRIGHT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
,
rc
.
bottom
+
1
));
todo_wine
expect
(
HTBOTTOMRIGHT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
-
1
,
rc
.
bottom
-
1
));
expect
(
HTBOTTOMRIGHT
,
r
);
/* not maximized and right-to-left */
SetWindowLongA
(
hwndStatus
,
GWL_EXSTYLE
,
WS_EX_LAYOUTRTL
);
pt
.
x
=
rcClient
.
right
;
ClientToScreen
(
hwndStatus
,
&
pt
);
rc
.
left
=
pt
.
x
+
width
;
rc
.
right
=
pt
.
x
;
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
,
rc
.
top
));
todo_wine
expect
(
HTBOTTOMLEFT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
+
1
,
rc
.
top
));
expect
(
HTCLIENT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
,
rc
.
top
-
1
));
todo_wine
expect
(
HTBOTTOMLEFT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
,
rc
.
bottom
));
todo_wine
expect
(
HTBOTTOMLEFT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
-
1
,
rc
.
bottom
));
todo_wine
expect
(
HTBOTTOMLEFT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
,
rc
.
bottom
+
1
));
todo_wine
expect
(
HTBOTTOMLEFT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
+
1
,
rc
.
bottom
-
1
));
expect
(
HTBOTTOMLEFT
,
r
);
/* maximize with left-to-right */
SetWindowLongA
(
g_hMainWnd
,
GWL_STYLE
,
style
|
WS_MAXIMIZE
);
SetWindowLongA
(
hwndStatus
,
GWL_EXSTYLE
,
0
);
GetClientRect
(
hwndStatus
,
&
rcClient
);
pt
.
x
=
rcClient
.
right
;
pt
.
y
=
rcClient
.
top
;
ClientToScreen
(
hwndStatus
,
&
pt
);
rc
.
left
=
pt
.
x
-
width
;
rc
.
right
=
pt
.
x
;
rc
.
top
=
pt
.
y
;
pt
.
y
=
rcClient
.
bottom
;
ClientToScreen
(
hwndStatus
,
&
pt
);
rc
.
bottom
=
pt
.
y
;
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
,
rc
.
top
));
expect
(
HTCLIENT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
-
1
,
rc
.
top
));
expect
(
HTCLIENT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
,
rc
.
top
-
1
));
expect
(
HTNOWHERE
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
,
rc
.
bottom
));
expect
(
HTNOWHERE
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
+
1
,
rc
.
bottom
));
expect
(
HTNOWHERE
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
,
rc
.
bottom
+
1
));
expect
(
HTNOWHERE
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
-
1
,
rc
.
bottom
-
1
));
todo_wine
expect
(
HTCLIENT
,
r
);
/* maximized with right-to-left */
SetWindowLongA
(
hwndStatus
,
GWL_EXSTYLE
,
WS_EX_LAYOUTRTL
);
pt
.
x
=
rcClient
.
right
;
ClientToScreen
(
hwndStatus
,
&
pt
);
rc
.
left
=
pt
.
x
+
width
;
rc
.
right
=
pt
.
x
;
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
,
rc
.
top
));
expect
(
HTCLIENT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
+
1
,
rc
.
top
));
expect
(
HTCLIENT
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
left
,
rc
.
top
-
1
));
expect
(
HTNOWHERE
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
,
rc
.
bottom
));
expect
(
HTNOWHERE
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
-
1
,
rc
.
bottom
));
expect
(
HTNOWHERE
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
,
rc
.
bottom
+
1
));
expect
(
HTNOWHERE
,
r
);
r
=
SendMessageA
(
hwndStatus
,
WM_NCHITTEST
,
0
,
MAKELPARAM
(
rc
.
right
+
1
,
rc
.
bottom
-
1
));
todo_wine
expect
(
HTCLIENT
,
r
);
SetWindowLongA
(
g_hMainWnd
,
GWL_STYLE
,
style
);
DestroyWindow
(
hwndStatus
);
}
static
void
init_functions
(
void
)
{
HMODULE
hComCtl32
=
LoadLibraryA
(
"comctl32.dll"
);
...
...
@@ -620,4 +745,5 @@ START_TEST(status)
test_status_ownerdraw
();
test_gettext
();
test_notify
();
test_sizegrip
();
}
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