Click here to Skip to main content
15,894,405 members
Articles / Desktop Programming / MFC

A Card Dialog

Rate me:
Please Sign up or sign in to vote.
3.57/5 (4 votes)
19 Jan 2000 59.1K   1.7K   20  
An auto-sizing dialog used to store and display smaller child dialogs.
// CardTwo.cpp : implementation file
//

#include "stdafx.h"
#include "CardDialog.h"
#include "CardTwo.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCardTwo dialog


CCardTwo::CCardTwo(CWnd* pParent /*=NULL*/)
	: TCard(CCardTwo::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCardTwo)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CCardTwo::DoDataExchange(CDataExchange* pDX)
{
	TCard::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCardTwo)
	DDX_Control(pDX, IDC_LIST, m_List);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCardTwo, TCard)
	//{{AFX_MSG_MAP(CCardTwo)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCardTwo message handlers

BOOL CCardTwo::OnInitDialog() 
{
	TCard::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_List.AddString("Test item 1");
  m_List.AddString("Test item 2");
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

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