
Customized File Open/Save Dialog problem
Hi,
To add a new control to the standard open/save dialog, you need to derive
your class from CFileDialog. Let's say, the new dialog is CMyFileDialog.
Override OnInitDialog() function of CMyFileDialog and add the following
line to add a static control below the "save as file type" combo box.
BOOL CMyFileDialog::OnInitDialog()
{
CFileDialog::OnInitDialog();
CRect rect;
CWnd* wndDlg=GetParent( );
(wndDlg->GetDlgItem(cmb1))->GetWindowRect(&rect); //cmb1 is defined in
dlgs.h, it's the ID of the "save as file type" box.
ScreenToClient(&rect);
rect.top+=30; //you can adjust this number based on your screen resolution
rect.bottom+=30;
m_mystatic.Create(_T("mystatic"),WS_CHILD|WS_VISIBLE,rect,wndDlg,1);
Quote:
}
Here, m_mystatic is the member variable of CMyFileDialog.
Cheers,
Kelton