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
4c3980da
Commit
4c3980da
authored
Aug 25, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Sep 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Add font dialog.
parent
58b09f02
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
61 additions
and
1 deletion
+61
-1
De.rc
programs/wordpad/De.rc
+1
-0
En.rc
programs/wordpad/En.rc
+1
-0
Fr.rc
programs/wordpad/Fr.rc
+1
-0
Hu.rc
programs/wordpad/Hu.rc
+1
-0
Ko.rc
programs/wordpad/Ko.rc
+1
-0
Nl.rc
programs/wordpad/Nl.rc
+1
-0
No.rc
programs/wordpad/No.rc
+1
-0
Pl.rc
programs/wordpad/Pl.rc
+1
-0
Ru.rc
programs/wordpad/Ru.rc
+1
-0
Tr.rc
programs/wordpad/Tr.rc
+1
-0
resource.h
programs/wordpad/resource.h
+2
-0
wordpad.c
programs/wordpad/wordpad.c
+49
-1
No files found.
programs/wordpad/De.rc
View file @
4c3980da
...
@@ -73,6 +73,7 @@ BEGIN
...
@@ -73,6 +73,7 @@ BEGIN
END
END
POPUP "F&ormat"
POPUP "F&ormat"
BEGIN
BEGIN
MENUITEM "&Font . . .", ID_FONTSETTINGS
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Tabs . . ." ID_TABSTOPS
MENUITEM "&Tabs . . ." ID_TABSTOPS
...
...
programs/wordpad/En.rc
View file @
4c3980da
...
@@ -73,6 +73,7 @@ BEGIN
...
@@ -73,6 +73,7 @@ BEGIN
END
END
POPUP "F&ormat"
POPUP "F&ormat"
BEGIN
BEGIN
MENUITEM "&Font . . .", ID_FONTSETTINGS
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Tabs . . ." ID_TABSTOPS
MENUITEM "&Tabs . . ." ID_TABSTOPS
...
...
programs/wordpad/Fr.rc
View file @
4c3980da
...
@@ -73,6 +73,7 @@ BEGIN
...
@@ -73,6 +73,7 @@ BEGIN
END
END
POPUP "Forma&t"
POPUP "Forma&t"
BEGIN
BEGIN
MENUITEM "&Font . . .", ID_FONTSETTINGS
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Tabs . . ." ID_TABSTOPS
MENUITEM "&Tabs . . ." ID_TABSTOPS
...
...
programs/wordpad/Hu.rc
View file @
4c3980da
...
@@ -73,6 +73,7 @@ BEGIN
...
@@ -73,6 +73,7 @@ BEGIN
END
END
POPUP "F&ormtum"
POPUP "F&ormtum"
BEGIN
BEGIN
MENUITEM "&Font . . .", ID_FONTSETTINGS
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Tabs . . ." ID_TABSTOPS
MENUITEM "&Tabs . . ." ID_TABSTOPS
...
...
programs/wordpad/Ko.rc
View file @
4c3980da
...
@@ -75,6 +75,7 @@ BEGIN
...
@@ -75,6 +75,7 @@ BEGIN
POPUP "형식(&O)"
POPUP "형식(&O)"
BEGIN
BEGIN
MENUITEM " 강조 점(&U)" ID_BULLET
MENUITEM " 강조 점(&U)" ID_BULLET
MENUITEM "&Font . . .", ID_FONTSETTINGS
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Tabs . . ." ID_TABSTOPS
MENUITEM "&Tabs . . ." ID_TABSTOPS
POPUP "배경(&B)"
POPUP "배경(&B)"
...
...
programs/wordpad/Nl.rc
View file @
4c3980da
...
@@ -73,6 +73,7 @@ BEGIN
...
@@ -73,6 +73,7 @@ BEGIN
END
END
POPUP "&Opmaak"
POPUP "&Opmaak"
BEGIN
BEGIN
MENUITEM "&Font . . .", ID_FONTSETTINGS
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Tabs . . ." ID_TABSTOPS
MENUITEM "&Tabs . . ." ID_TABSTOPS
...
...
programs/wordpad/No.rc
View file @
4c3980da
...
@@ -73,6 +73,7 @@ BEGIN
...
@@ -73,6 +73,7 @@ BEGIN
END
END
POPUP "F&ormat"
POPUP "F&ormat"
BEGIN
BEGIN
MENUITEM "&Skrift . . .", ID_FONTSETTINGS
MENUITEM "&Punktmerking" ID_BULLET
MENUITEM "&Punktmerking" ID_BULLET
MENUITEM "&Avsnitt . . ." ID_PARAFORMAT
MENUITEM "&Avsnitt . . ." ID_PARAFORMAT
MENUITEM "&Tabulatorer . . ." ID_TABSTOPS
MENUITEM "&Tabulatorer . . ." ID_TABSTOPS
...
...
programs/wordpad/Pl.rc
View file @
4c3980da
...
@@ -74,6 +74,7 @@ BEGIN
...
@@ -74,6 +74,7 @@ BEGIN
END
END
POPUP "F&ormat"
POPUP "F&ormat"
BEGIN
BEGIN
MENUITEM "&Font . . .", ID_FONTSETTINGS
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "Tab&s . . ." ID_TABSTOPS
MENUITEM "Tab&s . . ." ID_TABSTOPS
...
...
programs/wordpad/Ru.rc
View file @
4c3980da
...
@@ -72,6 +72,7 @@ BEGIN
...
@@ -72,6 +72,7 @@ BEGIN
END
END
POPUP "&"
POPUP "&"
BEGIN
BEGIN
MENUITEM "&Font . . .", ID_FONTSETTINGS
MENUITEM "B&ullet points" ID_BULLET
MENUITEM "B&ullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Tabs . . ." ID_TABSTOPS
MENUITEM "&Tabs . . ." ID_TABSTOPS
...
...
programs/wordpad/Tr.rc
View file @
4c3980da
...
@@ -76,6 +76,7 @@ BEGIN
...
@@ -76,6 +76,7 @@ BEGIN
END
END
POPUP "&Biim"
POPUP "&Biim"
BEGIN
BEGIN
MENUITEM "&Font . . .", ID_FONTSETTINGS
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Bullet points" ID_BULLET
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Paragraph . . ." ID_PARAFORMAT
MENUITEM "&Tabs . . ." ID_TABSTOPS
MENUITEM "&Tabs . . ." ID_TABSTOPS
...
...
programs/wordpad/resource.h
View file @
4c3980da
...
@@ -63,6 +63,8 @@
...
@@ -63,6 +63,8 @@
#define ID_EDIT_CLEAR 1313
#define ID_EDIT_CLEAR 1313
#define ID_BULLET 1314
#define ID_BULLET 1314
#define ID_FONTSETTINGS 1315
#define ID_FORMAT_BOLD 1400
#define ID_FORMAT_BOLD 1400
#define ID_FORMAT_ITALIC 1401
#define ID_FORMAT_ITALIC 1401
#define ID_FORMAT_UNDERLINE 1402
#define ID_FORMAT_UNDERLINE 1402
...
...
programs/wordpad/wordpad.c
View file @
4c3980da
...
@@ -719,6 +719,8 @@ static void set_font(LPCWSTR wszFaceName)
...
@@ -719,6 +719,8 @@ static void set_font(LPCWSTR wszFaceName)
{
{
HWND
hReBarWnd
=
GetDlgItem
(
hMainWnd
,
IDC_REBAR
);
HWND
hReBarWnd
=
GetDlgItem
(
hMainWnd
,
IDC_REBAR
);
HWND
hSizeListWnd
=
GetDlgItem
(
hReBarWnd
,
IDC_SIZELIST
);
HWND
hSizeListWnd
=
GetDlgItem
(
hReBarWnd
,
IDC_SIZELIST
);
HWND
hFontListWnd
=
GetDlgItem
(
hReBarWnd
,
IDC_FONTLIST
);
HWND
hFontListEditWnd
=
(
HWND
)
SendMessageW
(
hFontListWnd
,
CBEM_GETEDITCONTROL
,
0
,
0
);
CHARFORMAT2W
fmt
;
CHARFORMAT2W
fmt
;
ZeroMemory
(
&
fmt
,
sizeof
(
fmt
));
ZeroMemory
(
&
fmt
,
sizeof
(
fmt
));
...
@@ -731,6 +733,8 @@ static void set_font(LPCWSTR wszFaceName)
...
@@ -731,6 +733,8 @@ static void set_font(LPCWSTR wszFaceName)
SendMessageW
(
hEditorWnd
,
EM_SETCHARFORMAT
,
SCF_SELECTION
,
(
LPARAM
)
&
fmt
);
SendMessageW
(
hEditorWnd
,
EM_SETCHARFORMAT
,
SCF_SELECTION
,
(
LPARAM
)
&
fmt
);
populate_size_list
(
hSizeListWnd
);
populate_size_list
(
hSizeListWnd
);
SendMessageW
(
hFontListEditWnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)(
LPWSTR
)
wszFaceName
);
}
}
static
void
set_default_font
(
void
)
static
void
set_default_font
(
void
)
...
@@ -785,8 +789,48 @@ static void add_font(LPWSTR fontName, DWORD fontType, HWND hListWnd, NEWTEXTMETR
...
@@ -785,8 +789,48 @@ static void add_font(LPWSTR fontName, DWORD fontType, HWND hListWnd, NEWTEXTMETR
SendMessageW
(
hListWnd
,
CBEM_INSERTITEMW
,
0
,
(
LPARAM
)
&
cbItem
);
SendMessageW
(
hListWnd
,
CBEM_INSERTITEMW
,
0
,
(
LPARAM
)
&
cbItem
);
}
}
static
void
dialog_choose_font
(
void
)
{
CHOOSEFONTW
cf
;
LOGFONTW
lf
;
CHARFORMAT2W
fmt
;
HDC
hDC
=
GetDC
(
hMainWnd
);
ZeroMemory
(
&
cf
,
sizeof
(
cf
));
cf
.
lStructSize
=
sizeof
(
cf
);
cf
.
hwndOwner
=
hMainWnd
;
cf
.
lpLogFont
=
&
lf
;
cf
.
Flags
=
CF_SCREENFONTS
|
CF_NOSCRIPTSEL
|
CF_INITTOLOGFONTSTRUCT
;
ZeroMemory
(
&
fmt
,
sizeof
(
fmt
));
fmt
.
cbSize
=
sizeof
(
fmt
);
SendMessageW
(
hEditorWnd
,
EM_GETCHARFORMAT
,
SCF_SELECTION
,
(
LPARAM
)
&
fmt
);
lstrcpyW
(
cf
.
lpLogFont
->
lfFaceName
,
fmt
.
szFaceName
);
cf
.
lpLogFont
->
lfItalic
=
(
fmt
.
dwEffects
&
CFE_ITALIC
)
?
TRUE
:
FALSE
;
cf
.
lpLogFont
->
lfWeight
=
(
fmt
.
dwEffects
&
CFE_BOLD
)
?
FW_BOLD
:
FW_NORMAL
;
cf
.
lpLogFont
->
lfHeight
=
-
MulDiv
(
fmt
.
yHeight
/
20
,
GetDeviceCaps
(
hDC
,
LOGPIXELSY
),
72
);
if
(
ChooseFontW
(
&
cf
))
{
ZeroMemory
(
&
fmt
,
sizeof
(
fmt
));
fmt
.
cbSize
=
sizeof
(
fmt
);
fmt
.
dwMask
=
CFM_BOLD
|
CFM_ITALIC
|
CFM_SIZE
;
fmt
.
yHeight
=
cf
.
iPointSize
*
2
;
if
(
cf
.
nFontType
&
BOLD_FONTTYPE
)
fmt
.
dwEffects
|=
CFE_BOLD
;
if
(
cf
.
nFontType
&
ITALIC_FONTTYPE
)
fmt
.
dwEffects
|=
CFE_ITALIC
;
SendMessageW
(
hEditorWnd
,
EM_SETCHARFORMAT
,
SCF_SELECTION
,
(
LPARAM
)
&
fmt
);
set_font
(
cf
.
lpLogFont
->
lfFaceName
);
}
}
int
CALLBACK
enum_font_proc
(
const
LOGFONTW
*
lpelfe
,
const
TEXTMETRICW
*
lpntme
,
int
CALLBACK
enum_font_proc
(
const
LOGFONTW
*
lpelfe
,
const
TEXTMETRICW
*
lpntme
,
DWORD
FontType
,
LPARAM
lParam
)
DWORD
FontType
,
LPARAM
lParam
)
{
{
HWND
hListWnd
=
(
HWND
)
lParam
;
HWND
hListWnd
=
(
HWND
)
lParam
;
...
@@ -2670,6 +2714,10 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
...
@@ -2670,6 +2714,10 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
handle_findmsg
(
&
findreplace
);
handle_findmsg
(
&
findreplace
);
break
;
break
;
case
ID_FONTSETTINGS
:
dialog_choose_font
();
break
;
case
ID_PRINT
:
case
ID_PRINT
:
dialog_print
();
dialog_print
();
break
;
break
;
...
...
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