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
aac6255d
Commit
aac6255d
authored
Aug 24, 2014
by
David Hedberg
Committed by
Alexandre Julliard
Aug 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Implement IFileDialogCustomize::StartVisualGroup() and ::EndVisualGroup().
parent
4c81231e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
131 additions
and
9 deletions
+131
-9
itemdlg.c
dlls/comdlg32/itemdlg.c
+0
-0
itemdlg.c
dlls/comdlg32/tests/itemdlg.c
+131
-9
No files found.
dlls/comdlg32/itemdlg.c
View file @
aac6255d
This diff is collapsed.
Click to expand it.
dlls/comdlg32/tests/itemdlg.c
View file @
aac6255d
...
...
@@ -1363,7 +1363,7 @@ static void test_customize_onfolderchange(IFileDialog *pfd)
item
=
find_window
(
dlg_hwnd
,
NULL
,
visualgroup1W
);
ok
(
item
==
NULL
,
"Found item: %p
\n
"
,
item
);
item
=
find_window
(
dlg_hwnd
,
NULL
,
visualgroup2W
);
ok
(
item
==
NULL
,
"Found item: %p
\n
"
,
item
);
todo_wine
ok
(
item
==
NULL
,
"Found item: %p
\n
"
,
item
);
br
=
PostMessageW
(
dlg_hwnd
,
WM_COMMAND
,
IDCANCEL
,
0
);
ok
(
br
,
"Failed
\n
"
);
...
...
@@ -1380,6 +1380,7 @@ static void test_customize(void)
DWORD
cookie
;
LPWSTR
tmpstr
;
UINT
i
;
UINT
id_vgroup1
,
id_text
,
id_editbox1
;
LONG
ref
;
HWND
dlg_hwnd
;
HRESULT
hr
;
...
...
@@ -1632,25 +1633,25 @@ static void test_customize(void)
ok
(
hr
==
S_OK
,
"got 0x%08x (control: %d).
\n
"
,
hr
,
i
);
hr
=
IFileDialogCustomize_StartVisualGroup
(
pfdc
,
i
,
label
);
todo_wine
ok
(
hr
==
E_UNEXPECTED
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
hr
==
E_UNEXPECTED
,
"got 0x%08x.
\n
"
,
hr
);
hr
=
IFileDialogCustomize_StartVisualGroup
(
pfdc
,
++
i
,
visualgroup1W
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
hr
=
IFileDialogCustomize_AddControlItem
(
pfdc
,
i
,
0
,
label
);
todo_wine
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x.
\n
"
,
hr
);
hr
=
IFileDialogCustomize_SetControlLabel
(
pfdc
,
i
,
visualgroup2W
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x (control: %d).
\n
"
,
hr
,
i
);
ok
(
hr
==
S_OK
,
"got 0x%08x (control: %d).
\n
"
,
hr
,
i
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
i
,
&
cdstate
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
todo_wine
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
hr
=
IFileDialogCustomize_StartVisualGroup
(
pfdc
,
++
i
,
label
);
todo_wine
ok
(
hr
==
E_UNEXPECTED
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
hr
==
E_UNEXPECTED
,
"got 0x%08x.
\n
"
,
hr
);
hr
=
IFileDialogCustomize_EndVisualGroup
(
pfdc
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
i
++
;
/* Nonexisting control */
hr
=
IFileDialogCustomize_AddControlItem
(
pfdc
,
i
,
0
,
label
);
...
...
@@ -1896,6 +1897,127 @@ static void test_customize(void)
IFileDialogCustomize_Release
(
pfdc
);
ref
=
IFileDialog_Release
(
pfod
);
ok
(
!
ref
,
"Refcount not zero (%d).
\n
"
,
ref
);
/* Some more tests for VisualGroup behavior */
hr
=
CoCreateInstance
(
&
CLSID_FileOpenDialog
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFileDialog
,
(
void
**
)
&
pfod
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
hr
=
IFileDialog_QueryInterface
(
pfod
,
&
IID_IFileDialogCustomize
,
(
void
**
)
&
pfdc
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
i
=
-
1
;
id_vgroup1
=
++
i
;
hr
=
IFileDialogCustomize_StartVisualGroup
(
pfdc
,
id_vgroup1
,
visualgroup1W
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_vgroup1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
id_text
=
++
i
;
hr
=
IFileDialogCustomize_AddText
(
pfdc
,
id_text
,
label
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_text
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
id_editbox1
=
++
i
;
hr
=
IFileDialogCustomize_AddEditBox
(
pfdc
,
id_editbox1
,
editbox1W
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_editbox1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
/* Set all Visible but not Enabled */
hr
=
IFileDialogCustomize_SetControlState
(
pfdc
,
id_vgroup1
,
CDCS_VISIBLE
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_vgroup1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_VISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_text
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_editbox1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
/* Set text to Visible but not Enabled */
hr
=
IFileDialogCustomize_SetControlState
(
pfdc
,
id_text
,
CDCS_VISIBLE
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_vgroup1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_VISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_text
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_VISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_editbox1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
/* Set vgroup to inactive */
hr
=
IFileDialogCustomize_SetControlState
(
pfdc
,
id_vgroup1
,
CDCS_INACTIVE
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_vgroup1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_INACTIVE
,
"got 0x%08x.
\n
"
,
cdstate
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_text
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_VISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_editbox1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
/* Set vgroup to Enabled and Visible again */
hr
=
IFileDialogCustomize_SetControlState
(
pfdc
,
id_vgroup1
,
CDCS_ENABLEDVISIBLE
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_vgroup1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_text
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_VISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
cdstate
=
0xdeadbeef
;
hr
=
IFileDialogCustomize_GetControlState
(
pfdc
,
id_editbox1
,
&
cdstate
);
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
ok
(
cdstate
==
CDCS_ENABLEDVISIBLE
,
"got 0x%08x.
\n
"
,
cdstate
);
hr
=
IFileDialogCustomize_MakeProminent
(
pfdc
,
id_vgroup1
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x.
\n
"
,
hr
);
IFileDialogCustomize_Release
(
pfdc
);
ref
=
IFileDialog_Release
(
pfod
);
ok
(
!
ref
,
"Refcount not zero (%d).
\n
"
,
ref
);
}
static
void
test_persistent_state
(
void
)
...
...
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