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
80f3e66d
Commit
80f3e66d
authored
Nov 22, 2005
by
Rein Klazes
Committed by
Alexandre Julliard
Nov 22, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In CFn_CHOOSEFONT16to32W fix the conversion of the lpTemplateName and
the lpszStyle fields.
parent
46c5b5bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
fontdlg16.c
dlls/commdlg/fontdlg16.c
+12
-14
No files found.
dlls/commdlg/fontdlg16.c
View file @
80f3e66d
...
...
@@ -58,7 +58,7 @@ static void FONT_LogFont16To32W( const LPLOGFONT16 font16, LPLOGFONTW font32 )
font32
->
lfPitchAndFamily
=
font16
->
lfPitchAndFamily
;
MultiByteToWideChar
(
CP_ACP
,
0
,
font16
->
lfFaceName
,
LF_FACESIZE
,
font32
->
lfFaceName
,
LF_FACESIZE
);
}
;
}
static
void
FONT_Metrics16To32W
(
const
TEXTMETRIC16
*
pm16
,
NEWTEXTMETRICEXW
*
pnm32w
)
...
...
@@ -67,24 +67,23 @@ static void FONT_Metrics16To32W( const TEXTMETRIC16 *pm16,
/* NOTE: only the fields used by AddFontStyle() are filled in */
pnm32w
->
ntmTm
.
tmHeight
=
pm16
->
tmHeight
;
pnm32w
->
ntmTm
.
tmExternalLeading
=
pm16
->
tmExternalLeading
;
}
;
}
static
void
CFn_CHOOSEFONT16to32W
(
LPCHOOSEFONT16
chf16
,
LPCHOOSEFONTW
chf32w
)
{
int
len
;
if
(
chf16
->
lpTemplateName
)
if
(
chf16
->
Flags
&
CF_ENABLETEMPLATE
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
chf16
->
lpTemplateName
,
-
1
,
NULL
,
0
);
chf32w
->
lpTemplateName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
MapSL
(
chf16
->
lpTemplateName
),
-
1
,
(
LPWSTR
)
chf32w
->
lpTemplateName
,
len
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
MapSL
(
chf16
->
lpTemplateName
)
,
-
1
,
NULL
,
0
);
chf32w
->
lpTemplateName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
MapSL
(
chf16
->
lpTemplateName
),
-
1
,
(
LPWSTR
)
chf32w
->
lpTemplateName
,
len
);
}
if
(
chf16
->
lpszStyle
)
if
(
chf16
->
Flags
&
CF_USESTYLE
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
chf16
->
lpszStyle
,
-
1
,
NULL
,
0
);
chf32w
->
lpszStyle
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
MapSL
(
chf16
->
lpTemplateName
),
-
1
,
chf32w
->
lpszStyle
,
len
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
MapSL
(
chf16
->
lpszStyle
),
-
1
,
NULL
,
0
);
chf32w
->
lpszStyle
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
MapSL
(
chf16
->
lpszStyle
),
-
1
,
chf32w
->
lpszStyle
,
len
);
}
chf32w
->
lStructSize
=
sizeof
(
CHOOSEFONTW
);
chf32w
->
hwndOwner
=
HWND_32
(
chf16
->
hwndOwner
);
...
...
@@ -95,12 +94,11 @@ static void CFn_CHOOSEFONT16to32W(LPCHOOSEFONT16 chf16, LPCHOOSEFONTW chf32w)
chf32w
->
lCustData
=
chf16
->
lCustData
;
chf32w
->
lpfnHook
=
NULL
;
chf32w
->
hInstance
=
HINSTANCE_32
(
chf16
->
hInstance
);
chf32w
->
lpszStyle
=
MapSL
(
chf16
->
lpszStyle
);
chf32w
->
nFontType
=
chf16
->
nFontType
;
chf32w
->
nSizeMax
=
chf16
->
nSizeMax
;
chf32w
->
nSizeMin
=
chf16
->
nSizeMin
;
FONT_LogFont16To32W
(
MapSL
(
chf16
->
lpLogFont
),
chf32w
->
lpLogFont
);
}
;
}
/***********************************************************************
* CFn_HookCallChk [internal]
...
...
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