MFC OFileDialog и
и п
150
classwizard CFileDialog CCoolFileDialog CoolFileDialog.cpp
д WM_INITDIALOG OnInitDialog
indnde.CPP CoolFileDialog dlgs.h
BOOL CoolFileDialog::OnInitDialog()
//iExtraSize
const UINT iExtraSize=150;
// е
const UINT nControls=8;
//
CWnd wndDlg=GetParent();
//
RECT Rect;
wndDlg GetWindowRect( Rect);
//
wndDlg GetWindowRect( Rect);
//
wndDlg SetWindowPos(NULL,0,0,
Rect.right Rect.left,
Rect.bottom Rect.top iExtraSize,
SWP_NOMOVE);
// ID dlgs.h ж
UINT Controls[nControls]={stc3,stc2,// label
edt1,cmb1,//edit
//drop down box
IDOK IDCANCEL
chx1,//check
lst1//list
}
// и λ
for (int i=0;i nControls ; i )
{
CWnd wndCtrl =wndDlg GetDlgItem(Controls[i]);
wndCtrl GetWindowRect( Rect);
wndDlg ScreenToClient( Rect);
//
if (Controls[i]!=lst1)
wndCtrl SetWindowPos(NULL,
Rect.left,Rect.top iExtraSize,
0,0,SWP_NOSIZE);
else// б 磬 λ
wndCtrl SetWindowPos(NULL,0,0,
Rect.right Rect.left,
Rect.bottom Rect.top iExtraSize,
SWP_NOMOVE);
//