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
f6cc0086
Commit
f6cc0086
authored
Aug 26, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Sep 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Allow changing font effects in the choose font dialog.
parent
48aba990
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
wordpad.c
programs/wordpad/wordpad.c
+11
-2
No files found.
programs/wordpad/wordpad.c
View file @
f6cc0086
...
@@ -800,7 +800,7 @@ static void dialog_choose_font(void)
...
@@ -800,7 +800,7 @@ static void dialog_choose_font(void)
cf
.
lStructSize
=
sizeof
(
cf
);
cf
.
lStructSize
=
sizeof
(
cf
);
cf
.
hwndOwner
=
hMainWnd
;
cf
.
hwndOwner
=
hMainWnd
;
cf
.
lpLogFont
=
&
lf
;
cf
.
lpLogFont
=
&
lf
;
cf
.
Flags
=
CF_SCREENFONTS
|
CF_NOSCRIPTSEL
|
CF_INITTOLOGFONTSTRUCT
;
cf
.
Flags
=
CF_SCREENFONTS
|
CF_NOSCRIPTSEL
|
CF_INITTOLOGFONTSTRUCT
|
CF_EFFECTS
;
ZeroMemory
(
&
fmt
,
sizeof
(
fmt
));
ZeroMemory
(
&
fmt
,
sizeof
(
fmt
));
fmt
.
cbSize
=
sizeof
(
fmt
);
fmt
.
cbSize
=
sizeof
(
fmt
);
...
@@ -809,19 +809,28 @@ static void dialog_choose_font(void)
...
@@ -809,19 +809,28 @@ static void dialog_choose_font(void)
lstrcpyW
(
cf
.
lpLogFont
->
lfFaceName
,
fmt
.
szFaceName
);
lstrcpyW
(
cf
.
lpLogFont
->
lfFaceName
,
fmt
.
szFaceName
);
cf
.
lpLogFont
->
lfItalic
=
(
fmt
.
dwEffects
&
CFE_ITALIC
)
?
TRUE
:
FALSE
;
cf
.
lpLogFont
->
lfItalic
=
(
fmt
.
dwEffects
&
CFE_ITALIC
)
?
TRUE
:
FALSE
;
cf
.
lpLogFont
->
lfWeight
=
(
fmt
.
dwEffects
&
CFE_BOLD
)
?
FW_BOLD
:
FW_NORMAL
;
cf
.
lpLogFont
->
lfWeight
=
(
fmt
.
dwEffects
&
CFE_BOLD
)
?
FW_BOLD
:
FW_NORMAL
;
cf
.
lpLogFont
->
lfUnderline
=
(
fmt
.
dwEffects
&
CFE_UNDERLINE
)
?
TRUE
:
FALSE
;
cf
.
lpLogFont
->
lfStrikeOut
=
(
fmt
.
dwEffects
&
CFE_STRIKEOUT
)
?
TRUE
:
FALSE
;
cf
.
lpLogFont
->
lfHeight
=
-
MulDiv
(
fmt
.
yHeight
/
20
,
GetDeviceCaps
(
hDC
,
LOGPIXELSY
),
72
);
cf
.
lpLogFont
->
lfHeight
=
-
MulDiv
(
fmt
.
yHeight
/
20
,
GetDeviceCaps
(
hDC
,
LOGPIXELSY
),
72
);
cf
.
rgbColors
=
fmt
.
crTextColor
;
if
(
ChooseFontW
(
&
cf
))
if
(
ChooseFontW
(
&
cf
))
{
{
ZeroMemory
(
&
fmt
,
sizeof
(
fmt
));
ZeroMemory
(
&
fmt
,
sizeof
(
fmt
));
fmt
.
cbSize
=
sizeof
(
fmt
);
fmt
.
cbSize
=
sizeof
(
fmt
);
fmt
.
dwMask
=
CFM_BOLD
|
CFM_ITALIC
|
CFM_SIZE
;
fmt
.
dwMask
=
CFM_BOLD
|
CFM_ITALIC
|
CFM_SIZE
|
CFM_UNDERLINE
|
CFM_STRIKEOUT
|
CFM_COLOR
;
fmt
.
yHeight
=
cf
.
iPointSize
*
2
;
fmt
.
yHeight
=
cf
.
iPointSize
*
2
;
if
(
cf
.
nFontType
&
BOLD_FONTTYPE
)
if
(
cf
.
nFontType
&
BOLD_FONTTYPE
)
fmt
.
dwEffects
|=
CFE_BOLD
;
fmt
.
dwEffects
|=
CFE_BOLD
;
if
(
cf
.
nFontType
&
ITALIC_FONTTYPE
)
if
(
cf
.
nFontType
&
ITALIC_FONTTYPE
)
fmt
.
dwEffects
|=
CFE_ITALIC
;
fmt
.
dwEffects
|=
CFE_ITALIC
;
if
(
cf
.
lpLogFont
->
lfUnderline
==
TRUE
)
fmt
.
dwEffects
|=
CFE_UNDERLINE
;
if
(
cf
.
lpLogFont
->
lfStrikeOut
==
TRUE
)
fmt
.
dwEffects
|=
CFE_STRIKEOUT
;
fmt
.
crTextColor
=
cf
.
rgbColors
;
SendMessageW
(
hEditorWnd
,
EM_SETCHARFORMAT
,
SCF_SELECTION
,
(
LPARAM
)
&
fmt
);
SendMessageW
(
hEditorWnd
,
EM_SETCHARFORMAT
,
SCF_SELECTION
,
(
LPARAM
)
&
fmt
);
set_font
(
cf
.
lpLogFont
->
lfFaceName
);
set_font
(
cf
.
lpLogFont
->
lfFaceName
);
...
...
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