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
40bbe3da
Commit
40bbe3da
authored
Nov 25, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Nov 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Process WM_CHAR instead of WM_KEYDOWN for numbers in datetime.
parent
93aed4b0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
43 deletions
+54
-43
datetime.c
dlls/comctl32/datetime.c
+54
-43
No files found.
dlls/comctl32/datetime.c
View file @
40bbe3da
...
...
@@ -902,6 +902,57 @@ DATETIME_KeyDown (DATETIME_INFO *infoPtr, DWORD vkCode)
FIXME
(
"Callbacks not implemented yet
\n
"
);
}
switch
(
vkCode
)
{
case
VK_ADD
:
case
VK_UP
:
DATETIME_IncreaseField
(
infoPtr
,
fieldNum
,
1
);
DATETIME_SendDateTimeChangeNotify
(
infoPtr
);
break
;
case
VK_SUBTRACT
:
case
VK_DOWN
:
DATETIME_IncreaseField
(
infoPtr
,
fieldNum
,
-
1
);
DATETIME_SendDateTimeChangeNotify
(
infoPtr
);
break
;
case
VK_HOME
:
DATETIME_IncreaseField
(
infoPtr
,
fieldNum
,
INT_MIN
);
DATETIME_SendDateTimeChangeNotify
(
infoPtr
);
break
;
case
VK_END
:
DATETIME_IncreaseField
(
infoPtr
,
fieldNum
,
INT_MAX
);
DATETIME_SendDateTimeChangeNotify
(
infoPtr
);
break
;
case
VK_LEFT
:
do
{
if
(
infoPtr
->
select
==
0
)
{
infoPtr
->
select
=
infoPtr
->
nrFields
-
1
;
wrap
++
;
}
else
{
infoPtr
->
select
--
;
}
}
while
((
infoPtr
->
fieldspec
[
infoPtr
->
select
]
&
DT_STRING
)
&&
(
wrap
<
2
));
break
;
case
VK_RIGHT
:
do
{
infoPtr
->
select
++
;
if
(
infoPtr
->
select
==
infoPtr
->
nrFields
)
{
infoPtr
->
select
=
0
;
wrap
++
;
}
}
while
((
infoPtr
->
fieldspec
[
infoPtr
->
select
]
&
DT_STRING
)
&&
(
wrap
<
2
));
break
;
}
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
TRUE
);
return
0
;
}
static
LRESULT
DATETIME_Char
(
DATETIME_INFO
*
infoPtr
,
WPARAM
vkCode
,
LPARAM
keyData
)
{
int
fieldNum
=
infoPtr
->
select
&
DTHT_DATEFIELD
;
if
(
vkCode
>=
'0'
&&
vkCode
<=
'9'
)
{
/* this is a somewhat simplified version of what Windows does */
SYSTEMTIME
*
date
=
&
infoPtr
->
date
;
...
...
@@ -978,49 +1029,6 @@ DATETIME_KeyDown (DATETIME_INFO *infoPtr, DWORD vkCode)
break
;
}
}
switch
(
vkCode
)
{
case
VK_ADD
:
case
VK_UP
:
DATETIME_IncreaseField
(
infoPtr
,
fieldNum
,
1
);
DATETIME_SendDateTimeChangeNotify
(
infoPtr
);
break
;
case
VK_SUBTRACT
:
case
VK_DOWN
:
DATETIME_IncreaseField
(
infoPtr
,
fieldNum
,
-
1
);
DATETIME_SendDateTimeChangeNotify
(
infoPtr
);
break
;
case
VK_HOME
:
DATETIME_IncreaseField
(
infoPtr
,
fieldNum
,
INT_MIN
);
DATETIME_SendDateTimeChangeNotify
(
infoPtr
);
break
;
case
VK_END
:
DATETIME_IncreaseField
(
infoPtr
,
fieldNum
,
INT_MAX
);
DATETIME_SendDateTimeChangeNotify
(
infoPtr
);
break
;
case
VK_LEFT
:
do
{
if
(
infoPtr
->
select
==
0
)
{
infoPtr
->
select
=
infoPtr
->
nrFields
-
1
;
wrap
++
;
}
else
{
infoPtr
->
select
--
;
}
}
while
((
infoPtr
->
fieldspec
[
infoPtr
->
select
]
&
DT_STRING
)
&&
(
wrap
<
2
));
break
;
case
VK_RIGHT
:
do
{
infoPtr
->
select
++
;
if
(
infoPtr
->
select
==
infoPtr
->
nrFields
)
{
infoPtr
->
select
=
0
;
wrap
++
;
}
}
while
((
infoPtr
->
fieldspec
[
infoPtr
->
select
]
&
DT_STRING
)
&&
(
wrap
<
2
));
break
;
}
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
TRUE
);
return
0
;
}
...
...
@@ -1341,6 +1349,9 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_KEYDOWN
:
return
DATETIME_KeyDown
(
infoPtr
,
wParam
);
case
WM_CHAR
:
return
DATETIME_Char
(
infoPtr
,
wParam
,
lParam
);
case
WM_KILLFOCUS
:
return
DATETIME_KillFocus
(
infoPtr
,
(
HWND
)
wParam
);
...
...
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