Click here to Skip to main content
15,891,943 members
Articles / Desktop Programming / MFC

Using CResizablePage In a CFormView

Rate me:
Please Sign up or sign in to vote.
3.07/5 (18 votes)
16 Apr 2001CPOL 103.1K   2.1K   27  
Technique for utilizing a CResizablePage in a CFormView-derived class
// FlowPage.cpp : implementation file
//

#include "stdafx.h"
#include "formview.h"
#include "FlowPage.h"

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

/////////////////////////////////////////////////////////////////////////////
// CFlowPage property page

IMPLEMENT_DYNCREATE(CFlowPage, CPageBase)

CFlowPage::CFlowPage() : CPageBase(CFlowPage::IDD)
{
	//{{AFX_DATA_INIT(CFlowPage)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}

CFlowPage::~CFlowPage()
{
}

void CFlowPage::DoDataExchange(CDataExchange* pDX)
{
	CPageBase::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFlowPage)
	DDX_Control(pDX, IDC_LIST1, m_ctrlList);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CFlowPage, CPageBase)
	//{{AFX_MSG_MAP(CFlowPage)
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFlowPage message handlers

BOOL CFlowPage::OnInitDialog() 
{
	CPageBase::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_ctrlList.InsertColumn(0, "Application",   LVCFMT_CENTER, 200);
	m_ctrlList.InsertColumn(1, "Started",       LVCFMT_CENTER, 120);
	m_ctrlList.InsertColumn(2, "Msgs",          LVCFMT_CENTER, 60 );
	m_ctrlList.InsertColumn(3, "Last Recieved", LVCFMT_CENTER, 120);


	AddAnchor(IDC_LIST1, TOP_LEFT, BOTTOM_RIGHT);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CFlowPage::OnSize(UINT nType, int cx, int cy) 
{
	CPageBase::OnSize(nType, cx, cy);
	
	
	
}

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
Software Developer (Senior) Paddedwall Software
United States United States
I've been paid as a programmer since 1982 with experience in Pascal, and C++ (both self-taught), and began writing Windows programs in 1991 using Visual C++ and MFC. In the 2nd half of 2007, I started writing C# Windows Forms and ASP.Net applications, and have since done WPF, Silverlight, WCF, web services, and Windows services.

My weakest point is that my moments of clarity are too brief to hold a meaningful conversation that requires more than 30 seconds to complete. Thankfully, grunts of agreement are all that is required to conduct most discussions without committing to any particular belief system.

Comments and Discussions