|
-
April 4th, 1999, 04:38 PM
#1
Urgent
Thank You in advance for sparing your time. I have a Single document view.View is derived from CFormView. Now I need to resize the frame to exactly to the size of my view.
Looking for help.
Thank you
Gajjela
-
April 4th, 1999, 05:32 PM
#2
Re: Urgent
I am not quite sure whether my method will work for your app.
I guess it will... But I have used in my dialog window and worked.
If you could get your formview size, use "CalcWindowRect()" function
which will return the size of window that is just big enough
to hold a given client rectanle size. Then use "SetWindowPos()"
function to resize your frame window.
Good luck. 
Walter An
-
April 6th, 1999, 04:33 AM
#3
Re: Urgent
Gajjela,
usually the view is sized to the frame...
Dave
-
January 31st, 2002, 12:48 AM
#4
Re: Urgent
In your frame windows' OnSize :
void C....Wnd::OnSize(UINT nFlags, int cx, int cy)
{
// assumes view is m_pView
CFrameWnd::OnSize(nFlags, cx, cy);
CRect rectClient;
GetClientRect(&rectClient);
m_pView->MoveWindow(rectClient);
}
Darwen.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|