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
098fd250
Commit
098fd250
authored
Nov 20, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32/tests: Fix the prototype of callback functions.
parent
0705793e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
filedlg.c
dlls/comdlg32/tests/filedlg.c
+10
-12
No files found.
dlls/comdlg32/tests/filedlg.c
View file @
098fd250
...
@@ -239,7 +239,7 @@ cleanup:
...
@@ -239,7 +239,7 @@ cleanup:
return
0
;
return
0
;
}
}
static
LONG
_PTR
WINAPI
template_hook
(
HWND
dlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
UINT
_PTR
WINAPI
template_hook
(
HWND
dlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
if
(
msg
==
WM_INITDIALOG
)
if
(
msg
==
WM_INITDIALOG
)
{
{
...
@@ -286,7 +286,7 @@ static void test_create_view_template(void)
...
@@ -286,7 +286,7 @@ static void test_create_view_template(void)
ofn
.
lStructSize
=
OPENFILENAME_SIZE_VERSION_400A
;
ofn
.
lStructSize
=
OPENFILENAME_SIZE_VERSION_400A
;
ofn
.
lpstrFile
=
filename
;
ofn
.
lpstrFile
=
filename
;
ofn
.
nMaxFile
=
1024
;
ofn
.
nMaxFile
=
1024
;
ofn
.
lpfnHook
=
(
LPOFNHOOKPROC
)
template_hook
;
ofn
.
lpfnHook
=
template_hook
;
ofn
.
Flags
=
OFN_ENABLEHOOK
|
OFN_EXPLORER
|
OFN_ENABLETEMPLATE
;
ofn
.
Flags
=
OFN_ENABLEHOOK
|
OFN_EXPLORER
|
OFN_ENABLETEMPLATE
;
ofn
.
hInstance
=
GetModuleHandleA
(
NULL
);
ofn
.
hInstance
=
GetModuleHandleA
(
NULL
);
ofn
.
lpTemplateName
=
"template1"
;
ofn
.
lpTemplateName
=
"template1"
;
...
@@ -318,7 +318,7 @@ static const struct {
...
@@ -318,7 +318,7 @@ static const struct {
{
0xffffffff
}
{
0xffffffff
}
};
};
static
LONG
_PTR
WINAPI
resize_template_hook
(
HWND
dlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
UINT
_PTR
WINAPI
resize_template_hook
(
HWND
dlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
static
RECT
initrc
,
rc
;
static
RECT
initrc
,
rc
;
static
int
index
,
count
;
static
int
index
,
count
;
...
@@ -538,7 +538,7 @@ static void test_resize(void)
...
@@ -538,7 +538,7 @@ static void test_resize(void)
ofn
.
lpstrFile
=
filename
;
ofn
.
lpstrFile
=
filename
;
ofn
.
nMaxFile
=
1024
;
ofn
.
nMaxFile
=
1024
;
ofn
.
lpfnHook
=
(
LPOFNHOOKPROC
)
resize_template_hook
;
ofn
.
lpfnHook
=
resize_template_hook
;
ofn
.
hInstance
=
GetModuleHandle
(
NULL
);
ofn
.
hInstance
=
GetModuleHandle
(
NULL
);
ofn
.
lpTemplateName
=
"template_sz"
;
ofn
.
lpTemplateName
=
"template_sz"
;
for
(
i
=
0
;
resize_testcases
[
i
].
flags
!=
0xffffffff
;
i
++
)
{
for
(
i
=
0
;
resize_testcases
[
i
].
flags
!=
0xffffffff
;
i
++
)
{
...
@@ -581,7 +581,7 @@ static ok_wndproc_testcase ok_testcases[] = {
...
@@ -581,7 +581,7 @@ static ok_wndproc_testcase ok_testcases[] = {
/* test_ok_wndproc can be used as hook procedure or a subclass
/* test_ok_wndproc can be used as hook procedure or a subclass
* window proc for the file dialog */
* window proc for the file dialog */
static
LONG
_PTR
WINAPI
test_ok_wndproc
(
HWND
dlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
UINT
_PTR
WINAPI
test_ok_wndproc
(
HWND
dlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
HWND
parent
=
GetParent
(
dlg
);
HWND
parent
=
GetParent
(
dlg
);
static
ok_wndproc_testcase
*
testcase
=
NULL
;
static
ok_wndproc_testcase
*
testcase
=
NULL
;
...
@@ -624,7 +624,7 @@ static LONG_PTR WINAPI test_ok_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM
...
@@ -624,7 +624,7 @@ static LONG_PTR WINAPI test_ok_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM
return
FALSE
;
return
FALSE
;
}
}
static
LONG
_PTR
WINAPI
ok_template_hook
(
HWND
dlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
UINT
_PTR
WINAPI
ok_template_hook
(
HWND
dlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
if
(
msg
==
WM_SETFONT
)
if
(
msg
==
WM_SETFONT
)
SetWindowLongPtrA
(
dlg
,
GWLP_WNDPROC
,
(
LONG_PTR
)
test_ok_wndproc
);
SetWindowLongPtrA
(
dlg
,
GWLP_WNDPROC
,
(
LONG_PTR
)
test_ok_wndproc
);
...
@@ -655,9 +655,7 @@ static void test_ok(void)
...
@@ -655,9 +655,7 @@ static void test_ok(void)
for
(
i
=
0
;
ok_testcases
[
i
].
retval
!=
-
1
;
i
++
)
{
for
(
i
=
0
;
ok_testcases
[
i
].
retval
!=
-
1
;
i
++
)
{
strcpy
(
filename
,
tmpfilename
);
strcpy
(
filename
,
tmpfilename
);
ofn
.
lCustData
=
(
LPARAM
)(
ok_testcases
+
i
);
ofn
.
lCustData
=
(
LPARAM
)(
ok_testcases
+
i
);
ofn
.
lpfnHook
=
ok_testcases
[
i
].
do_subclass
ofn
.
lpfnHook
=
ok_testcases
[
i
].
do_subclass
?
ok_template_hook
:
test_ok_wndproc
;
?
(
LPOFNHOOKPROC
)
ok_template_hook
:
(
LPOFNHOOKPROC
)
test_ok_wndproc
;
ret
=
GetOpenFileNameA
(
&
ofn
);
ret
=
GetOpenFileNameA
(
&
ofn
);
ok
(
ok_testcases
[
i
].
expclose
==
ok_testcases
[
i
].
actclose
,
ok
(
ok_testcases
[
i
].
expclose
==
ok_testcases
[
i
].
actclose
,
"testid %d: Open File dialog should %shave closed.
\n
"
,
i
,
"testid %d: Open File dialog should %shave closed.
\n
"
,
i
,
...
@@ -706,7 +704,7 @@ static struct {
...
@@ -706,7 +704,7 @@ static struct {
{
-
1
}
{
-
1
}
};
};
static
LONG
_PTR
WINAPI
template_hook_arrange
(
HWND
dlgChild
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
UINT
_PTR
WINAPI
template_hook_arrange
(
HWND
dlgChild
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
static
int
index
,
fixhelp
;
static
int
index
,
fixhelp
;
static
posz
posz0
[
2
];
static
posz
posz0
[
2
];
...
@@ -846,7 +844,7 @@ static void test_arrange(void)
...
@@ -846,7 +844,7 @@ static void test_arrange(void)
ofn
.
lStructSize
=
OPENFILENAME_SIZE_VERSION_400A
;
ofn
.
lStructSize
=
OPENFILENAME_SIZE_VERSION_400A
;
ofn
.
lpstrFile
=
filename
;
ofn
.
lpstrFile
=
filename
;
ofn
.
nMaxFile
=
1024
;
ofn
.
nMaxFile
=
1024
;
ofn
.
lpfnHook
=
(
LPOFNHOOKPROC
)
template_hook_arrange
;
ofn
.
lpfnHook
=
template_hook_arrange
;
ofn
.
hInstance
=
hDlgTmpl
;
ofn
.
hInstance
=
hDlgTmpl
;
ofn
.
lpstrFilter
=
"text
\0
*.txt
\0
All
\0
*
\0\0
"
;
ofn
.
lpstrFilter
=
"text
\0
*.txt
\0
All
\0
*
\0\0
"
;
for
(
i
=
0
;
arrange_tests
[
i
].
nrcontrols
!=
-
1
;
i
++
)
{
for
(
i
=
0
;
arrange_tests
[
i
].
nrcontrols
!=
-
1
;
i
++
)
{
...
@@ -996,7 +994,7 @@ static void test_mru(void)
...
@@ -996,7 +994,7 @@ static void test_mru(void)
ofn
.
hInstance
=
GetModuleHandle
(
NULL
);
ofn
.
hInstance
=
GetModuleHandle
(
NULL
);
ofn
.
Flags
=
OFN_ENABLEHOOK
|
OFN_EXPLORER
|
OFN_ENABLETEMPLATE
|
OFN_NOCHANGEDIR
;
ofn
.
Flags
=
OFN_ENABLEHOOK
|
OFN_EXPLORER
|
OFN_ENABLETEMPLATE
|
OFN_NOCHANGEDIR
;
ofn
.
lCustData
=
(
LPARAM
)
&
testcase
;
ofn
.
lCustData
=
(
LPARAM
)
&
testcase
;
ofn
.
lpfnHook
=
(
LPOFNHOOKPROC
)
test_ok_wndproc
;
ofn
.
lpfnHook
=
test_ok_wndproc
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
CreateDirectoryA
(
test_dir_name
,
NULL
);
ret
=
CreateDirectoryA
(
test_dir_name
,
NULL
);
...
...
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