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
ee69858e
Commit
ee69858e
authored
Mar 07, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Make tests run again on win95 and NT.
parent
c19e0a63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
systray.c
dlls/shell32/tests/systray.c
+27
-16
No files found.
dlls/shell32/tests/systray.c
View file @
ee69858e
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
static
HWND
hMainWnd
;
static
HWND
hMainWnd
;
static
BOOL
(
WINAPI
*
pShell_NotifyIconW
)(
DWORD
,
PNOTIFYICONDATAW
);
static
BOOL
(
WINAPI
*
pShell_NotifyIconW
)(
DWORD
,
PNOTIFYICONDATAW
);
static
HMONITOR
(
WINAPI
*
pMonitorFromWindow
)(
HWND
,
DWORD
);
void
test_cbsize
(
void
)
void
test_cbsize
(
void
)
{
{
...
@@ -89,21 +90,28 @@ static void test_SHAppBarMessage(void)
...
@@ -89,21 +90,28 @@ static void test_SHAppBarMessage(void)
ok
(
hwnd
==
NULL
||
IsWindow
(
hwnd
),
"ret %p which is not a window
\n
"
,
hwnd
);
ok
(
hwnd
==
NULL
||
IsWindow
(
hwnd
),
"ret %p which is not a window
\n
"
,
hwnd
);
ok
(
abd
.
hWnd
==
(
HWND
)
0xcccccccc
,
"hWnd overwritten
\n
"
);
ok
(
abd
.
hWnd
==
(
HWND
)
0xcccccccc
,
"hWnd overwritten
\n
"
);
/* Presumably one can pass a hwnd with ABM_GETAUTOHIDEBAR to specify a monitor.
if
(
!
pMonitorFromWindow
)
Pass the foreground window and check */
foregnd
=
GetForegroundWindow
();
if
(
foregnd
)
{
{
abd
.
hWnd
=
foregnd
;
skip
(
"MonitorFromWindow is not available
\n
"
);
hwnd
=
(
HWND
)
SHAppBarMessage
(
ABM_GETAUTOHIDEBAR
,
&
abd
);
}
ok
(
hwnd
==
NULL
||
IsWindow
(
hwnd
),
"ret %p which is not a window
\n
"
,
hwnd
);
else
ok
(
abd
.
hWnd
==
foregnd
,
"hWnd overwritten
\n
"
);
{
if
(
hwnd
)
/* Presumably one can pass a hwnd with ABM_GETAUTOHIDEBAR to specify a monitor.
Pass the foreground window and check */
foregnd
=
GetForegroundWindow
();
if
(
foregnd
)
{
{
HMONITOR
appbar_mon
,
foregnd_mon
;
abd
.
hWnd
=
foregnd
;
appbar_mon
=
MonitorFromWindow
(
hwnd
,
MONITOR_DEFAULTTONEAREST
);
hwnd
=
(
HWND
)
SHAppBarMessage
(
ABM_GETAUTOHIDEBAR
,
&
abd
);
foregnd_mon
=
MonitorFromWindow
(
foregnd
,
MONITOR_DEFAULTTONEAREST
);
ok
(
hwnd
==
NULL
||
IsWindow
(
hwnd
),
"ret %p which is not a window
\n
"
,
hwnd
);
ok
(
appbar_mon
==
foregnd_mon
,
"Windows on different monitors
\n
"
);
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
"
);
}
}
}
}
}
...
@@ -128,10 +136,13 @@ START_TEST(systray)
...
@@ -128,10 +136,13 @@ START_TEST(systray)
WNDCLASSA
wc
;
WNDCLASSA
wc
;
MSG
msg
;
MSG
msg
;
RECT
rc
;
RECT
rc
;
HMODULE
hdll
;
HMODULE
huser32
,
hshell32
;
hshell32
=
GetModuleHandleA
(
"shell32.dll"
);
pShell_NotifyIconW
=
(
void
*
)
GetProcAddress
(
hshell32
,
"Shell_NotifyIconW"
);
h
dll
=
GetModuleHandleA
(
"shell
32.dll"
);
h
user32
=
GetModuleHandleA
(
"user
32.dll"
);
p
Shell_NotifyIconW
=
(
void
*
)
GetProcAddress
(
hdll
,
"Shell_NotifyIconW
"
);
p
MonitorFromWindow
=
(
void
*
)
GetProcAddress
(
huser32
,
"MonitorFromWindow
"
);
wc
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
wc
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
wc
.
cbClsExtra
=
0
;
wc
.
cbClsExtra
=
0
;
...
...
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