I want to set the size of view according to the size of the mainframe in a SDI framework. That is to say when I change the size of mainframe, the size of view changes accordingly, so does the client area. How can I do this?
Thank you
I want to set the size of view according to the size of the mainframe in a SDI framework. That is to say when I change the size of mainframe, the size of view changes accordingly, so does the client area. How can I do this?
Thank you
Just add an OnSize method to handle the sizing of the view:
void CMyFrame::OnSize(UINT nType, int cx, int cy)
{
m_MyView.SetWindowPos(NULL, 0, 0, cx, cy, SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER);
}