Click here to Skip to main content
15,896,063 members
Articles / Desktop Programming / MFC

A Visual Framework (Views, Tabs and Splitters)

Rate me:
Please Sign up or sign in to vote.
4.96/5 (71 votes)
6 Dec 2002 785.9K   17.9K   301  
Creating SDI/MDI applications with splitter and tab windows
// DummyForm.cpp : implementation file
//

#include "stdafx.h"
#include "tabwnd.h"
#include "DummyForm.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDummyForm

IMPLEMENT_DYNCREATE(CDummyForm, TVisualFormView)

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

CDummyForm::~CDummyForm()
{
}

void CDummyForm::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDummyForm)
	DDX_Control(pDX, IDC_EDIT, m_Edit);
	DDX_Control(pDX, IDC_COMBO, m_Combo);
	DDX_Control(pDX, IDC_LIST, m_List);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDummyForm, CFormView)
	//{{AFX_MSG_MAP(CDummyForm)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDummyForm diagnostics

#ifdef _DEBUG
void CDummyForm::AssertValid() const
{
	CFormView::AssertValid();
}

void CDummyForm::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CDummyForm message handlers

void CDummyForm::OnInitialUpdate() 
{
	CFormView::OnInitialUpdate();
	
	// TODO: Add your specialized code here and/or call the base class
  m_List.AddString(_T("Item A"));
  m_List.AddString(_T("Item B"));
  m_List.AddString(_T("Item C"));
  m_List.AddString(_T("Item D"));
  m_List.AddString(_T("Item E"));
  m_List.AddString(_T("Item F"));

	m_Combo.SetCurSel(0);
}

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 SCA d.o.o.
Serbia Serbia
I am a cofounder of SCA Software, company that specializes in software for process control, visualization and communication. Programming for the last 10 years in C++, Delphi. Visual C++ for the last 6 years. Degree in Electronics Engineering and Telecommunications.

Comments and Discussions