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
5d05f7fc
Commit
5d05f7fc
authored
Nov 01, 2007
by
Lei Zhang
Committed by
Alexandre Julliard
Nov 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Datetime should close its monthcal when the monthcal loses focus.
parent
18c16a80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
datetime.c
dlls/comctl32/datetime.c
+23
-1
No files found.
dlls/comctl32/datetime.c
View file @
5d05f7fc
...
...
@@ -72,6 +72,7 @@ typedef struct
RECT
checkbox
;
/* checkbox allowing the control to be enabled/disabled */
RECT
calbutton
;
/* button that toggles the dropdown of the monthcal control */
BOOL
bCalDepressed
;
/* TRUE = cal button is depressed */
int
bDropdownEnabled
;
int
select
;
HFONT
hFont
;
int
nrFieldsAllocated
;
...
...
@@ -739,7 +740,10 @@ DATETIME_LButtonDown (DATETIME_INFO *infoPtr, WORD wKey, INT x, INT y)
TRACE
(
"update calendar %04d/%02d/%02d
\n
"
,
lprgSysTimeArray
->
wYear
,
lprgSysTimeArray
->
wMonth
,
lprgSysTimeArray
->
wDay
);
SendMessageW
(
infoPtr
->
hMonthCal
,
MCM_SETCURSEL
,
0
,
(
LPARAM
)(
&
infoPtr
->
date
));
ShowWindow
(
infoPtr
->
hMonthCal
,
SW_SHOW
);
if
(
infoPtr
->
bDropdownEnabled
)
ShowWindow
(
infoPtr
->
hMonthCal
,
SW_SHOW
);
infoPtr
->
bDropdownEnabled
=
TRUE
;
}
TRACE
(
"dt:%p mc:%p mc parent:%p, desktop:%p
\n
"
,
...
...
@@ -776,6 +780,10 @@ DATETIME_Paint (DATETIME_INFO *infoPtr, HDC hdc)
}
else
{
DATETIME_Refresh
(
infoPtr
,
hdc
);
}
/* Not a click on the dropdown box, enabled it */
infoPtr
->
bDropdownEnabled
=
TRUE
;
return
0
;
}
...
...
@@ -1063,6 +1071,19 @@ DATETIME_SetFocus (DATETIME_INFO *infoPtr, HWND lostFocus)
{
TRACE
(
"got focus from %p
\n
"
,
lostFocus
);
/* if monthcal is open and it loses focus, close monthcal */
if
(
infoPtr
->
hMonthCal
&&
(
lostFocus
==
infoPtr
->
hMonthCal
)
&&
\
IsWindowVisible
(
infoPtr
->
hMonthCal
))
{
ShowWindow
(
infoPtr
->
hMonthCal
,
SW_HIDE
);
DATETIME_SendSimpleNotify
(
infoPtr
,
DTN_CLOSEUP
);
/* note: this get triggered even if monthcal loses focus to a dropdown
* box click, which occurs without an intermediate WM_PAINT call
*/
infoPtr
->
bDropdownEnabled
=
FALSE
;
return
0
;
}
if
(
infoPtr
->
haveFocus
==
0
)
{
DATETIME_SendSimpleNotify
(
infoPtr
,
NM_SETFOCUS
);
infoPtr
->
haveFocus
=
DTHT_GOTFOCUS
;
...
...
@@ -1207,6 +1228,7 @@ DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr
->
buflen
=
(
int
*
)
Alloc
(
infoPtr
->
nrFieldsAllocated
*
sizeof
(
int
));
infoPtr
->
hwndNotify
=
lpcs
->
hwndParent
;
infoPtr
->
select
=
-
1
;
/* initially, nothing is selected */
infoPtr
->
bDropdownEnabled
=
TRUE
;
DATETIME_StyleChanged
(
infoPtr
,
GWL_STYLE
,
&
ss
);
DATETIME_SetFormatW
(
infoPtr
,
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