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
7912acaa
Commit
7912acaa
authored
May 17, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Added support for MCS_SHORTDAYSOFWEEK style.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d701a76c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
monthcal.c
dlls/comctl32/monthcal.c
+15
-4
commctrl.rh
include/commctrl.rh
+1
-0
No files found.
dlls/comctl32/monthcal.c
View file @
7912acaa
...
...
@@ -1156,6 +1156,18 @@ static void MONTHCAL_PaintLeadTrailMonths(const MONTHCAL_INFO *infoPtr, HDC hdc,
}
}
static
int
get_localized_dayname
(
const
MONTHCAL_INFO
*
infoPtr
,
unsigned
int
day
,
WCHAR
*
buff
,
unsigned
int
count
)
{
LCTYPE
lctype
;
if
(
infoPtr
->
dwStyle
&
MCS_SHORTDAYSOFWEEK
)
lctype
=
LOCALE_SSHORTESTDAYNAME1
+
day
;
else
lctype
=
LOCALE_SABBREVDAYNAME1
+
day
;
return
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
lctype
,
buff
,
count
);
}
/* paint a calendar area */
static
void
MONTHCAL_PaintCalendar
(
const
MONTHCAL_INFO
*
infoPtr
,
HDC
hdc
,
const
PAINTSTRUCT
*
ps
,
INT
calIdx
)
{
...
...
@@ -1196,7 +1208,7 @@ static void MONTHCAL_PaintCalendar(const MONTHCAL_INFO *infoPtr, HDC hdc, const
i
=
infoPtr
->
firstDay
;
for
(
j
=
0
;
j
<
7
;
j
++
)
{
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_SABBREVDAYNAME1
+
(
i
+
j
+
6
)
%
7
,
buf
,
countof
(
buf
));
get_localized_dayname
(
infoPtr
,
(
i
+
j
+
6
)
%
7
,
buf
,
countof
(
buf
));
DrawTextW
(
hdc
,
buf
,
strlenW
(
buf
),
&
r
,
DT_CENTER
|
DT_VCENTER
|
DT_SINGLELINE
);
OffsetRect
(
&
r
,
infoPtr
->
width_increment
,
0
);
}
...
...
@@ -2500,8 +2512,7 @@ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr)
size
.
cx
=
sz
.
cx
=
0
;
for
(
i
=
0
;
i
<
7
;
i
++
)
{
if
(
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_SABBREVDAYNAME1
+
i
,
buff
,
countof
(
buff
)))
if
(
get_localized_dayname
(
infoPtr
,
i
,
buff
,
countof
(
buff
)))
{
GetTextExtentPoint32W
(
hdc
,
buff
,
lstrlenW
(
buff
),
&
sz
);
if
(
sz
.
cx
>
size
.
cx
)
size
.
cx
=
sz
.
cx
;
...
...
@@ -2703,7 +2714,7 @@ static INT MONTHCAL_StyleChanged(MONTHCAL_INFO *infoPtr, WPARAM wStyleType,
infoPtr
->
dwStyle
=
lpss
->
styleNew
;
/* make room for week numbers */
if
((
lpss
->
styleNew
^
lpss
->
styleOld
)
&
MCS_WEEKNUMBERS
)
if
((
lpss
->
styleNew
^
lpss
->
styleOld
)
&
(
MCS_WEEKNUMBERS
|
MCS_SHORTDAYSOFWEEK
)
)
MONTHCAL_UpdateSize
(
infoPtr
);
return
0
;
...
...
include/commctrl.rh
View file @
7912acaa
...
...
@@ -186,6 +186,7 @@
#define MCS_NOTODAY 0x0010
#define MCS_NOTODAYCIRCLE 0x0008
#define MCS_NOTRAILINGDATES 0x0040
#define MCS_SHORTDAYSOFWEEK 0x0080
/* 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