Click here to Skip to main content
15,867,995 members
Articles / Desktop Programming / MFC

Layout Manager for Dialogs, Formviews, DialogBars and PropertyPages

Rate me:
Please Sign up or sign in to vote.
4.92/5 (91 votes)
4 Aug 2000 962.5K   11.9K   320  
A framework to provide automatic layout control for dialogs and forms
#if !defined(AFX_MYDIALOG_H__1C80FFA2_E9D4_11D2_A207_4854E82A1622__INCLUDED_)
#define AFX_MYDIALOG_H__1C80FFA2_E9D4_11D2_A207_4854E82A1622__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MyDialog.h : Header-Datei
//

/////////////////////////////////////////////////////////////////////////////
// Dialogfeld CMyDialog 
#include "ETSLayout.h"

class CMyDialog : public ETSLayoutDialog
{
// Konstruktion
public:
	CMyDialog(CWnd* pParent = NULL);   // Standardkonstruktor

	/* DialogMgr: Add this: */
	DECLARE_LAYOUT();
	/************************/
	
// Dialogfelddaten
	//{{AFX_DATA(CMyDialog)
	enum { IDD = IDD_DIALOG1 };
		// HINWEIS: Der Klassen-Assistent f�gt hier Datenelemente ein
	//}}AFX_DATA


// �berschreibungen
	// Vom Klassen-Assistenten generierte virtuelle Funktions�berschreibungen
	//{{AFX_VIRTUAL(CMyDialog)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV-Unterst�tzung
	//}}AFX_VIRTUAL

// Implementierung
protected:

	// Generierte Nachrichtenzuordnungsfunktionen
	//{{AFX_MSG(CMyDialog)
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

// this dialog will be sizable horizontally only!
class CMyDialogHorz : public ETSLayoutDialog
{
// Konstruktion
public:
	CMyDialogHorz(CWnd* pParent = NULL);   // Standardkonstruktor

	/* DialogMgr: Add this: */
	DECLARE_LAYOUT();
	/************************/
	
// Dialogfelddaten
	//{{AFX_DATA(CMyDialogHorz)
	enum { IDD = IDD_DIALOG1 };
		// HINWEIS: Der Klassen-Assistent f�gt hier Datenelemente ein
	//}}AFX_DATA


// �berschreibungen
	// Vom Klassen-Assistenten generierte virtuelle Funktions�berschreibungen
	//{{AFX_VIRTUAL(CMyDialogHorz)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV-Unterst�tzung
	//}}AFX_VIRTUAL

// Implementierung
protected:

	// Generierte Nachrichtenzuordnungsfunktionen
	//{{AFX_MSG(CMyDialogHorz)
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


// this dialog will be sizable vertically only!
class CMyDialogVert : public ETSLayoutDialog
{
// Konstruktion
public:
	CMyDialogVert(CWnd* pParent = NULL);   // Standardkonstruktor

	/* DialogMgr: Add this: */
	DECLARE_LAYOUT();
	/************************/
	
// Dialogfelddaten
	//{{AFX_DATA(CMyDialogVert)
	enum { IDD = IDD_DIALOG1 };
		// HINWEIS: Der Klassen-Assistent f�gt hier Datenelemente ein
	//}}AFX_DATA


// �berschreibungen
	// Vom Klassen-Assistenten generierte virtuelle Funktions�berschreibungen
	//{{AFX_VIRTUAL(CMyDialogVert)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV-Unterst�tzung
	//}}AFX_VIRTUAL

// Implementierung
protected:

	// Generierte Nachrichtenzuordnungsfunktionen
	//{{AFX_MSG(CMyDialogVert)
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ f�gt unmittelbar vor der vorhergehenden Zeile zus�tzliche Deklarationen ein.

#endif // AFX_MYDIALOG_H__1C80FFA2_E9D4_11D2_A207_4854E82A1622__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


Written By
Web Developer
Germany Germany
independant software developer from Germany.
author of Euraconf, an isdn/pabx management software

Programmer since 1991, c/c++/java, started with professional games development, now mainly network, telecommunication and internet stuff

Comments and Discussions