sp; lst1}; // The Explorer window
// Go through each of the controls in the dialog box, and move them to a new position
for (int i=0 ; i<nControls ; i++)
{
CWnd *wndCtrl = wndDlg->GetDlgItem(Controls[i]);
wndCtrl->GetWindowRect(&Rect);
wndDlg->ScreenToClient(&Rect); // Remember it is child controls
// Move all the controls according to the new size of the dialog.
if (Controls[i] != lst1)
wndCtrl->SetWindowPos(NULL,
Rect.left, Rect.top + iExtraSize,
0, 0, SWP_NOSIZE);
else // This is the explorer like window. It should be sized - not moved.
wndCtrl->SetWindowPos(NULL, 0, 0,
Rect.right - Rect.left,
Rect.bottom - Rect.top + iExtraSize,
SWP_NOMOVE);
}
// Remember to call the baseclass.
return CFileDialog::OnInitDialog();
}