MFC中界面自适应

void CMyDlg::OnSize(UINT nType, int cx, int cy)
{
CDialogEx::OnSize(nType, cx, cy);

CRect rt;
GetClientRect(&rt);

if (m_Grid.GetSafeHwnd() != NULL)
{
m_Grid.MoveWindow(rt.top,
rt.left,
rt.Width(),
100,
TRUE);
}
}

猜你喜欢

转载自www.cnblogs.com/qiwu1314/p/9885286.html