Click here to Skip to main content
15,896,338 members
Articles / Programming Languages / C++

EasySize - Dialog Resizing in No Time!

Rate me:
Please Sign up or sign in to vote.
4.95/5 (213 votes)
23 Mar 20074 min read 1.1M   27.9K   290  
An easy way to position controls in resizable dialogs or property pages using just a few macros
In this article, you will learn to design your dialog the way you want it to look in the resource editor, and then define how the controls will behave when the dialog is resized using one single macro for each control.
// EasySizeDemo.h : main header file for the EASYSIZEDEMO application
//

#if !defined(AFX_EASYSIZEDEMO_H__D3C265E9_B9D5_4E5C_8413_4FCB666C1776__INCLUDED_)
#define AFX_EASYSIZEDEMO_H__D3C265E9_B9D5_4E5C_8413_4FCB666C1776__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

/////////////////////////////////////////////////////////////////////////////
// CEasySizeDemoApp:
// See EasySizeDemo.cpp for the implementation of this class
//

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

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

// Implementation

	//{{AFX_MSG(CEasySizeDemoApp)
		// 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_EASYSIZEDEMO_H__D3C265E9_B9D5_4E5C_8413_4FCB666C1776__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.


Written By
Engineer Nokia
Denmark Denmark
My programming experience started a long time ago in
QBasic (on a 25MHz 486).
I'm now mainly using Java, C++, C, MFC, Perl and PHP, but have used quite a number of other languages as well for various projects.

Comments and Discussions