CRect rc;
CRect thisRect;
GetWindowRect(&thisRect);
SystemParametersInfo(SPI_GETWORKAREA,0,&rc,0);
m_rcClient.left = ((rc.Width() - thisRect.Width()) >> 1);
m_rcClient.right = m_rcClient.left + thisRect.Width();
m_rcClient.top = ((rc.Height() - thisRect.Height()) >> 1);
m_rcClient.bottom= m_rcClient.top + thisRect.Height();
MoveWindow(&m_rcClient,FALSE);
ShowWindow(SW_SHOW);
对话框居中
最新推荐文章于 2022-02-07 00:09:02 发布