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
b4c78be5
Commit
b4c78be5
authored
Sep 02, 2008
by
Vincent Povirk
Committed by
Alexandre Julliard
Sep 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Add tests for SHAppBarMessage.
parent
ced5cb67
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
62 deletions
+2
-62
Makefile.in
dlls/shell32/tests/Makefile.in
+1
-0
appbar.c
dlls/shell32/tests/appbar.c
+0
-0
systray.c
dlls/shell32/tests/systray.c
+1
-62
No files found.
dlls/shell32/tests/Makefile.in
View file @
b4c78be5
...
...
@@ -6,6 +6,7 @@ TESTDLL = shell32.dll
IMPORTS
=
shell32 ole32 oleaut32 user32 advapi32 kernel32
CTESTS
=
\
appbar.c
\
generated.c
\
shelllink.c
\
shellpath.c
\
...
...
dlls/shell32/tests/appbar.c
0 → 100644
View file @
b4c78be5
This diff is collapsed.
Click to expand it.
dlls/shell32/tests/systray.c
View file @
b4c78be5
...
...
@@ -27,7 +27,6 @@
static
HWND
hMainWnd
;
static
BOOL
(
WINAPI
*
pShell_NotifyIconW
)(
DWORD
,
PNOTIFYICONDATAW
);
static
HMONITOR
(
WINAPI
*
pMonitorFromWindow
)(
HWND
,
DWORD
);
void
test_cbsize
(
void
)
{
...
...
@@ -76,74 +75,16 @@ void test_cbsize(void)
ok
(
!
Shell_NotifyIconA
(
NIM_DELETE
,
&
nidA
),
"The icon was not deleted
\n
"
);
}
static
void
test_SHAppBarMessage
(
void
)
{
APPBARDATA
abd
;
HWND
hwnd
,
foregnd
;
UINT_PTR
ret
;
memset
(
&
abd
,
0xcc
,
sizeof
(
abd
));
abd
.
cbSize
=
sizeof
(
abd
);
abd
.
uEdge
=
ABE_BOTTOM
;
hwnd
=
(
HWND
)
SHAppBarMessage
(
ABM_GETAUTOHIDEBAR
,
&
abd
);
ok
(
hwnd
==
NULL
||
IsWindow
(
hwnd
),
"ret %p which is not a window
\n
"
,
hwnd
);
ok
(
abd
.
hWnd
==
(
HWND
)
0xcccccccc
,
"hWnd overwritten
\n
"
);
if
(
!
pMonitorFromWindow
)
{
skip
(
"MonitorFromWindow is not available
\n
"
);
}
else
{
/* Presumably one can pass a hwnd with ABM_GETAUTOHIDEBAR to specify a monitor.
Pass the foreground window and check */
foregnd
=
GetForegroundWindow
();
if
(
foregnd
)
{
abd
.
hWnd
=
foregnd
;
hwnd
=
(
HWND
)
SHAppBarMessage
(
ABM_GETAUTOHIDEBAR
,
&
abd
);
ok
(
hwnd
==
NULL
||
IsWindow
(
hwnd
),
"ret %p which is not a window
\n
"
,
hwnd
);
ok
(
abd
.
hWnd
==
foregnd
,
"hWnd overwritten
\n
"
);
if
(
hwnd
)
{
HMONITOR
appbar_mon
,
foregnd_mon
;
appbar_mon
=
pMonitorFromWindow
(
hwnd
,
MONITOR_DEFAULTTONEAREST
);
foregnd_mon
=
pMonitorFromWindow
(
foregnd
,
MONITOR_DEFAULTTONEAREST
);
ok
(
appbar_mon
==
foregnd_mon
,
"Windows on different monitors
\n
"
);
}
}
}
memset
(
&
abd
,
0xcc
,
sizeof
(
abd
));
abd
.
cbSize
=
sizeof
(
abd
);
ret
=
SHAppBarMessage
(
ABM_GETTASKBARPOS
,
&
abd
);
if
(
ret
)
{
ok
(
abd
.
hWnd
==
(
HWND
)
0xcccccccc
,
"hWnd overwritten
\n
"
);
todo_wine
{
ok
(
abd
.
uEdge
<=
ABE_BOTTOM
,
"uEdge not returned
\n
"
);
ok
(
abd
.
rc
.
left
!=
0xcccccccc
,
"rc not updated
\n
"
);
}
}
return
;
}
START_TEST
(
systray
)
{
WNDCLASSA
wc
;
MSG
msg
;
RECT
rc
;
HMODULE
h
user32
,
h
shell32
;
HMODULE
hshell32
;
hshell32
=
GetModuleHandleA
(
"shell32.dll"
);
pShell_NotifyIconW
=
(
void
*
)
GetProcAddress
(
hshell32
,
"Shell_NotifyIconW"
);
huser32
=
GetModuleHandleA
(
"user32.dll"
);
pMonitorFromWindow
=
(
void
*
)
GetProcAddress
(
huser32
,
"MonitorFromWindow"
);
wc
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
wc
.
cbClsExtra
=
0
;
wc
.
cbWndExtra
=
0
;
...
...
@@ -169,6 +110,4 @@ START_TEST(systray)
DispatchMessageA
(
&
msg
);
}
DestroyWindow
(
hMainWnd
);
test_SHAppBarMessage
();
}
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