消息映射
1..h头文件中:
afx_msg void OnSize(UINT nType, int cx, int cy );
2.CPP中申请接收ON_WM_SIZE()消息
3.cpp中实现
::OnSize(UINT nType, int cx, int cy ){
if(NULL!=m_ctrList){
CRect rect;
GetClientRect(&rect);
//int x = rect.Width();
//int y = rect.Height();
rect.top+=10;
rect.bottom-=10;
rect.left+=130;
rect.right-=20;
m_ctrList.MoveWindow(&rect);
}
}