James Hawkins : msi: Store the selected item in the SelectionTree control.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Oct 4 04:25:29 CDT 2006


Module: wine
Branch: master
Commit: 908e27d6fcb8cb874912d610b6e5f9c311e721e8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=908e27d6fcb8cb874912d610b6e5f9c311e721e8

Author: James Hawkins <truiken at gmail.com>
Date:   Tue Oct  3 15:03:32 2006 -0700

msi: Store the selected item in the SelectionTree control.

---

 dlls/msi/dialog.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 98d42ae..ff9e146 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -1664,6 +1664,7 @@ struct msi_selection_tree_info
     msi_dialog *dialog;
     HWND hwnd;
     WNDPROC oldproc;
+    HTREEITEM selected;
 };
 
 static void
@@ -1809,6 +1810,7 @@ static void
 msi_seltree_add_child_features( MSIPACKAGE *package, HWND hwnd,
                                 LPCWSTR parent, HTREEITEM hParent )
 {
+    struct msi_selection_tree_info *info = GetPropW( hwnd, szButtonData );
     MSIFEATURE *feature;
     TVINSERTSTRUCTW tvis;
     HTREEITEM hitem, hfirst = NULL;
@@ -1849,6 +1851,7 @@ msi_seltree_add_child_features( MSIPACKA
 
     /* select the first item */
     SendMessageW( hwnd, TVM_SELECTITEM, TVGN_CARET | TVGN_DROPHILITE, (LPARAM) hfirst );
+    info->selected = hfirst;
 }
 
 static void msi_seltree_create_imagelist( HWND hwnd )
@@ -1891,6 +1894,7 @@ static void msi_seltree_create_imagelist
 static UINT msi_dialog_seltree_handler( msi_dialog *dialog,
                                         msi_control *control, WPARAM param )
 {
+    struct msi_selection_tree_info *info = GetPropW( control->hwnd, szButtonData );
     LPNMTREEVIEWW tv = (LPNMTREEVIEWW)param;
     MSIRECORD *row, *rec;
     MSIFOLDER *folder;
@@ -1906,6 +1910,8 @@ static UINT msi_dialog_seltree_handler( 
     if (tv->hdr.code != TVN_SELCHANGINGW)
         return ERROR_SUCCESS;
 
+    info->selected = tv->itemNew.hItem;
+
     row = MSI_QueryGetRecord( dialog->package->db, select, tv->itemNew.pszText );
     if (!row)
         return ERROR_FUNCTION_FAILED;




More information about the wine-cvs mailing list