Commit 45a352a7 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

comdlg32: Some applications expect the filter combo to be filled before the CustomDlg is created.

parent faa956f5
...@@ -1388,6 +1388,10 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd) ...@@ -1388,6 +1388,10 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
LoadStringW(COMDLG32_hInstance, IDS_SAVE_IN, buf, sizeof(buf)/sizeof(WCHAR)); LoadStringW(COMDLG32_hInstance, IDS_SAVE_IN, buf, sizeof(buf)/sizeof(WCHAR));
SetDlgItemTextW(hwnd, IDC_LOOKINSTATIC, buf); SetDlgItemTextW(hwnd, IDC_LOOKINSTATIC, buf);
} }
/* Initialize the filter combo box */
FILEDLG95_FILETYPE_Init(hwnd);
return 0; return 0;
} }
...@@ -1476,9 +1480,6 @@ static LRESULT FILEDLG95_FillControls(HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -1476,9 +1480,6 @@ static LRESULT FILEDLG95_FillControls(HWND hwnd, WPARAM wParam, LPARAM lParam)
/* Initialize the Look In combo box */ /* Initialize the Look In combo box */
FILEDLG95_LOOKIN_Init(fodInfos->DlgInfos.hwndLookInCB); FILEDLG95_LOOKIN_Init(fodInfos->DlgInfos.hwndLookInCB);
/* Initialize the filter combo box */
FILEDLG95_FILETYPE_Init(hwnd);
/* Browse to the initial directory */ /* Browse to the initial directory */
IShellBrowser_BrowseObject(fodInfos->Shell.FOIShellBrowser,pidlItemId, SBSP_ABSOLUTE); IShellBrowser_BrowseObject(fodInfos->Shell.FOIShellBrowser,pidlItemId, SBSP_ABSOLUTE);
......
...@@ -207,6 +207,17 @@ cleanup: ...@@ -207,6 +207,17 @@ cleanup:
static LONG_PTR WINAPI template_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) static LONG_PTR WINAPI template_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
if (msg == WM_INITDIALOG)
{
HWND p,cb;
INT sel;
p = GetParent(dlg);
ok(p!=(HWND)NULL, "Failed to get parent of template\n");
cb = GetDlgItem(p,0x470);
ok(cb!=(HWND)NULL, "Failed to get filter combobox\n");
sel = SendMessage(cb, CB_GETCURSEL, 0, 0);
ok (sel != -1, "Failed to get selection from filter listbox\n");
}
if (msg == WM_NOTIFY) if (msg == WM_NOTIFY)
{ {
if (((LPNMHDR)lParam)->code == CDN_FOLDERCHANGE) if (((LPNMHDR)lParam)->code == CDN_FOLDERCHANGE)
...@@ -245,6 +256,7 @@ static void test_create_view_template(void) ...@@ -245,6 +256,7 @@ static void test_create_view_template(void)
ofn.Flags = OFN_ENABLEHOOK | OFN_EXPLORER| OFN_ENABLETEMPLATE; ofn.Flags = OFN_ENABLEHOOK | OFN_EXPLORER| OFN_ENABLETEMPLATE;
ofn.hInstance = GetModuleHandleW(NULL); ofn.hInstance = GetModuleHandleW(NULL);
ofn.lpTemplateName = "template1"; ofn.lpTemplateName = "template1";
ofn.lpstrFilter="text\0*.txt\0All\0*\0\0";
ret = GetOpenFileNameA(&ofn); ret = GetOpenFileNameA(&ofn);
ok(!ret, "GetOpenFileNameA returned %#x\n", ret); ok(!ret, "GetOpenFileNameA returned %#x\n", ret);
ret = CommDlgExtendedError(); ret = CommDlgExtendedError();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment