
Resizing a dialog based app based on its view's size
Hi, I have a dialog based
MFC application
with a CMainFrame class derived from CFrameWnd.
I also have a single view class (CMyView),
which is derived from CFormView. Now I
would like to change the size of the parent frame
(CMainFrame) based on the size of its only view.
I would like to do this after CMyView::OnInitialUpdate()
is run, since I change the size of the view in that
function.
So my two questions are how to calculate the needed size
for
the frame, based on the size of it's view and where in the
code to change the size of the frame.
Thanks, Patric