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
cd168e77
Commit
cd168e77
authored
Nov 07, 1999
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 07, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed crash when asked to use strings identified by resource id
instead of pointer.
parent
f0b27edf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
msgbox.c
windows/msgbox.c
+18
-3
No files found.
windows/msgbox.c
View file @
cd168e77
...
...
@@ -29,6 +29,8 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSA lpmb)
int
i
,
buttons
;
int
bspace
,
bw
,
bh
,
theight
,
tleft
,
wwidth
,
wheight
,
bpos
;
int
borheight
,
borwidth
,
iheight
,
ileft
,
iwidth
,
twidth
,
tiheight
;
LPCSTR
lpszText
;
char
buf
[
256
];
if
(
TWEAK_WineLook
>=
WIN95_LOOK
)
{
NONCLIENTMETRICSA
nclm
;
...
...
@@ -42,8 +44,21 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSA lpmb)
/* set text font */
SendDlgItemMessageA
(
hwnd
,
MSGBOX_IDTEXT
,
WM_SETFONT
,
(
WPARAM
)
hFont
,
0
);
}
if
(
lpmb
->
lpszCaption
)
SetWindowTextA
(
hwnd
,
lpmb
->
lpszCaption
);
SetWindowTextA
(
GetDlgItem
(
hwnd
,
MSGBOX_IDTEXT
),
lpmb
->
lpszText
);
if
(
HIWORD
(
lpmb
->
lpszCaption
))
{
SetWindowTextA
(
hwnd
,
lpmb
->
lpszCaption
);
}
else
{
if
(
LoadStringA
(
lpmb
->
hInstance
,
LOWORD
(
lpmb
->
lpszCaption
),
buf
,
sizeof
(
buf
)))
SetWindowTextA
(
hwnd
,
buf
);
}
if
(
HIWORD
(
lpmb
->
lpszText
))
{
lpszText
=
lpmb
->
lpszText
;
}
else
{
lpszText
=
buf
;
if
(
!
LoadStringA
(
lpmb
->
hInstance
,
LOWORD
(
lpmb
->
lpszText
),
buf
,
sizeof
(
buf
)))
*
buf
=
0
;
/* FIXME ?? */
}
SetWindowTextA
(
GetDlgItem
(
hwnd
,
MSGBOX_IDTEXT
),
lpszText
);
/* Hide not selected buttons */
switch
(
lpmb
->
dwStyle
&
MB_TYPEMASK
)
{
case
MB_OK
:
...
...
@@ -148,7 +163,7 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSA lpmb)
/* Get the text size */
GetClientRect
(
GetDlgItem
(
hwnd
,
MSGBOX_IDTEXT
),
&
rect
);
rect
.
top
=
rect
.
left
=
rect
.
bottom
=
0
;
DrawTextA
(
hdc
,
lp
mb
->
lp
szText
,
-
1
,
&
rect
,
DrawTextA
(
hdc
,
lpszText
,
-
1
,
&
rect
,
DT_LEFT
|
DT_EXPANDTABS
|
DT_WORDBREAK
|
DT_CALCRECT
);
/* Min text width corresponds to space for the buttons */
tleft
=
2
*
ileft
+
iwidth
;
...
...
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