comdlg32: Fix a problem with resizing a customized file dialog.

This commit is contained in:
Rein Klazes 2009-07-09 09:36:04 +02:00 committed by Alexandre Julliard
parent 6c0c08af02
commit a73175fd11

View File

@ -1117,9 +1117,6 @@ static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
if(fodInfos->DlgInfos.hwndCustomDlg && if(fodInfos->DlgInfos.hwndCustomDlg &&
(fodInfos->ofnInfos->Flags & (OFN_ENABLETEMPLATE | OFN_ENABLETEMPLATEHANDLE))) (fodInfos->ofnInfos->Flags & (OFN_ENABLETEMPLATE | OFN_ENABLETEMPLATEHANDLE)))
{ {
GetClientRect(hwnd, &rc);
DeferWindowPos( hdwp,fodInfos->DlgInfos.hwndCustomDlg, NULL,
0, 0, rc.right, rc.bottom, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
for( ctrl = GetWindow( fodInfos->DlgInfos.hwndCustomDlg, GW_CHILD); for( ctrl = GetWindow( fodInfos->DlgInfos.hwndCustomDlg, GW_CHILD);
ctrl ; ctrl = GetWindow( ctrl, GW_HWNDNEXT)) ctrl ; ctrl = GetWindow( ctrl, GW_HWNDNEXT))
{ {
@ -1142,6 +1139,11 @@ static LRESULT FILEDLG95_OnWMSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER); SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
} }
} }
/* size the custom dialog at the end: some applications do some
* control re-arranging at this point */
GetClientRect(hwnd, &rc);
DeferWindowPos( hdwp,fodInfos->DlgInfos.hwndCustomDlg, NULL,
0, 0, rc.right, rc.bottom, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
} }
EndDeferWindowPos( hdwp); EndDeferWindowPos( hdwp);
/* should not be needed */ /* should not be needed */