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
b398d443
Commit
b398d443
authored
Oct 08, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/datetime: Block WM_SETTEXT message.
parent
f0c99e01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
datetime.c
dlls/comctl32/datetime.c
+3
-0
datetime.c
dlls/comctl32/tests/datetime.c
+20
-0
No files found.
dlls/comctl32/datetime.c
View file @
b398d443
...
...
@@ -1399,6 +1399,9 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_GETFONT
:
return
(
LRESULT
)
infoPtr
->
hFont
;
case
WM_SETTEXT
:
return
CB_ERR
;
default:
if
((
uMsg
>=
WM_USER
)
&&
(
uMsg
<
WM_APP
)
&&
!
COMCTL32_IsReflectedMessage
(
uMsg
))
ERR
(
"unknown msg %04x wp=%08lx lp=%08lx
\n
"
,
...
...
dlls/comctl32/tests/datetime.c
View file @
b398d443
...
...
@@ -668,6 +668,25 @@ static void test_dtm_set_and_get_system_time(void)
DestroyWindow
(
hWnd
);
}
static
void
test_wm_set_get_text
(
void
)
{
static
const
CHAR
a_str
[]
=
"a"
;
char
buff
[
10
];
HWND
hWnd
;
LRESULT
ret
;
hWnd
=
create_datetime_control
(
0
);
ret
=
SendMessage
(
hWnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
a_str
);
expect
(
CB_ERR
,
ret
);
buff
[
0
]
=
0
;
ret
=
SendMessage
(
hWnd
,
WM_GETTEXT
,
sizeof
(
buff
),
(
LPARAM
)
buff
);
ok
(
strcmp
(
buff
,
a_str
)
!=
0
,
"Expected text not to change, got %s
\n
"
,
buff
);
DestroyWindow
(
hWnd
);
}
START_TEST
(
datetime
)
{
HMODULE
hComctl32
;
...
...
@@ -694,4 +713,5 @@ START_TEST(datetime)
test_dtm_set_and_get_range
();
test_dtm_set_range_swap_min_max
();
test_dtm_set_and_get_system_time
();
test_wm_set_get_text
();
}
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