当前位置:K88软件开发文章中心编程语言C/C++C/C++01 → 文章内容

MFC 控件随窗体大小而变化

减小字体 增大字体 作者:佚名  来源:翔宇亭IT乐园  发布时间:2019-1-3 0:07:10

: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 控件随窗体大小而变化