对话框尺寸改变后如何确定控件的大小及位置?
我在OnSize里:
m_List.SetWindowPos(NULL,m_rcOldList.left*(cx-m_rcOldWnd.left)/ (m_rcOldWnd.right-m_rcOldWnd.left),
m_rcOldList.top*(cy-m_rcOldWnd.top)/(m_rcOldWnd.bottom-m_rcOldWnd.top),
m_rcOldList.left+(m_rcOldList.right-m_rcOldList.left)*(cx-m_rcOldWnd.left)/(m_rcOldWnd.right-m_rcOldWnd.left),
m_rcOldList.top+(m_rcOldList.bottom-m_rcOldList.top)*(cy-m_rcOldWnd.top)/(m_rcOldWnd.bottom-m_rcOldWnd.top),
SWP_NOZORDER);
但这样List控件大小变化似乎不是很标准,大家谁知道怎样换算更标准些吗?