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
1ebf1471
Commit
1ebf1471
authored
Nov 02, 2006
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Move the system menu test into its own test.
parent
ab8c870a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
msg.c
dlls/user/tests/msg.c
+18
-4
No files found.
dlls/user/tests/msg.c
View file @
1ebf1471
...
...
@@ -3494,11 +3494,18 @@ static void test_showwindow(void)
flush_sequence
();
}
static
void
test_sys_menu
(
HWND
hwn
d
)
static
void
test_sys_menu
(
voi
d
)
{
HWND
hwnd
;
HMENU
hmenu
;
UINT
state
;
hwnd
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
0
,
"Failed to create overlapped window
\n
"
);
flush_sequence
();
/* test existing window without CS_NOCLOSE style */
hmenu
=
GetSystemMenu
(
hwnd
,
FALSE
);
ok
(
hmenu
!=
0
,
"GetSystemMenu error %d
\n
"
,
GetLastError
());
...
...
@@ -3521,6 +3528,15 @@ static void test_sys_menu(HWND hwnd)
ok
(
state
!=
0xffffffff
,
"wrong SC_CLOSE state %x
\n
"
,
state
);
ok
(
!
(
state
&
(
MF_DISABLED
|
MF_GRAYED
)),
"wrong SC_CLOSE state %x
\n
"
,
state
);
/* test whether removing WS_SYSMENU destroys a system menu */
SetWindowLongW
(
hwnd
,
GWL_STYLE
,
WS_POPUP
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_FRAMECHANGED
);
flush_sequence
();
hmenu
=
GetSystemMenu
(
hwnd
,
FALSE
);
ok
(
hmenu
!=
0
,
"GetSystemMenu error %d
\n
"
,
GetLastError
());
DestroyWindow
(
hwnd
);
/* test new window with CS_NOCLOSE style */
hwnd
=
CreateWindowExA
(
0
,
"NoCloseWindowClass"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
...
...
@@ -3610,9 +3626,6 @@ static void test_messages(void)
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
200
,
200
,
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOACTIVATE
);
ok_sequence
(
WmSWP_ResizePopupSeq
,
"SetWindowPos:ResizePopup"
,
FALSE
);
test_sys_menu
(
hwnd
);
flush_sequence
();
DestroyWindow
(
hwnd
);
ok_sequence
(
WmDestroyOverlappedSeq
,
"DestroyWindow:overlapped"
,
FALSE
);
...
...
@@ -8128,6 +8141,7 @@ START_TEST(msg)
test_quit_message
();
test_TrackMouseEvent
();
test_SetWindowRgn
();
test_sys_menu
();
UnhookWindowsHookEx
(
hCBT_hook
);
if
(
pUnhookWinEvent
)
...
...
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