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
fa292e4b
Commit
fa292e4b
authored
Oct 30, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a read-only implementation of the SelectionTree control.
parent
7f26cffd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
dialog.c
dlls/msi/dialog.c
+60
-0
No files found.
dlls/msi/dialog.c
View file @
fa292e4b
...
...
@@ -123,6 +123,8 @@ static const WCHAR szProgressBar[] = {
static
const
WCHAR
szRadioButtonGroup
[]
=
{
'R'
,
'a'
,
'd'
,
'i'
,
'o'
,
'B'
,
'u'
,
't'
,
't'
,
'o'
,
'n'
,
'G'
,
'r'
,
'o'
,
'u'
,
'p'
,
0
};
static
const
WCHAR
szIcon
[]
=
{
'I'
,
'c'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szSelectionTree
[]
=
{
'S'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'T'
,
'r'
,
'e'
,
'e'
,
0
};
static
UINT
msi_dialog_checkbox_handler
(
msi_dialog
*
,
msi_control
*
,
WPARAM
);
static
void
msi_dialog_checkbox_sync_state
(
msi_dialog
*
,
msi_control
*
);
...
...
@@ -1318,6 +1320,63 @@ static UINT msi_dialog_radiogroup_control( msi_dialog *dialog, MSIRECORD *rec )
return
r
;
}
/******************** Selection Tree ***************************************/
static
void
msi_dialog_tv_add_child_features
(
MSIPACKAGE
*
package
,
HWND
hwnd
,
LPCWSTR
parent
,
HTREEITEM
hParent
)
{
MSIFEATURE
*
feature
;
TVINSERTSTRUCTW
tvis
;
HTREEITEM
hitem
;
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
if
(
lstrcmpW
(
parent
,
feature
->
Feature_Parent
)
)
continue
;
if
(
!
feature
->
Title
)
continue
;
memset
(
&
tvis
,
0
,
sizeof
tvis
);
tvis
.
hParent
=
hParent
;
tvis
.
hInsertAfter
=
TVI_SORT
;
if
(
feature
->
Title
)
{
tvis
.
item
.
mask
=
TVIF_TEXT
;
tvis
.
item
.
pszText
=
feature
->
Title
;
}
tvis
.
item
.
lParam
=
(
LPARAM
)
feature
;
hitem
=
(
HTREEITEM
)
SendMessageW
(
hwnd
,
TVM_INSERTITEMW
,
0
,
(
LPARAM
)
&
tvis
);
if
(
!
hitem
)
continue
;
msi_dialog_tv_add_child_features
(
package
,
hwnd
,
feature
->
Feature
,
hitem
);
}
}
static
UINT
msi_dialog_selection_tree
(
msi_dialog
*
dialog
,
MSIRECORD
*
rec
)
{
msi_control
*
control
;
LPCWSTR
prop
;
LPWSTR
val
;
MSIPACKAGE
*
package
=
dialog
->
package
;
prop
=
MSI_RecordGetString
(
rec
,
9
);
val
=
msi_dup_property
(
package
,
prop
);
control
=
msi_dialog_add_control
(
dialog
,
rec
,
WC_TREEVIEWW
,
TVS_HASBUTTONS
|
WS_GROUP
|
WS_VSCROLL
);
if
(
!
control
)
return
ERROR_FUNCTION_FAILED
;
msi_dialog_tv_add_child_features
(
package
,
control
->
hwnd
,
NULL
,
NULL
);
msi_free
(
val
);
return
ERROR_SUCCESS
;
}
struct
control_handler
msi_dialog_handler
[]
=
{
{
szText
,
msi_dialog_text_control
},
...
...
@@ -1333,6 +1392,7 @@ struct control_handler msi_dialog_handler[] =
{
szProgressBar
,
msi_dialog_progress_bar
},
{
szRadioButtonGroup
,
msi_dialog_radiogroup_control
},
{
szIcon
,
msi_dialog_icon_control
},
{
szSelectionTree
,
msi_dialog_selection_tree
},
};
#define NUM_CONTROL_TYPES (sizeof msi_dialog_handler/sizeof msi_dialog_handler[0])
...
...
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