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
b72994b6
Commit
b72994b6
authored
Aug 26, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print the Window caption using Unicode calls.
Don't send WM_GETTEXT to retrieve the caption text.
parent
dff5004b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
nonclient.c
windows/nonclient.c
+9
-8
No files found.
windows/nonclient.c
View file @
b72994b6
...
...
@@ -865,7 +865,7 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd, DWORD style,
DWORD
exStyle
,
BOOL
active
)
{
RECT
r
=
*
rect
;
char
buffer
[
256
];
WCHAR
buffer
[
256
];
HPEN
hPrevPen
;
HMENU
hSysMenu
;
...
...
@@ -912,21 +912,22 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd, DWORD style,
}
}
if
(
GetWindowTextA
(
hwnd
,
buffer
,
sizeof
(
buffer
)
))
{
NONCLIENTMETRICSA
nclm
;
if
(
InternalGetWindowText
(
hwnd
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
))
{
NONCLIENTMETRICSW
nclm
;
HFONT
hFont
,
hOldFont
;
nclm
.
cbSize
=
sizeof
(
NONCLIENTMETRICSA
);
SystemParametersInfo
A
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
nclm
,
0
);
nclm
.
cbSize
=
sizeof
(
nclm
);
SystemParametersInfo
W
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
nclm
,
0
);
if
(
exStyle
&
WS_EX_TOOLWINDOW
)
hFont
=
CreateFontIndirect
A
(
&
nclm
.
lfSmCaptionFont
);
hFont
=
CreateFontIndirect
W
(
&
nclm
.
lfSmCaptionFont
);
else
hFont
=
CreateFontIndirect
A
(
&
nclm
.
lfCaptionFont
);
hFont
=
CreateFontIndirect
W
(
&
nclm
.
lfCaptionFont
);
hOldFont
=
SelectObject
(
hdc
,
hFont
);
if
(
active
)
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_CAPTIONTEXT
)
);
else
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_INACTIVECAPTIONTEXT
)
);
SetBkMode
(
hdc
,
TRANSPARENT
);
r
.
left
+=
2
;
DrawText
A
(
hdc
,
buffer
,
-
1
,
&
r
,
DrawText
W
(
hdc
,
buffer
,
-
1
,
&
r
,
DT_SINGLELINE
|
DT_VCENTER
|
DT_NOPREFIX
|
DT_LEFT
);
DeleteObject
(
SelectObject
(
hdc
,
hOldFont
));
}
...
...
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