Click here to Skip to main content
15,885,032 members
Articles / Desktop Programming / MFC

Automatic Resizing of a FormView Based Application When the User Toggles the Control Bars On or Off

Rate me:
Please Sign up or sign in to vote.
4.00/5 (12 votes)
26 Feb 2004CPOL2 min read 127.5K   2.2K   36  
Explains how to implement an application which automatically resizes itself when the user toggles the control bars on or off.
// FrameResize.h : main header file for the FRAMERESIZE application
//

#if !defined(AFX_FRAMERESIZE_H__A5C6B80B_593B_4805_B3B6_4DD298E10486__INCLUDED_)
#define AFX_FRAMERESIZE_H__A5C6B80B_593B_4805_B3B6_4DD298E10486__INCLUDED_

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

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CFrameResizeApp:
// See FrameResize.cpp for the implementation of this class
//

class CFrameResizeApp : public CWinApp
{
public:
	CFrameResizeApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFrameResizeApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation
	//{{AFX_MSG(CFrameResizeApp)
	afx_msg void OnAppAbout();
		// 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_FRAMERESIZE_H__A5C6B80B_593B_4805_B3B6_4DD298E10486__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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
I'm a software developer from Sweden who got tired of snow and cold weather and moved to USA. I choose New York City, so I wouldn't totally miss out on snow and cold weather. I work on Wall Street with financial systems (not much else to do in this neighborhood). I primarily use Visual C++/MFC or C#/.NET as development tool.

The picture is of my wife and me in Cannes, France, drinking the most expensive Coke we ever had.

Comments and Discussions