Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Resize MDI Child Frame Windows to Fit Form Views

, 16 Apr 2001
Make the MDI windows which contain your program's forms snap to match the forms' sizes.
resizeformtofit_src.zip
ResizeFormToFit
ResizeFormToFit.clw
ResizeFormToFit.dsw
res
MyDoc.ico
ResizeFormToFit.ico
ResizeFormToFit.dsp
ResizeFormToFit.ncb
ResizeFormToFit.aps
ResizeFormToFit.opt
Release
ResizeFormToFit.exe
ResizeFormToFit.plg
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINFRM_H__F20627FE_FA7E_11D4_9517_00A0CC2392D0__INCLUDED_)
#define AFX_MAINFRM_H__F20627FE_FA7E_11D4_9517_00A0CC2392D0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CMainFrame : public CMDIFrameWnd
{
	DECLARE_DYNAMIC(CMainFrame)
public:
	CMainFrame();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

// Generated message map functions
protected:
	//{{AFX_MSG(CMainFrame)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MAINFRM_H__F20627FE_FA7E_11D4_9517_00A0CC2392D0__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Brian C Hart
Software Developer (Senior) Corrugated Technologies, Inc.
United States United States
From Fridley, Minnesota and I like computer programming! When I got started, I was working mostly with Windows GUI programming in C/C++. Then later on I worked with COM/DCOM for a school internship. I used COM/DCOM to write an ad hoc cluster server and job-running environment for a cluster of 24 Windows-based high-end visualization workstations. I moved on to C# and have been working in C# and Windows Forms ever since. I have yet to embrace Silverlight Smile | :)
Follow on   Twitter

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 17 Apr 2001
Article Copyright 2001 by Brian C Hart
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid