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
863921b4
Commit
863921b4
authored
Jul 25, 2007
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winefile: Change choose_font() and init_output() to the W form.
parent
26369e1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
winefile.c
programs/winefile/winefile.c
+19
-20
No files found.
programs/winefile/winefile.c
View file @
863921b4
...
...
@@ -187,7 +187,7 @@ static int last_split;
/* some common string constants */
static
const
TCHAR
sEmpty
[]
=
{
'\0'
};
static
const
T
CHAR
sSpace
[]
=
{
' '
,
'\0'
};
static
const
W
CHAR
sSpace
[]
=
{
' '
,
'\0'
};
static
const
TCHAR
sNumFmt
[]
=
{
'%'
,
'd'
,
'\0'
};
static
const
TCHAR
sQMarks
[]
=
{
'?'
,
'?'
,
'?'
,
'\0'
};
...
...
@@ -271,9 +271,9 @@ static inline INT set_check(HWND hwnd, INT id, BOOL on)
static
inline
void
choose_font
(
HWND
hwnd
)
{
T
CHAR
dlg_name
[
BUFFER_LEN
],
dlg_info
[
BUFFER_LEN
];
CHOOSEFONT
chFont
;
LOGFONT
lFont
;
W
CHAR
dlg_name
[
BUFFER_LEN
],
dlg_info
[
BUFFER_LEN
];
CHOOSEFONT
W
chFont
;
LOGFONT
W
lFont
;
HDC
hdc
=
GetDC
(
hwnd
);
chFont
.
lStructSize
=
sizeof
(
CHOOSEFONT
);
...
...
@@ -291,22 +291,22 @@ static inline void choose_font(HWND hwnd)
chFont
.
nSizeMin
=
0
;
chFont
.
nSizeMax
=
24
;
if
(
ChooseFont
(
&
chFont
))
{
if
(
ChooseFont
W
(
&
chFont
))
{
HWND
childWnd
;
HFONT
hFontOld
;
DeleteObject
(
Globals
.
hfont
);
Globals
.
hfont
=
CreateFontIndirect
(
&
lFont
);
Globals
.
hfont
=
CreateFontIndirect
W
(
&
lFont
);
hFontOld
=
SelectObject
(
hdc
,
Globals
.
hfont
);
GetTextExtentPoint32
(
hdc
,
sSpace
,
1
,
&
Globals
.
spaceSize
);
GetTextExtentPoint32
W
(
hdc
,
sSpace
,
1
,
&
Globals
.
spaceSize
);
/* change font in all open child windows */
for
(
childWnd
=
GetWindow
(
Globals
.
hmdiclient
,
GW_CHILD
);
childWnd
;
childWnd
=
GetNextWindow
(
childWnd
,
GW_HWNDNEXT
))
{
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLongPtr
(
childWnd
,
GWLP_USERDATA
);
SendMessage
(
child
->
left
.
hwnd
,
WM_SETFONT
,
(
WPARAM
)
Globals
.
hfont
,
TRUE
);
SendMessage
(
child
->
right
.
hwnd
,
WM_SETFONT
,
(
WPARAM
)
Globals
.
hfont
,
TRUE
);
SendMessage
(
child
->
left
.
hwnd
,
LB_SETITEMHEIGHT
,
1
,
max
(
Globals
.
spaceSize
.
cy
,
IMAGE_HEIGHT
+
3
));
SendMessage
(
child
->
right
.
hwnd
,
LB_SETITEMHEIGHT
,
1
,
max
(
Globals
.
spaceSize
.
cy
,
IMAGE_HEIGHT
+
3
));
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLongPtr
W
(
childWnd
,
GWLP_USERDATA
);
SendMessage
W
(
child
->
left
.
hwnd
,
WM_SETFONT
,
(
WPARAM
)
Globals
.
hfont
,
TRUE
);
SendMessage
W
(
child
->
right
.
hwnd
,
WM_SETFONT
,
(
WPARAM
)
Globals
.
hfont
,
TRUE
);
SendMessage
W
(
child
->
left
.
hwnd
,
LB_SETITEMHEIGHT
,
1
,
max
(
Globals
.
spaceSize
.
cy
,
IMAGE_HEIGHT
+
3
));
SendMessage
W
(
child
->
right
.
hwnd
,
LB_SETITEMHEIGHT
,
1
,
max
(
Globals
.
spaceSize
.
cy
,
IMAGE_HEIGHT
+
3
));
InvalidateRect
(
child
->
left
.
hwnd
,
NULL
,
TRUE
);
InvalidateRect
(
child
->
right
.
hwnd
,
NULL
,
TRUE
);
}
...
...
@@ -314,9 +314,9 @@ static inline void choose_font(HWND hwnd)
SelectObject
(
hdc
,
hFontOld
);
}
else
if
(
CommDlgExtendedError
())
{
LoadString
(
Globals
.
hInstance
,
IDS_FONT_SEL_DLG_NAME
,
dlg_name
,
BUFFER_LEN
);
LoadString
(
Globals
.
hInstance
,
IDS_FONT_SEL_ERROR
,
dlg_info
,
BUFFER_LEN
);
MessageBox
(
hwnd
,
dlg_info
,
dlg_name
,
MB_OK
);
LoadString
W
(
Globals
.
hInstance
,
IDS_FONT_SEL_DLG_NAME
,
dlg_name
,
BUFFER_LEN
);
LoadString
W
(
Globals
.
hInstance
,
IDS_FONT_SEL_ERROR
,
dlg_info
,
BUFFER_LEN
);
MessageBox
W
(
hwnd
,
dlg_info
,
dlg_name
,
MB_OK
);
}
ReleaseDC
(
hwnd
,
hdc
);
...
...
@@ -2646,19 +2646,18 @@ static HWND create_header(HWND parent, Pane* pane, int id)
static
void
init_output
(
HWND
hwnd
)
{
static
const
TCHAR
s1000
[]
=
{
'1'
,
'0'
,
'0'
,
'0'
,
'\0'
};
TCHAR
b
[
16
];
static
const
WCHAR
s1000
[]
=
{
'1'
,
'0'
,
'0'
,
'0'
,
'\0'
};
WCHAR
b
[
16
];
HFONT
old_font
;
HDC
hdc
=
GetDC
(
hwnd
);
if
(
GetNumberFormat
(
LOCALE_USER_DEFAULT
,
0
,
s1000
,
0
,
b
,
16
)
>
4
)
if
(
GetNumberFormat
W
(
LOCALE_USER_DEFAULT
,
0
,
s1000
,
0
,
b
,
16
)
>
4
)
Globals
.
num_sep
=
b
[
1
];
else
Globals
.
num_sep
=
'.'
;
old_font
=
SelectObject
(
hdc
,
Globals
.
hfont
);
GetTextExtentPoint32
(
hdc
,
sSpace
,
1
,
&
Globals
.
spaceSize
);
GetTextExtentPoint32
W
(
hdc
,
sSpace
,
1
,
&
Globals
.
spaceSize
);
SelectObject
(
hdc
,
old_font
);
ReleaseDC
(
hwnd
,
hdc
);
}
...
...
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