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
5d0a02db
Commit
5d0a02db
authored
Jul 26, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Implement MCS_NOSELCHANGEONNAV style.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d73d6b20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
monthcal.c
dlls/comctl32/monthcal.c
+12
-6
commctrl.rh
include/commctrl.rh
+1
-0
No files found.
dlls/comctl32/monthcal.c
View file @
5d0a02db
...
...
@@ -1969,7 +1969,7 @@ static void MONTHCAL_NotifyDayState(MONTHCAL_INFO *infoPtr)
}
/* no valid range check performed */
static
void
MONTHCAL_Scroll
(
MONTHCAL_INFO
*
infoPtr
,
INT
delta
)
static
void
MONTHCAL_Scroll
(
MONTHCAL_INFO
*
infoPtr
,
INT
delta
,
BOOL
keep_selection
)
{
INT
i
,
selIdx
=
-
1
;
...
...
@@ -1982,8 +1982,11 @@ static void MONTHCAL_Scroll(MONTHCAL_INFO *infoPtr, INT delta)
MONTHCAL_GetMonth
(
&
infoPtr
->
calendars
[
i
].
month
,
delta
);
}
if
(
keep_selection
)
return
;
/* selection is always shifted to first calendar */
if
(
infoPtr
->
dwStyle
&
MCS_MULTISELECT
)
if
(
infoPtr
->
dwStyle
&
MCS_MULTISELECT
)
{
SYSTEMTIME
range
[
2
];
...
...
@@ -2004,6 +2007,7 @@ static void MONTHCAL_Scroll(MONTHCAL_INFO *infoPtr, INT delta)
static
void
MONTHCAL_GoToMonth
(
MONTHCAL_INFO
*
infoPtr
,
enum
nav_direction
direction
)
{
INT
delta
=
infoPtr
->
delta
?
infoPtr
->
delta
:
MONTHCAL_GetCalCount
(
infoPtr
);
BOOL
keep_selection
;
SYSTEMTIME
st
;
TRACE
(
"%s
\n
"
,
direction
==
DIRECTION_BACKWARD
?
"back"
:
"fwd"
);
...
...
@@ -2022,9 +2026,11 @@ static void MONTHCAL_GoToMonth(MONTHCAL_INFO *infoPtr, enum nav_direction direct
if
(
!
MONTHCAL_IsDateInValidRange
(
infoPtr
,
&
st
,
FALSE
))
return
;
MONTHCAL_Scroll
(
infoPtr
,
direction
==
DIRECTION_BACKWARD
?
-
delta
:
delta
);
keep_selection
=
infoPtr
->
dwStyle
&
MCS_NOSELCHANGEONNAV
;
MONTHCAL_Scroll
(
infoPtr
,
direction
==
DIRECTION_BACKWARD
?
-
delta
:
delta
,
keep_selection
);
MONTHCAL_NotifyDayState
(
infoPtr
);
MONTHCAL_NotifySelectionChange
(
infoPtr
);
if
(
!
keep_selection
)
MONTHCAL_NotifySelectionChange
(
infoPtr
);
}
static
LRESULT
...
...
@@ -2212,7 +2218,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
if
(
MONTHCAL_IsDateInValidRange
(
infoPtr
,
&
st
,
FALSE
))
{
MONTHCAL_Scroll
(
infoPtr
,
delta
);
MONTHCAL_Scroll
(
infoPtr
,
delta
,
FALSE
);
MONTHCAL_NotifyDayState
(
infoPtr
);
MONTHCAL_NotifySelectionChange
(
infoPtr
);
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
...
...
@@ -2851,7 +2857,7 @@ MONTHCAL_Notify(MONTHCAL_INFO *infoPtr, NMHDR *hdr)
if
(
hdr
->
hwndFrom
==
infoPtr
->
hWndYearUpDown
&&
nmud
->
iDelta
)
{
/* year value limits are set up explicitly after updown creation */
MONTHCAL_Scroll
(
infoPtr
,
12
*
nmud
->
iDelta
);
MONTHCAL_Scroll
(
infoPtr
,
12
*
nmud
->
iDelta
,
FALSE
);
MONTHCAL_NotifyDayState
(
infoPtr
);
MONTHCAL_NotifySelectionChange
(
infoPtr
);
}
...
...
include/commctrl.rh
View file @
5d0a02db
...
...
@@ -187,6 +187,7 @@
#define MCS_NOTODAYCIRCLE 0x0008
#define MCS_NOTRAILINGDATES 0x0040
#define MCS_SHORTDAYSOFWEEK 0x0080
#define MCS_NOSELCHANGEONNAV 0x0100
/* Datetime Control */
#define DTS_SHORTDATEFORMAT 0x0000
...
...
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