CWnd::OnSize
CWnd::OnSize
在窗口的大小更改后,框架调用该成员函数。
afx_msg void OnSize(
UINT nType,
int cx,
int cy
);
备注
如果
说明 |
---|
此成员函数由框架调用提供您的应用程序处理Windows消息。 |
示例
// Resize the edit control contained in the view to
// fill the entire view when the view's window is
// resized. CMdiView is a CView derived class.
void CMdiView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
// Resize edit to fill the whole view.
// OnSize can be called before OnInitialUpdate
// so make sure the edit control has been created.
if (::IsWindow(m_Edit.GetSafeHwnd()))
{
m_Edit.MoveWindow (0, 0, cx, cy);
}
}