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
f29b5757
Commit
f29b5757
authored
Mar 26, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Allow arbitrary text size for loaded strings in message boxes.
parent
ccd0d625
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
msgbox.c
dlls/user32/msgbox.c
+20
-13
No files found.
dlls/user32/msgbox.c
View file @
f29b5757
...
...
@@ -74,7 +74,9 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
HMONITOR
monitor
=
0
;
MONITORINFO
mon_info
;
LPCWSTR
lpszText
;
WCHAR
buf
[
256
];
WCHAR
*
buffer
=
NULL
;
const
WCHAR
*
ptr
;
/* Index the order the buttons need to appear to an ID* constant */
static
const
int
buttonOrder
[
10
]
=
{
6
,
7
,
1
,
3
,
4
,
2
,
5
,
10
,
11
,
9
};
...
...
@@ -93,24 +95,28 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
if
(
HIWORD
(
lpmb
->
lpszCaption
))
{
SetWindowTextW
(
hwnd
,
lpmb
->
lpszCaption
);
}
else
{
UINT
res_id
=
LOWORD
(
lpmb
->
lpszCaption
);
if
(
res_id
)
{
if
(
LoadStringW
(
lpmb
->
hInstance
,
res_id
,
buf
,
256
))
SetWindowTextW
(
hwnd
,
buf
);
}
else
UINT
len
=
LoadStringW
(
lpmb
->
hInstance
,
LOWORD
(
lpmb
->
lpszCaption
),
(
LPWSTR
)
&
ptr
,
0
);
if
(
!
len
)
len
=
LoadStringW
(
user32_module
,
IDS_ERROR
,
(
LPWSTR
)
&
ptr
,
0
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
buffer
)
{
if
(
LoadStringW
(
user32_module
,
IDS_ERROR
,
buf
,
256
))
SetWindowTextW
(
hwnd
,
buf
);
memcpy
(
buffer
,
ptr
,
len
*
sizeof
(
WCHAR
)
);
buffer
[
len
]
=
0
;
SetWindowTextW
(
hwnd
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
buffer
=
NULL
;
}
}
if
(
HIWORD
(
lpmb
->
lpszText
))
{
lpszText
=
lpmb
->
lpszText
;
}
else
{
lpszText
=
buf
;
if
(
!
LoadStringW
(
lpmb
->
hInstance
,
LOWORD
(
lpmb
->
lpszText
),
buf
,
256
))
*
buf
=
0
;
/* FIXME ?? */
UINT
len
=
LoadStringW
(
lpmb
->
hInstance
,
LOWORD
(
lpmb
->
lpszText
),
(
LPWSTR
)
&
ptr
,
0
);
lpszText
=
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
buffer
)
{
memcpy
(
buffer
,
ptr
,
len
*
sizeof
(
WCHAR
)
);
buffer
[
len
]
=
0
;
}
}
TRACE_
(
msgbox
)(
"%s
\n
"
,
debugstr_w
(
lpszText
));
...
...
@@ -310,6 +316,7 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
if
(((
lpmb
->
dwStyle
&
MB_TASKMODAL
)
&&
(
lpmb
->
hwndOwner
==
NULL
))
||
(
lpmb
->
dwStyle
&
MB_SYSTEMMODAL
))
SetWindowPos
(
hwnd
,
HWND_TOP
,
0
,
0
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOMOVE
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
return
hFont
;
}
...
...
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