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
faa956f5
Commit
faa956f5
authored
Oct 21, 2008
by
Aric Stewart
Committed by
Alexandre Julliard
Oct 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32/tests: Add a test for GetOpenFileName with a dialog template.
parent
37bbe9d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
0 deletions
+66
-0
Makefile.in
dlls/comdlg32/tests/Makefile.in
+2
-0
filedlg.c
dlls/comdlg32/tests/filedlg.c
+30
-0
rsrc.rc
dlls/comdlg32/tests/rsrc.rc
+34
-0
No files found.
dlls/comdlg32/tests/Makefile.in
View file @
faa956f5
...
...
@@ -9,6 +9,8 @@ CTESTS = \
filedlg.c
\
printdlg.c
RC_SRCS
=
rsrc.rc
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/comdlg32/tests/filedlg.c
View file @
faa956f5
...
...
@@ -205,6 +205,16 @@ cleanup:
return
0
;
}
static
LONG_PTR
WINAPI
template_hook
(
HWND
dlg
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
msg
==
WM_NOTIFY
)
{
if
(((
LPNMHDR
)
lParam
)
->
code
==
CDN_FOLDERCHANGE
)
PostMessage
(
GetParent
(
dlg
),
WM_COMMAND
,
IDCANCEL
,
0
);
}
return
0
;
}
static
void
test_create_view_window2
(
void
)
{
OPENFILENAMEA
ofn
=
{
0
};
...
...
@@ -222,8 +232,28 @@ static void test_create_view_window2(void)
ok
(
!
ret
,
"CommDlgExtendedError returned %#x
\n
"
,
ret
);
}
static
void
test_create_view_template
(
void
)
{
OPENFILENAMEA
ofn
=
{
0
};
char
filename
[
1024
]
=
{
0
};
DWORD
ret
;
ofn
.
lStructSize
=
sizeof
(
ofn
);
ofn
.
lpstrFile
=
filename
;
ofn
.
nMaxFile
=
1042
;
ofn
.
lpfnHook
=
(
LPOFNHOOKPROC
)
template_hook
;
ofn
.
Flags
=
OFN_ENABLEHOOK
|
OFN_EXPLORER
|
OFN_ENABLETEMPLATE
;
ofn
.
hInstance
=
GetModuleHandleW
(
NULL
);
ofn
.
lpTemplateName
=
"template1"
;
ret
=
GetOpenFileNameA
(
&
ofn
);
ok
(
!
ret
,
"GetOpenFileNameA returned %#x
\n
"
,
ret
);
ret
=
CommDlgExtendedError
();
ok
(
!
ret
,
"CommDlgExtendedError returned %#x
\n
"
,
ret
);
}
START_TEST
(
filedlg
)
{
test_DialogCancel
();
test_create_view_window2
();
test_create_view_template
();
}
dlls/comdlg32/tests/rsrc.rc
0 → 100644
View file @
faa956f5
/* Resources for the common dialog unit test suite.
*
* Copyright 2008 CodeWeavers, Aric Stewart
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "windef.h"
#include "winuser.h"
TEMPLATE1 DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 227, 215
STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
{
LTEXT "Path:",-1,28,4,36,8
LTEXT "Text1",-1,4,16,20,40
LTEXT "Selected:",-1,32,49,40,8
EDITTEXT 55,74,47,200,12,ES_AUTOHSCROLL
LTEXT "Text2",-1,232,20,65,8
LTEXT "",-1,28,16,204,31
EDITTEXT 56,65,2,200,12,ES_AUTOHSCROLL
}
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