[REGEDIT]
authorGregor Schneider <grschneider@gmail.com>
Thu, 22 Apr 2010 12:49:20 +0000 (12:49 +0000)
committerGregor Schneider <grschneider@gmail.com>
Thu, 22 Apr 2010 12:49:20 +0000 (12:49 +0000)
- Don't assign an uninitialized custom filter buffer to the OPENFILENAME structure, clean up commented out code
- Allows standard file type filters to show up
See issue #5307 for more details.

svn path=/trunk/; revision=46992

reactos/base/applications/regedit/framewnd.c

index 9f42346..a6b4144 100644 (file)
@@ -228,8 +228,6 @@ static BOOL CheckCommDlgError(HWND hWnd)
     return TRUE;
 }
 
-#define MAX_CUSTOM_FILTER_SIZE 50
-TCHAR CustomFilterBuffer[MAX_CUSTOM_FILTER_SIZE];
 TCHAR FileNameBuffer[_MAX_PATH];
 TCHAR FileTitleBuffer[_MAX_PATH];
 
@@ -275,25 +273,11 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME* pofn)
     BuildFilterStrings(Filter, FilterPairs, sizeof(FilterPairs) / sizeof(FILTERPAIR));
 
     pofn->lpstrFilter = Filter;
-    pofn->lpstrCustomFilter = CustomFilterBuffer;
-    pofn->nMaxCustFilter = MAX_CUSTOM_FILTER_SIZE;
-    pofn->nFilterIndex = 0;
     pofn->lpstrFile = FileNameBuffer;
     pofn->nMaxFile = _MAX_PATH;
     pofn->lpstrFileTitle = FileTitleBuffer;
     pofn->nMaxFileTitle = _MAX_PATH;
-    /*    pofn->lpstrInitialDir = _T("");*/
-    /*    pofn->lpstrTitle = _T("Import Registry File");*/
-    /*    pofn->Flags = OFN_ENABLETEMPLATE + OFN_EXPLORER + OFN_ENABLESIZING;*/
     pofn->Flags = OFN_HIDEREADONLY;
-    /*    pofn->nFileOffset = ;*/
-    /*    pofn->nFileExtension = ;*/
-    /*    pofn->lpstrDefExt = _T("");*/
-    /*    pofn->lCustData = ;*/
-    /*    pofn->lpfnHook = ImportRegistryFile_OFNHookProc;*/
-    /*    pofn->lpTemplateName = _T("ID_DLG_IMPORT_REGFILE");*/
-    /*    pofn->lpTemplateName = MAKEINTRESOURCE(IDD_DIALOG1);*/
-    /*    pofn->FlagsEx = ;*/
     return TRUE;
 }