Export (0) Print
Expand All
MFC
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

CWnd::OnSizing

The framework calls this member function to indicate that the user is resizing the rectangle.

afx_msg void OnSizing(
   UINT nSide,
   LPRECT lpRect 
);
nSide

The edge of window to be moved.

lpRect

Address of the CRect or RECT structure that will contain the item's coordinates.

By processing this message, an application can monitor the size and position of the drag rectangle and, if needed, change its size or position.

NoteNote

This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.


void CSplitChildFrm::OnSizing(UINT fwSide, LPRECT pRect)
{
   CMDIChildWnd::OnSizing(fwSide, pRect);

   // Resize the splitter window in the frame. m_wndSplitter is of 
   // type CSplitterWnd
   int nWidth = (pRect->right) - (pRect->left);
   m_wndSplitter.SetColumnInfo(0, nWidth / 2, 10);
   m_wndSplitter.SetColumnInfo(1, nWidth / 2, 10);
   m_wndSplitter.RecalcLayout();
}


Header: afxwin.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.