您的位置:首页 > 其它

MFC 控件随窗体大小变化而变化

2009-07-01 12:20 309 查看
1.添加OnInitialUpdate()

2.添加控件成员变量

3.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);

}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: