comdlg32: Correctly report the filter

André Hentschel nerv at dawncrow.de
Fri Jun 4 11:00:12 CDT 2010


this fixes the regression in  Bug 16356 -  16 bit file dialog file filter not working
---
 dlls/comdlg32/filedlg31.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/comdlg32/filedlg31.c b/dlls/comdlg32/filedlg31.c
index 29c6310..fd2ef36 100644
--- a/dlls/comdlg32/filedlg31.c
+++ b/dlls/comdlg32/filedlg31.c
@@ -629,10 +629,12 @@ static LRESULT FD31_FileTypeChange( const FD31_DATA *lfs )
     lRet = SendDlgItemMessageW(lfs->hwnd, cmb1, CB_GETCURSEL, 0, 0);
     if (lRet == LB_ERR)
         return TRUE;
+    lfs->ofnW->nFilterIndex = lRet + 1;
+    lfs->ofnA->nFilterIndex = lRet + 1;
     pstr = (LPWSTR)SendDlgItemMessageW(lfs->hwnd, cmb1, CB_GETITEMDATA, lRet, 0);
     TRACE("Selected filter : %s\n", debugstr_w(pstr));
 
-    return FD31_Validate( lfs, NULL, cmb1, lRet, TRUE );
+    return FD31_Validate( lfs, pstr, cmb1, lRet, TRUE );
 }
 
 /***********************************************************************
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list