16,472
社区成员
发帖
与我相关
我的任务
分享
void COracleAssistView::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
CRect rect;
GetClientRect(&rect);
int nWidth = rect.Width();
int nLeight = rect.Height();
if(m_edit.GetSafeHwnd())
{
m_edit.SetWindowPos(this,rect.left + nWidth/100,rect.top +nLeight/100,nWidth-nWidth/100*2,nLeight/100*45,SWP_SHOWWINDOW|SWP_NOZORDER);
}
if(m_btnExec.GetSafeHwnd())
{
m_btnExec.SetWindowPos(this,rect.left + nWidth/100*40,
rect.top + nLeight/100*47,nWidth/15,nLeight/100*5 ,SWP_SHOWWINDOW|SWP_NOZORDER);
}
if(m_ctrList.GetSafeHwnd()) //m_ctrlList是listctrl的变量
{
m_ctrList.SetWindowPos(this,rect.left + nWidth/100,
rect.top + nLeight/100*58,nWidth-nWidth/100*2,nLeight/100*52,SWP_SHOWWINDOW|SWP_NOZORDER);
}
}