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
3d66e753
Commit
3d66e753
authored
Aug 18, 2017
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: DialogBoxParam should return -1 when dialog control creation fails.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a62a8601
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
dialog.c
dlls/user32/dialog.c
+8
-6
dialog.c
dlls/user32/tests/dialog.c
+0
-1
No files found.
dlls/user32/dialog.c
View file @
3d66e753
...
...
@@ -835,11 +835,12 @@ INT_PTR WINAPI DialogBoxParamA( HINSTANCE hInst, LPCSTR name,
HRSRC
hrsrc
;
LPCDLGTEMPLATEA
ptr
;
if
(
owner
&&
!
IsWindow
(
owner
))
return
0
;
if
(
!
(
hrsrc
=
FindResourceA
(
hInst
,
name
,
(
LPSTR
)
RT_DIALOG
)))
return
-
1
;
if
(
!
(
ptr
=
LoadResource
(
hInst
,
hrsrc
)))
return
-
1
;
hwnd
=
DIALOG_CreateIndirect
(
hInst
,
ptr
,
owner
,
dlgProc
,
param
,
FALSE
,
&
owner
);
if
(
hwnd
)
return
DIALOG_DoDialogBox
(
hwnd
,
owner
);
return
0
;
if
(
!
(
hwnd
=
DIALOG_CreateIndirect
(
hInst
,
ptr
,
owner
,
dlgProc
,
param
,
FALSE
,
&
owner
)))
return
-
1
;
return
DIALOG_DoDialogBox
(
hwnd
,
owner
);
}
...
...
@@ -853,11 +854,12 @@ INT_PTR WINAPI DialogBoxParamW( HINSTANCE hInst, LPCWSTR name,
HRSRC
hrsrc
;
LPCDLGTEMPLATEW
ptr
;
if
(
owner
&&
!
IsWindow
(
owner
))
return
0
;
if
(
!
(
hrsrc
=
FindResourceW
(
hInst
,
name
,
(
LPWSTR
)
RT_DIALOG
)))
return
-
1
;
if
(
!
(
ptr
=
LoadResource
(
hInst
,
hrsrc
)))
return
-
1
;
hwnd
=
DIALOG_CreateIndirect
(
hInst
,
ptr
,
owner
,
dlgProc
,
param
,
TRUE
,
&
owner
);
if
(
hwnd
)
return
DIALOG_DoDialogBox
(
hwnd
,
owner
);
return
0
;
if
(
!
(
hwnd
=
DIALOG_CreateIndirect
(
hInst
,
ptr
,
owner
,
dlgProc
,
param
,
TRUE
,
&
owner
)))
return
-
1
;
return
DIALOG_DoDialogBox
(
hwnd
,
owner
);
}
...
...
dlls/user32/tests/dialog.c
View file @
3d66e753
...
...
@@ -1273,7 +1273,6 @@ static void test_DialogBoxParamA(void)
SetLastError
(
0xdeadbeef
);
ret
=
DialogBoxParamA
(
GetModuleHandleA
(
NULL
),
"TEST_DIALOG_INVALID_CLASS"
,
0
,
DestroyDlgWinProc
,
0
);
todo_wine
ok
(
ret
==
-
1
,
"DialogBoxParamA returned %ld, expected -1
\n
"
,
ret
);
ok
(
GetLastError
()
==
0
,
"got %d
\n
"
,
GetLastError
());
...
...
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