msi [5/12]: Select the first item in the SelectionTree control
James Hawkins
truiken at gmail.com
Tue Oct 3 17:00:59 CDT 2006
Hi,
Changelog:
* Select the first item in the SelectionTree control.
dlls/msi/dialog.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
--
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index f0c9d7c..7d60791 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -1809,7 +1809,7 @@ msi_seltree_add_child_features( MSIPACKA
{
MSIFEATURE *feature;
TVINSERTSTRUCTW tvis;
- HTREEITEM hitem;
+ HTREEITEM hitem, hfirst = NULL;
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
{
@@ -1833,6 +1833,9 @@ msi_seltree_add_child_features( MSIPACKA
if (!hitem)
continue;
+ if (!hfirst)
+ hfirst = hitem;
+
msi_seltree_sync_item_state( hwnd, feature, hitem );
msi_seltree_add_child_features( package, hwnd,
feature->Feature, hitem );
@@ -1841,6 +1844,9 @@ msi_seltree_add_child_features( MSIPACKA
if ( feature->Display % 2 != 0 )
SendMessageW( hwnd, TVM_EXPAND, TVE_EXPAND, (LPARAM) hitem );
}
+
+ /* select the first item */
+ SendMessageW( hwnd, TVM_SELECTITEM, TVGN_CARET | TVGN_DROPHILITE, (LPARAM) hfirst );
}
static void msi_seltree_create_imagelist( HWND hwnd )
--
1.4.2.1
More information about the wine-patches
mailing list