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
e5a09cff
Commit
e5a09cff
authored
Nov 12, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Reimplement the 16-bit font dialog on top of the 32-bit one.
Stub out the functionality that cannot be supported that way.
parent
459a0c4d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
48 deletions
+24
-48
cdlg.h
dlls/comdlg32/cdlg.h
+0
-25
fontdlg.c
dlls/comdlg32/fontdlg.c
+24
-23
fontdlg16.c
dlls/comdlg32/fontdlg16.c
+0
-0
No files found.
dlls/comdlg32/cdlg.h
View file @
e5a09cff
...
@@ -206,29 +206,4 @@ int CC_HSLtoRGB(char c, int hue, int sat, int lum);
...
@@ -206,29 +206,4 @@ int CC_HSLtoRGB(char c, int hue, int sat, int lum);
void
CC_EditSetRGB
(
HWND
hDlg
,
COLORREF
cr
);
void
CC_EditSetRGB
(
HWND
hDlg
,
COLORREF
cr
);
void
CC_PaintUserColorArray
(
HWND
hDlg
,
int
rows
,
int
cols
,
const
COLORREF
*
lpcr
);
void
CC_PaintUserColorArray
(
HWND
hDlg
,
int
rows
,
int
cols
,
const
COLORREF
*
lpcr
);
typedef
struct
{
HWND
hWnd1
;
HWND
hWnd2
;
LPCHOOSEFONTW
lpcf32w
;
int
added
;
}
CFn_ENUMSTRUCT
,
*
LPCFn_ENUMSTRUCT
;
INT
AddFontFamily
(
const
ENUMLOGFONTEXW
*
lpElfex
,
const
NEWTEXTMETRICEXW
*
lpNTM
,
UINT
nFontType
,
const
CHOOSEFONTW
*
lpcf
,
HWND
hwnd
,
LPCFn_ENUMSTRUCT
e
);
INT
AddFontStyle
(
const
ENUMLOGFONTEXW
*
lpElfex
,
const
NEWTEXTMETRICEXW
*
metrics
,
UINT
nFontType
,
const
CHOOSEFONTW
*
lpcf
,
HWND
hcmb2
,
HWND
hcmb3
,
HWND
hDlg
,
BOOL
iswin16
);
void
_dump_cf_flags
(
DWORD
cflags
);
LRESULT
CFn_WMInitDialog
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
LPCHOOSEFONTW
lpcf
);
LRESULT
CFn_WMMeasureItem
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
);
LRESULT
CFn_WMDrawItem
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
);
LRESULT
CFn_WMCommand
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
LPCHOOSEFONTW
lpcf
);
LRESULT
CFn_WMPaint
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
const
CHOOSEFONTW
*
lpcf
);
#endif
/* _WINE_DLL_CDLG_H */
#endif
/* _WINE_DLL_CDLG_H */
dlls/comdlg32/fontdlg.c
View file @
e5a09cff
...
@@ -33,16 +33,24 @@
...
@@ -33,16 +33,24 @@
#include "dlgs.h"
#include "dlgs.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "cderr.h"
#include "cderr.h"
#include "cdlg.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
commdlg
);
WINE_DEFAULT_DEBUG_CHANNEL
(
commdlg
);
typedef
struct
{
HWND
hWnd1
;
HWND
hWnd2
;
LPCHOOSEFONTW
lpcf32w
;
int
added
;
}
CFn_ENUMSTRUCT
,
*
LPCFn_ENUMSTRUCT
;
static
const
WCHAR
strWineFontData
[]
=
{
'_'
,
'_'
,
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'F'
,
'O'
,
'N'
,
'T'
,
'D'
,
'L'
,
'G'
,
'D'
,
'A'
,
'T'
,
'A'
,
0
};
static
const
WCHAR
strWineFontData
[]
=
{
'_'
,
'_'
,
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'F'
,
'O'
,
'N'
,
'T'
,
'D'
,
'L'
,
'G'
,
'D'
,
'A'
,
'T'
,
'A'
,
0
};
static
const
WCHAR
strWineFontData_a
[]
=
static
const
WCHAR
strWineFontData_a
[]
=
{
'_'
,
'_'
,
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'F'
,
'O'
,
'N'
,
'T'
,
'D'
,
'L'
,
'G'
,
'D'
,
'A'
,
'T'
,
'A'
,
'_'
,
'A'
,
0
};
{
'_'
,
'_'
,
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'F'
,
'O'
,
'N'
,
'T'
,
'D'
,
'L'
,
'G'
,
'D'
,
'A'
,
'T'
,
'A'
,
'_'
,
'A'
,
0
};
static
const
WCHAR
chooseFontW
[]
=
{
'C'
,
'H'
,
'O'
,
'O'
,
'S'
,
'E'
,
'_'
,
'F'
,
'O'
,
'N'
,
'T'
,
0
};
static
const
WCHAR
chooseFontW
[]
=
{
'C'
,
'H'
,
'O'
,
'O'
,
'S'
,
'E'
,
'_'
,
'F'
,
'O'
,
'N'
,
'T'
,
0
};
#include "cdlg.h"
/* image list with TrueType bitmaps and more */
/* image list with TrueType bitmaps and more */
static
HIMAGELIST
himlTT
=
0
;
static
HIMAGELIST
himlTT
=
0
;
#define TTBITMAP_XSIZE 20
/* x-size of the bitmaps */
#define TTBITMAP_XSIZE 20
/* x-size of the bitmaps */
...
@@ -148,7 +156,7 @@ static const struct {
...
@@ -148,7 +156,7 @@ static const struct {
#undef XX
#undef XX
};
};
void
_dump_cf_flags
(
DWORD
cflags
)
static
void
_dump_cf_flags
(
DWORD
cflags
)
{
{
unsigned
int
i
;
unsigned
int
i
;
...
@@ -299,8 +307,8 @@ static BOOL CFn_HookCallChk32(const CHOOSEFONTW *lpcf)
...
@@ -299,8 +307,8 @@ static BOOL CFn_HookCallChk32(const CHOOSEFONTW *lpcf)
/*************************************************************************
/*************************************************************************
* AddFontFamily [internal]
* AddFontFamily [internal]
*/
*/
INT
AddFontFamily
(
const
ENUMLOGFONTEXW
*
lpElfex
,
const
NEWTEXTMETRICEXW
*
lpNTM
,
static
INT
AddFontFamily
(
const
ENUMLOGFONTEXW
*
lpElfex
,
const
NEWTEXTMETRICEXW
*
lpNTM
,
UINT
nFontType
,
const
CHOOSEFONTW
*
lpcf
,
HWND
hwnd
,
LPCFn_ENUMSTRUCT
e
)
UINT
nFontType
,
const
CHOOSEFONTW
*
lpcf
,
HWND
hwnd
,
LPCFn_ENUMSTRUCT
e
)
{
{
int
i
;
int
i
;
WORD
w
;
WORD
w
;
...
@@ -459,9 +467,8 @@ static inline void CFn_ReleaseDC(const CHOOSEFONTW *lpcf, HDC hdc)
...
@@ -459,9 +467,8 @@ static inline void CFn_ReleaseDC(const CHOOSEFONTW *lpcf, HDC hdc)
/***********************************************************************
/***********************************************************************
* AddFontStyle [internal]
* AddFontStyle [internal]
*/
*/
INT
AddFontStyle
(
const
ENUMLOGFONTEXW
*
lpElfex
,
const
NEWTEXTMETRICEXW
*
lpNTM
,
static
INT
AddFontStyle
(
const
ENUMLOGFONTEXW
*
lpElfex
,
const
NEWTEXTMETRICEXW
*
lpNTM
,
UINT
nFontType
,
const
CHOOSEFONTW
*
lpcf
,
HWND
hcmb2
,
HWND
hcmb3
,
UINT
nFontType
,
const
CHOOSEFONTW
*
lpcf
,
HWND
hcmb2
,
HWND
hcmb3
,
HWND
hDlg
)
HWND
hDlg
,
BOOL
iswin16
)
{
{
int
i
;
int
i
;
const
LOGFONTW
*
lplf
=
&
(
lpElfex
->
elfLogFont
);
const
LOGFONTW
*
lplf
=
&
(
lpElfex
->
elfLogFont
);
...
@@ -495,7 +502,7 @@ INT AddFontStyle( const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM,
...
@@ -495,7 +502,7 @@ INT AddFontStyle( const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM,
if
(
i
)
if
(
i
)
return
0
;
return
0
;
}
}
if
(
iswin16
||
!
(
hcmb5
=
GetDlgItem
(
hDlg
,
cmb5
)))
return
1
;
if
(
!
(
hcmb5
=
GetDlgItem
(
hDlg
,
cmb5
)))
return
1
;
i
=
SendMessageW
(
hcmb5
,
CB_FINDSTRINGEXACT
,
0
,
i
=
SendMessageW
(
hcmb5
,
CB_FINDSTRINGEXACT
,
0
,
(
LPARAM
)
lpElfex
->
elfScript
);
(
LPARAM
)
lpElfex
->
elfScript
);
if
(
i
==
CB_ERR
)
{
if
(
i
==
CB_ERR
)
{
...
@@ -584,14 +591,13 @@ static INT WINAPI FontStyleEnumProc( const ENUMLOGFONTEXW *lpElfex,
...
@@ -584,14 +591,13 @@ static INT WINAPI FontStyleEnumProc( const ENUMLOGFONTEXW *lpElfex,
HWND
hcmb3
=
s
->
hWnd2
;
HWND
hcmb3
=
s
->
hWnd2
;
HWND
hDlg
=
GetParent
(
hcmb3
);
HWND
hDlg
=
GetParent
(
hcmb3
);
return
AddFontStyle
(
lpElfex
,
(
const
NEWTEXTMETRICEXW
*
)
metrics
,
return
AddFontStyle
(
lpElfex
,
(
const
NEWTEXTMETRICEXW
*
)
metrics
,
dwFontType
,
s
->
lpcf32w
,
hcmb2
,
hcmb3
,
hDlg
,
FALSE
);
dwFontType
,
s
->
lpcf32w
,
hcmb2
,
hcmb3
,
hDlg
);
}
}
/***********************************************************************
/***********************************************************************
* CFn_WMInitDialog [internal]
* CFn_WMInitDialog [internal]
*/
*/
LRESULT
CFn_WMInitDialog
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
static
LRESULT
CFn_WMInitDialog
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
LPCHOOSEFONTW
lpcf
)
LPCHOOSEFONTW
lpcf
)
{
{
HDC
hdc
;
HDC
hdc
;
int
i
,
j
,
init
=
0
;
int
i
,
j
,
init
=
0
;
...
@@ -747,7 +753,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
...
@@ -747,7 +753,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
/***********************************************************************
/***********************************************************************
* CFn_WMMeasureItem [internal]
* CFn_WMMeasureItem [internal]
*/
*/
LRESULT
CFn_WMMeasureItem
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
CFn_WMMeasureItem
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
HDC
hdc
;
HDC
hdc
;
HFONT
hfontprev
;
HFONT
hfontprev
;
...
@@ -775,7 +781,7 @@ LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
...
@@ -775,7 +781,7 @@ LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
/***********************************************************************
/***********************************************************************
* CFn_WMDrawItem [internal]
* CFn_WMDrawItem [internal]
*/
*/
LRESULT
CFn_WMDrawItem
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
CFn_WMDrawItem
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
HBRUSH
hBrush
;
HBRUSH
hBrush
;
WCHAR
buffer
[
40
];
WCHAR
buffer
[
40
];
...
@@ -879,8 +885,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
...
@@ -879,8 +885,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
/***********************************************************************
/***********************************************************************
* CFn_WMCommand [internal]
* CFn_WMCommand [internal]
*/
*/
LRESULT
CFn_WMCommand
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
static
LRESULT
CFn_WMCommand
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
LPCHOOSEFONTW
lpcf
)
LPCHOOSEFONTW
lpcf
)
{
{
int
i
;
int
i
;
long
l
;
long
l
;
...
@@ -1028,8 +1033,6 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
...
@@ -1028,8 +1033,6 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
i
=
RegisterWindowMessageW
(
HELPMSGSTRINGW
);
i
=
RegisterWindowMessageW
(
HELPMSGSTRINGW
);
if
(
lpcf
->
hwndOwner
)
if
(
lpcf
->
hwndOwner
)
SendMessageW
(
lpcf
->
hwndOwner
,
i
,
0
,
(
LPARAM
)
GetPropW
(
hDlg
,
strWineFontData
));
SendMessageW
(
lpcf
->
hwndOwner
,
i
,
0
,
(
LPARAM
)
GetPropW
(
hDlg
,
strWineFontData
));
/* if (CFn_HookCallChk(lpcf))
CallWindowProc16(lpcf->lpfnHook,hDlg,WM_COMMAND,psh15,(LPARAM)lpcf);*/
break
;
break
;
case
IDOK
:
case
IDOK
:
...
@@ -1084,7 +1087,7 @@ static LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam, LPCHOOSEFO
...
@@ -1084,7 +1087,7 @@ static LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam, LPCHOOSEFO
return
TRUE
;
return
TRUE
;
}
}
LRESULT
CFn_WMPaint
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
const
CHOOSEFONTW
*
lpcf
)
static
LRESULT
CFn_WMPaint
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
const
CHOOSEFONTW
*
lpcf
)
{
{
WINDOWINFO
info
;
WINDOWINFO
info
;
...
@@ -1137,8 +1140,7 @@ LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam, const CHOOSEFONTW *
...
@@ -1137,8 +1140,7 @@ LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam, const CHOOSEFONTW *
/***********************************************************************
/***********************************************************************
* FormatCharDlgProcA [internal]
* FormatCharDlgProcA [internal]
*/
*/
INT_PTR
CALLBACK
FormatCharDlgProcA
(
HWND
hDlg
,
UINT
uMsg
,
WPARAM
wParam
,
static
INT_PTR
CALLBACK
FormatCharDlgProcA
(
HWND
hDlg
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
LPARAM
lParam
)
{
{
LPCHOOSEFONTW
lpcfw
;
LPCHOOSEFONTW
lpcfw
;
LPCHOOSEFONTA
lpcfa
;
LPCHOOSEFONTA
lpcfa
;
...
@@ -1201,8 +1203,7 @@ INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
...
@@ -1201,8 +1203,7 @@ INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
/***********************************************************************
/***********************************************************************
* FormatCharDlgProcW [internal]
* FormatCharDlgProcW [internal]
*/
*/
INT_PTR
CALLBACK
FormatCharDlgProcW
(
HWND
hDlg
,
UINT
uMsg
,
WPARAM
wParam
,
static
INT_PTR
CALLBACK
FormatCharDlgProcW
(
HWND
hDlg
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
LPARAM
lParam
)
{
{
LPCHOOSEFONTW
lpcf
;
LPCHOOSEFONTW
lpcf
;
INT_PTR
res
=
FALSE
;
INT_PTR
res
=
FALSE
;
...
...
dlls/comdlg32/fontdlg16.c
View file @
e5a09cff
This diff is collapsed.
Click to expand it.
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