Click here to Skip to main content
12,954,001 members (52,379 online)
Click here to Skip to main content


315 bookmarked
Posted 3 Dec 1999

Layout Manager for Dialogs, Formviews, DialogBars and PropertyPages

, 4 Aug 2000
A framework to provide automatic layout control for dialogs and forms
// CtrlDialog.cpp: Implementierungsdatei

#include "stdafx.h"
#include "LayoutManager.h"
#include "CtrlDialog.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;

// Dialogfeld CCtrlDialog 

CCtrlDialog::CCtrlDialog(CWnd* pParent /*=NULL*/)
	: ETSLayoutDialog(CCtrlDialog::IDD, pParent)
		// HINWEIS: Der Klassen-Assistent f�gt hier Elementinitialisierung ein

void CCtrlDialog::DoDataExchange(CDataExchange* pDX)
		// HINWEIS: Der Klassen-Assistent f�gt hier DDX- und DDV-Aufrufe ein

BEGIN_MESSAGE_MAP(CCtrlDialog, ETSLayoutDialog)

// Behandlungsroutinen f�r Nachrichten CCtrlDialog 

BOOL CCtrlDialog::OnInitDialog() 
	/* DialogMgr: Add this: */

	CPane checkPane = pane( VERTICAL )
		<< item( IDC_CHECK1, NORESIZE)
		<< itemGrowing(VERTICAL)
		<< item( IDC_CHECK2, NORESIZE)
		<< itemGrowing(VERTICAL)
		<< item( IDC_CHECK3, NORESIZE);

	// note the usage of sizeExtraBorder and sizeTopExtra
	CPane groupPane = paneCtrl( IDC_GROUP1, HORIZONTAL, GREEDY, nDefaultBorder, 10, 10 )
		<< checkPane
		<< item( IDC_LIST1, GREEDY );

	CPane bottomPane = pane ( HORIZONTAL, ABSOLUTE_VERT )
		<< itemGrowing (HORIZONTAL)
		<< item( IDOK, NORESIZE )
		<< item( IDCANCEL, NORESIZE );

		<< groupPane
		<< bottomPane;

	UpdateLayout ();
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zur�ckgeben

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.


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

Erwin Tratar
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

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170525.1 | Last Updated 5 Aug 2000
Article Copyright 1999 by Erwin Tratar
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid