Resizing a dialog based app based on its view's size 
Author Message
 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



Mon, 17 May 2004 04:25:05 GMT  
 Resizing a dialog based app based on its view's size

        I think you can call the CFrameWnd::RecalcLayout() function to
accomplish this.

Cheers
Check Abdoul
------------------


Quote:
> 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



Mon, 17 May 2004 04:38:10 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Resizing Dialog based app at runtime

2. dialog based app. with multiple views

3. Can I have a Dialog Based Window in an MDI non doc/view app

4. Doc-View vs. Dialog Based apps

5. Dialog based app doesn't get focus when restored

6. Dialog based app doesn't get focus when restored

7. Help please - Dialog-based app won't start - Acc Vio C0000005 - VC 5 - Win200

8. Resize window based on bmp size

9. Simple question on resizing of a CListView-based app

10. Modeless dialog in a dialog-based app

11. dialog within dialog based apps

12. Showing taskbar visible dialog from dialog based app

 

 
Powered by phpBB® Forum Software