- ·上一篇文章:C++的CIN和COUT操作符
- ·下一篇文章:慎用CMFCToolBar::CreateEx
MFC 控件随窗体大小而变化
:2010-02-05 21:33:00
1.添加OnInitialUpdate()
2.添加控件成员变量
void CFS_DataView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
CRect rect;
GetWindowRect( &rect );
if (m_wndlist.GetSafeHwnd())
{
m_wndlist.MoveWindow(CRect(0,22,rect.Width(),rect.Height()-20),TRUE);
}
}
MFC 控件随窗体大小而变化